Repository: openfrontio/OpenFrontIO
Pull request #805: Display alliance timer in player panel
Author: login: tnhnblgl
Created: 2025-05-18T15:55:33Z | Merged: 2025-05-19T22:29:40Z

## Description:
Below Traitor: , There will be Alliance Status. And will display timer, after timer ends will show Alliance Expired. Also this Alliance Status will only show if player had alliance.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors

## Please put your Discord username so you can be contacted if a bug or regression is found:
dovg



Diff:
diff --git a/resources/lang/en.json b/resources/lang/en.json
index b2a282a552..390baf730c 100644
--- a/resources/lang/en.json
+++ b/resources/lang/en.json
@@ -403,6 +403,7 @@
     "gold": "Gold",
     "troops": "Troops",
     "traitor": "Traitor",
+    "alliance_time_remaining": "Time Remaining",
     "embargo": "Stopped trading with you",
     "nuke": "Nukes sent by them to you",
     "start_trade": "Start trading",
diff --git a/src/client/graphics/layers/PlayerPanel.ts b/src/client/graphics/layers/PlayerPanel.ts
index e7f046e256..c37659e78f 100644
--- a/src/client/graphics/layers/PlayerPanel.ts
+++ b/src/client/graphics/layers/PlayerPanel.ts
@@ -45,6 +45,9 @@ export class PlayerPanel extends LitElement implements Layer {
   @state()
   private isVisible: boolean = false;
 
+  @state()
+  private allianceExpiryText: string | null = null;
+
   public show(actions: PlayerActions, tile: TileRef) {
     this.actions = actions;
     this.tile = tile;
@@ -170,11 +173,38 @@ export class PlayerPanel extends LitElement implements Layer {
       const myPlayer = this.g.myPlayer();
       if (myPlayer !== null && myPlayer.isAlive()) {
         this.actions = await myPlayer.actions(this.tile);
+
+        if (this.actions?.interaction?.allianceCreatedAtTick !== undefined) {
+          const createdAt = this.actions.interaction.allianceCreatedAtTick;
+          const durationTicks = this.g.config().allianceDuration();
+          const expiryTick = createdAt + durationTicks;
+          const remainingTicks = expiryTick - this.g.ticks();
+
+          if (remainingTicks > 0) {
+            const remainingSeconds = Math.max(
+              0,
+              Math.floor(remainingTicks / 10),
+            ); // 10 ticks per second
+            this.allianceExpiryText = this.formatDuration(remainingSeconds);
+          }
+        } else {
+          this.allianceExpiryText = null;
+        }
         this.requestUpdate();
       }
     }
   }
 
+  private formatDuration(totalSeconds: number): string {
+    if (totalSeconds <= 0) return "0s";
+    const minutes = Math.floor(totalSeconds / 60);
+    const seconds = totalSeconds % 60;
+    let time = "";
+    if (minutes > 0) time += `${minutes}m `;
+    time += `${seconds}s`;
+    return time.trim();
+  }
+
   getTotalNukesSent(otherId: PlayerID): number {
     const stats = this.g.player(otherId).stats();
     if (!stats) {
@@ -309,6 +339,20 @@ export class PlayerPanel extends LitElement implements Layer {
                 </div>
               </div>
 
+              ${this.allianceExpiryText !== null
+                ? html`
+                    <div class="flex flex-col gap-1">
+                      <div class="text-white text-opacity-80 text-sm px-2">
+                        ${translateText("player_panel.alliance_time_remaining")}
+                      </div>
+                      <div
+                        class="bg-opacity-50 bg-gray-700 rounded p-2 text-white"
+                      >
+                        ${this.allianceExpiryText}
+                      </div>
+                    </div>
+                  `
+                : ""}
               <!-- Stats -->
               <div class="flex flex-col gap-1">
                 <div class="text-white text-opacity-80 text-sm px-2">
diff --git a/src/core/GameRunner.ts b/src/core/GameRunner.ts
index e64909307f..58631aaddf 100644
--- a/src/core/GameRunner.ts
+++ b/src/core/GameRunner.ts
@@ -201,6 +201,10 @@ export class GameRunner {
         canDonate: player.canDonate(other),
         canEmbargo: !player.hasEmbargoAgainst(other),
       };
+      const alliance = player.allianceWith(other as Player);
+      if (alliance) {
+        actions.interaction.allianceCreatedAtTick = alliance.createdAt();
+      }
     }
 
     return actions;
diff --git a/src/core/game/Game.ts b/src/core/game/Game.ts
index 1eace413df..1f3e6ebd09 100644
--- a/src/core/game/Game.ts
+++ b/src/core/game/Game.ts
@@ -613,6 +613,7 @@ export interface PlayerInteraction {
   canTarget: boolean;
   canDonate: boolean;
   canEmbargo: boolean;
+  allianceCreatedAtTick?: Tick;
 }
 
 export interface EmojiMessage {


Reviews:
user: login: evanpelle
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-18T19:50:09Z
user: login: tnhnblgl
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-18T20:47:05Z
user: login: evanpelle
body: Thanks!
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-05-19T20:52:00Z

Review comments:
diff_hunk: @@ -169,12 +173,39 @@ export class PlayerPanel extends LitElement implements Layer {
     if (this.isVisible && this.tile) {
       const myPlayer = this.g.myPlayer();
       if (myPlayer !== null && myPlayer.isAlive()) {
-        this.actions = await myPlayer.actions(this.tile);
+        const currentActions = await myPlayer.actions(this.tile);
+        this.actions = currentActions;
path: src/client/graphics/layers/PlayerPanel.ts
user: login: evanpelle
body: this change seems unnecessary
created_at: 2025-05-18T19:44:11Z
author_association: COLLABORATOR
diff_hunk: @@ -169,12 +173,39 @@ export class PlayerPanel extends LitElement implements Layer {
     if (this.isVisible && this.tile) {
       const myPlayer = this.g.myPlayer();
       if (myPlayer !== null && myPlayer.isAlive()) {
-        this.actions = await myPlayer.actions(this.tile);
+        const currentActions = await myPlayer.actions(this.tile);
+        this.actions = currentActions;
+
+        if (currentActions?.interaction?.allianceCreatedAtTick !== undefined) {
+            const createdAt = currentActions.interaction.allianceCreatedAtTick;
+            const durationTicks = this.g.config().allianceDuration();
+            const expiryTick = createdAt + durationTicks;
+            const remainingTicks = expiryTick - this.g.ticks();
+
+            if (remainingTicks > 0) {
+                const remainingSeconds = Math.max(0, Math.floor(remainingTicks / 10)); // 10 ticks per second
+                this.allianceExpiryText = this.formatDuration(remainingSeconds);
+            } else {
+                this.allianceExpiryText = translateText("player_panel.alliance_expired_status");
path: src/client/graphics/layers/PlayerPanel.ts
user: login: evanpelle
body: This is unnecessary because once the alliance expires we stop rendering alliance information. 
created_at: 2025-05-18T19:48:54Z
author_association: COLLABORATOR
diff_hunk: @@ -400,6 +400,8 @@
     "gold": "Gold",
     "troops": "Troops",
     "traitor": "Traitor",
+    "alliance_status": "Alliance Status",
path: resources/lang/en.json
user: login: evanpelle
body: rename to:

"alliance_time_remaining": "Time Remaining"
created_at: 2025-05-18T19:50:06Z
author_association: COLLABORATOR
diff_hunk: @@ -169,12 +173,39 @@ export class PlayerPanel extends LitElement implements Layer {
     if (this.isVisible && this.tile) {
       const myPlayer = this.g.myPlayer();
       if (myPlayer !== null && myPlayer.isAlive()) {
-        this.actions = await myPlayer.actions(this.tile);
+        const currentActions = await myPlayer.actions(this.tile);
+        this.actions = currentActions;
path: src/client/graphics/layers/PlayerPanel.ts
user: login: tnhnblgl
body: I made it for better look because using more than 1 and this.actions looks worse but changed it for you
created_at: 2025-05-18T20:47:05Z
author_association: CONTRIBUTOR

PR comments:
user: login: coderabbitai[bot]
created_at: 2025-05-18T15:55:41Z
body: <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- walkthrough_start -->

"""
## Walkthrough

This update introduces alliance time remaining display to the player panel. It adds a new translation key, extends the player panel UI to show the alliance expiry countdown, enhances game logic to include alliance creation tick in player interactions, and updates the player interaction interface with an optional alliance creation tick property.

## Changes

| File(s)                          | Change Summary                                                                                                    |
|---------------------------------|------------------------------------------------------------------------------------------------------------------|
| resources/lang/en.json           | Added `"alliance_time_remaining"` key with value `"Time Remaining"` to the `"player_panel"` section.              |
| src/client/graphics/layers/PlayerPanel.ts | Extended PlayerPanel to track and render alliance expiry time; added reactive state property and duration formatter.|
| src/core/GameRunner.ts           | Modified `playerActions` to include `allianceCreatedAtTick` in interaction data if an alliance exists.             |
| src/core/game/Game.ts            | Added optional `allianceCreatedAtTick?: Tick` property to `PlayerInteraction` interface.                          |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant UI as PlayerPanel
    participant GameRunner
    participant Game as Game Logic

    UI->>GameRunner: Request playerActions for tile
    GameRunner->>Game: Check interaction and alliance status
    Game-->>GameRunner: Return interaction data (with allianceCreatedAtTick if applicable)
    GameRunner-->>UI: Return interaction data
    UI->>UI: Calculate remaining alliance time
    UI->>UI: Render alliance time remaining in panel
```

## Suggested reviewers

- evanpelle

## Poem

> 🐇⏳  
> A tick, a tock, the alliance clock,  
> Time remaining now we unlock.  
> Minutes and seconds, clear to see,  
> In the panel, it’s shown with glee.  
> Rabbits cheer, the time’s in sight,  
> Alliance countdown shining bright! 🌟🐰
"""

<!-- walkthrough_end -->
<!-- This is an auto-generated comment: all tool run failures by coderabbit.ai -->

> [!WARNING]
> There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.
> 
> <details>
> <summary>🔧 ESLint</summary>
> 
> > If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.
> 
> npm warn config production Use `--omit=dev` instead.
> npm error Exit handler never called!
> npm error This is an error with npm itself. Please report this error at:
> npm error   <https://github.com/npm/cli/issues>
> npm error A complete log of this run can be found in: /.npm/_logs/2025-05-19T21_23_39_114Z-debug-0.log
> 
> 
> 
> </details>

<!-- end of auto-generated comment: all tool run failures by coderabbit.ai -->

<!-- announcements_start -->

> [!NOTE]
> <details>
> <summary>⚡️ AI Code Reviews for VS Code, Cursor, Windsurf</summary>
> 
> CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
> Learn more [here](http://coderabbit.ai/ide).
> 
> </details>

---

> [!NOTE]
> <details>
> <summary>⚡️ Faster reviews with caching</summary>
> 
> CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure `Review - Disable Cache` at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the `Data Retention` setting under your Organization Settings.
> Enjoy the performance boost—your workflow just got faster.
> 
> </details>

<!-- announcements_end -->

---

<details>
<summary>📜 Recent review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 11dce0a6c4156eae888fe603d203d9b71b6665be and a6cddea72bba19a05d80aae00553dcbee88c5726.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `src/client/graphics/layers/PlayerPanel.ts` (3 hunks)

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (1)</summary>

* src/client/graphics/layers/PlayerPanel.ts

</details>

</details>
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNxU3bABsvkCiQBHbGlcABpIcVwvOkgAIgARJG4vNHk0H3hMBhII+DY+eCxk1MoeTBIvUNjIAHc0ZAcBZnUaejkI2BzsRFLcDFgMAS8iX3rrOwxHAVKADgAGAFZ+LFxOyAB5bjIAMQp8DFwASXW/Em58RHV8Fw0YNYZYTFIUA73abGzkTDiAQQysnIAZVw1G61R6Yng+0g0y8+BqHRyJAAHkhxBgiHFoFQrhQONUUrCXoieClZKVuOUvLd3A1ROJobQkmSvrl8i8mQxqIVMascu8qAysPgAGYk4rkigAci+/ww2Vu63lOT5bNKKO48H8iHCqsQINw3Ug2G4tGo0gi+HssHhvzl2UgAFFkZr/LQNNU4Dl0l5Msr7AajZh6OJ2c4cvsvPIJEh4EMcvAxaqJaUGNgKP4DlHII8vlg0JCpOh7SQNG41mg8Da+LmXgwvNglPQ0IxOgwANa+/Uc+Bc9G8x64ewMfxkRA23DIEXXYu+ACqh2NpvNyEeRemZHQtCbuur+GwRFgERCPJzYw3WCYGHeYjo4WDiLSDGy3CH2vOGEual9uHk074mDyAIB7IIUuBvB8dA0msiSIEwFD0N0lAYGgbA8HsMZNpA/4KAcBZDoUjD1BGYrAUQyAzv4RDapc+ygcgsS0PgEhEB65iWAAwiwbAHA0j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fO5KouWSdXhEzEkg2f7FCQ0bUefF0RfGklfEDBkjfG9XKASB9O4ZdJkQ+PsQNSMNIbcZAOEIgEDQoQ5FUF7FY08fQ52QwoGEw9AxIqjCwkgKwgVWw3nPjUQiAITAwCQ64KQ4nNgaQzRRQkQgTFQ3TQVDQ/iQzbQ4zCmD1YUOmTw9CaLU/OLPY5bQ4tbGHa4pMWQLYJDY4jLBXJA54pDH/P6UE63EEygEUAscdWkUMmLX8V3TaJPZmaLePIOU4TGEkF3JgGyIcTE/MXzPPf0TLVEqCCdK0aYvgKuKU3pYkxdUU+9FUCtNYC4/MtqPgBwDMfcHpBqKbR9bTMfUlYk9Mj9Gfb9Sk3k6k/FZfOkwUsDDfOWbfLaYMlCXwbY0shbds7IfYpmI4mHAAfi4GTLZNzIoGnPMxoyzKOyFH/xYNE0kKk00WdLYCEMtIEzEKxRxVA3xTFC0j5RJS9LWQpT8DQHFR9KlXaCmyZXlVZSVUMHgvJXUEjXgC1wwxjG9ToEjSSX/WIuME5UgAWAYAEDmFoAWFoAAE5aB+dRAAAmAQBgG2AAZhFEErmAYBFAYDEpmBFDErEoWHkrmAAHYeKxKAA2LSuYfnfnJi+ChYHiqSkgYy/nEUG2NShYLStAGYNSwSnihYfSkgQSuynimYQSmYBgPSwSkUDynijytSwylihYeYMS2gNSsS/nFQEUNStAQS/inilQLS6K6YOYNANS/nBgQXGYNALS6y/nWgQShgEKiASAfnAQHi3SgQWgGYaYbSugNAZqAQBYOYGYLSlqjKmYASkUQXLShgBYNSnS0q9leC/S2gbIDKgam2fnGy7KEgGYJarKXSiKqSiKnigQLKgQHSrShYaYMqqAfKhgS6TK4SgQNAfnZKxYOqjK5quYRYFSyajcJawahyrSpi1VKAMi3ACiqi/wGixdWgSNPFYioAA -->

<!-- internal state end -->
<!-- tips_start -->

---



<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=openfrontio/OpenFrontIO&utm_content=805):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Explain this complex logic.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai explain this code block.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and explain its main purpose.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

### Support

Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->
author_association: CONTRIBUTOR
user: login: tnhnblgl
created_at: 2025-05-18T16:02:00Z
body: If it's possible, can be deployed to subdomain
author_association: CONTRIBUTOR
user: login: VariableVince
created_at: 2025-05-18T16:29:15Z
body: If this is added, the Instructions (helpModal.ts) should actually be updated as well after. At least the images for Player Info Panel and the description. So that it's not outdated too soon again.

Just submitted another PR for PlayerPanel by the way, could cause a conflict: https://github.com/openfrontio/OpenFrontIO/pull/804
author_association: CONTRIBUTOR
user: login: tnhnblgl
created_at: 2025-05-18T16:36:45Z
body: @VariableVince wrote this in mobile so I can't deploy.

About conflict, I would appreciate your help on that. But if mine pr get accepted first, then I'll try to integrate.
author_association: CONTRIBUTOR
user: login: VariableVince
created_at: 2025-05-18T17:00:43Z
body: @tnhnblgl about the conflict. Thanks. I'm quite new to git and github, so you may be better suited for it indeed. But i can help with the needed changes of course
author_association: CONTRIBUTOR
user: login: VariableVince
created_at: 2025-05-18T21:21:48Z
body: My PR on this file was just merged, fyi.

Btw if you want to become a member of the Dev server, you can use the invite in the readme
author_association: CONTRIBUTOR
user: login: tnhnblgl
created_at: 2025-05-19T05:07:42Z
body: @VariableVince thanks for that, really needed 
author_association: CONTRIBUTOR
user: login: evanpelle
created_at: 2025-05-19T20:52:15Z
body: Looks like prettier is failing
author_association: COLLABORATOR
user: login: tnhnblgl
created_at: 2025-05-19T21:23:46Z
body: @evanpelle Sorry, done!
author_association: CONTRIBUTOR