Skip to content

split clantag out, and some ui improvements - #4744

Merged
Celant merged 4 commits into
mainfrom
clantagsplit
Jul 28, 2026
Merged

split clantag out, and some ui improvements#4744
Celant merged 4 commits into
mainfrom
clantagsplit

Conversation

@ryanbarlow97

@ryanbarlow97 ryanbarlow97 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Description:

split out clan tag, and made it filterable
also added proper cell splits with rank/clan/player

image image image

also updated the team icon to be the same as the button, was the player icon before:
image

Please complete the following:

  • I have added screenshots for all UI updates
  • I process any text displayed to the user through translateText() and I've added it to the en.json file
  • I have added relevant tests to the test directory

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

w.o.n

@ryanbarlow97 ryanbarlow97 added this to the v33 milestone Jul 27, 2026
@ryanbarlow97 ryanbarlow97 self-assigned this Jul 27, 2026
@ryanbarlow97 ryanbarlow97 added the UI/UX UI/UX changes including assets, menus, QoL, etc. label Jul 27, 2026
@ryanbarlow97
ryanbarlow97 requested a review from a team as a code owner July 27, 2026 22:32
Copilot AI review requested due to automatic review settings July 27, 2026 22:32

This comment was marked as resolved.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8aec42d7-3052-4a8a-aa56-c29f76d25f43

📥 Commits

Reviewing files that changed from the base of the PR and between 8b9257e and 9de7395.

📒 Files selected for processing (1)
  • resources/lang/en.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • resources/lang/en.json

Walkthrough

The PR propagates clan tags through player updates and views, adds clan-aware leaderboard columns, and refactors stats tables around typed column definitions. It also updates defaults, translations, icons, picker behavior, sorting, virtualization, and related tests.

Changes

Clan-aware leaderboard

Layer / File(s) Summary
Clan tag data flow
src/core/game/*, src/client/view/*, src/client/render/types/Renderer.ts
Player updates and static player data now carry clan tags, including diffing, serialization, local-player overrides, and anonymous-name handling.
Clan-aware rows and validation
src/client/hud/layers/PlayerStats.ts, tests/client/view/PlayerView.test.ts, tests/PlayerUpdateDiff.test.ts, tests/util/viewStubs.ts
Player rows expose names and clan tags, with tests for snapshots, diffs, missing tags, and anonymization.

Column registry

Layer / File(s) Summary
Typed column definitions
src/client/hud/layers/lib/StatsColumns.ts, src/client/StatsConstants.ts
Columns now define layout, headers, visibility, ordering, cells, and optional numeric values for player and team tables.
Defaults, labels, and icons
src/core/game/UserSettings.ts, resources/lang/en.json, src/client/hud/HotbarIcons.ts, CREDITS.md
Table-specific defaults, clan and rank labels, and guild/team icons are added.
Registry tests
tests/StatsColumns.test.ts, tests/UserSettings.test.ts
Tests cover metadata, table filtering, cell rendering, defaults, and fallback behavior.

Stats table flow

Layer / File(s) Summary
Column-driven rendering
src/client/components/StatsTable.ts, src/client/hud/layers/PlayerStats.ts, src/client/hud/layers/TeamStats.ts
Tables render visible columns, support picker-controlled visibility and dynamic sorting, and preserve pinned-row virtualization and team aggregation.
Interaction and rendering tests
tests/ColumnPicker.test.ts, tests/PlayerStats.test.ts, tests/TeamStats.test.ts, tests/StatsTableVirtualization.test.ts, tests/GameLeftSidebar.test.ts
Tests cover picker events, clan rendering, headers, sizing, sorting, team exclusion, aggregation, virtualization, and updated stubs.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant PlayerImpl
  participant PlayerUpdate
  participant PlayerView
  participant StatsTable
  participant ColumnPicker
  PlayerImpl->>PlayerUpdate: serialize clanTag
  PlayerUpdate->>PlayerView: apply clanTag
  PlayerView->>StatsTable: build clan-aware rows
  StatsTable->>ColumnPicker: provide hideable columns and selection
  ColumnPicker->>StatsTable: return columns-changed selection
  StatsTable->>StatsTable: render and sort visible columns
Loading

Possibly related PRs

Suggested labels: Backend, Feature

Suggested reviewers: evanpelle

Poem

Clan tags travel through the stream,
New columns shape the leaderboard dream.
Pickers, icons, rows align,
Guild and team now share the line.
Data flows both clear and bright.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 37.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title mentions splitting clan tag out and UI improvements, which matches the main changes in the PR.
Description check ✅ Passed The description is clearly about splitting clan tag, filtering, cell splits, updated icons, screenshots, and tests.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/client/view/PlayerView.ts (1)

58-64: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Apply later clan-tag updates to the view.

diffPlayerUpdate() now emits clan-tag-only updates, but GameView.update() routes those to applyUpdate(), which never updates this.static. Existing leaderboard rows therefore keep the original clan tag.

Proposed fix
  applyUpdate(pu: PlayerUpdate): void {
    applyStateUpdate(this.state, pu);
+   if (pu.clanTag !== undefined) {
+     this.static.clanTag = pu.clanTag;
+   }
    // applyStateUpdate refreshes outgoingEmojis every tick; re-apply the

Also applies to: 441-445

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/client/view/PlayerView.ts` around lines 58 - 64, Update the PlayerView
update path, specifically applyUpdate() and its clan-tag handling, so
clan-tag-only updates emitted by diffPlayerUpdate() also replace the
corresponding value in this.static. Preserve the existing staticFromUpdate()
initialization and ensure leaderboard rows reflect later clan-tag changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/client/view/PlayerView.ts`:
- Around line 58-64: Update the PlayerView update path, specifically
applyUpdate() and its clan-tag handling, so clan-tag-only updates emitted by
diffPlayerUpdate() also replace the corresponding value in this.static. Preserve
the existing staticFromUpdate() initialization and ensure leaderboard rows
reflect later clan-tag changes.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f9fffad5-5dd1-44d0-8d10-ab21bb73a350

📥 Commits

Reviewing files that changed from the base of the PR and between 3e1de8f and 9243009.

⛔ Files ignored due to path filters (2)
  • resources/images/GuildIconWhite.svg is excluded by !**/*.svg
  • resources/images/TeamIconWhite.svg is excluded by !**/*.svg
📒 Files selected for processing (27)
  • CREDITS.md
  • resources/lang/en.json
  • src/client/StatsConstants.ts
  • src/client/components/StatsTable.ts
  • src/client/hud/HotbarIcons.ts
  • src/client/hud/layers/PlayerStats.ts
  • src/client/hud/layers/TeamStats.ts
  • src/client/hud/layers/lib/StatsColumns.ts
  • src/client/render/types/Renderer.ts
  • src/client/view/GameView.ts
  • src/client/view/PlayerView.ts
  • src/core/game/Game.ts
  • src/core/game/GameUpdateUtils.ts
  • src/core/game/GameUpdates.ts
  • src/core/game/PlayerImpl.ts
  • src/core/game/UserSettings.ts
  • tests/ColumnPicker.test.ts
  • tests/GameLeftSidebar.test.ts
  • tests/GameUpdateUtils.test.ts
  • tests/PlayerStats.test.ts
  • tests/PlayerUpdateDiff.test.ts
  • tests/StatsColumns.test.ts
  • tests/StatsTableVirtualization.test.ts
  • tests/TeamStats.test.ts
  • tests/UserSettings.test.ts
  • tests/client/view/PlayerView.test.ts
  • tests/util/viewStubs.ts

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 27, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 27, 2026
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@Celant Celant left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the diff with attention on the src/core changes, the column registry, and the sort/aggregate logic. I did not read all ~500 diff lines of StatsTable.ts rendering line by line — flagging that so the coverage of this review isn't overstated. All 13 checks are green.

The shape of this is good. A few things I checked that hold up:

  • clanTag is threaded through consistently. Added to PlayerUpdate, PlayerStatic, the Player interface, PlayerImpl.toUpdate(), and — the easy one to miss — both halves of diffPlayerUpdate, the equality short-circuit and the setIfDifferent list. Missing the second would have produced a field that silently never updates.
  • Anonymisation is handled. PlayerView.clanTag() mirrors displayName()'s guard, so an anonymised player doesn't leak their tag through the new column. That's a real privacy edge and it would have been easy to skip.
  • The split is genuine, not additive. PlayerInfo.displayName on main is already formatPlayerDisplayName(name, clanTag), so this is pulling apart an existing concatenation rather than introducing new state.
  • All four new/reused labelKeys resolve — clan and rank are added to en.json, player and team were already there.
  • The sort logic correctly handles "no orderable column visible" by preserving buildRows order rather than sorting on a missing key, and team aggregation correctly restricts itself to columns that have a number behind them.

One migration issue I'd want addressed before merge, and two smaller notes.

Comment thread src/core/game/UserSettings.ts
Comment thread src/client/hud/layers/TeamStats.ts Outdated
Comment thread src/client/hud/layers/lib/StatsColumns.ts
Comment thread src/client/view/PlayerView.ts
@github-project-automation github-project-automation Bot moved this from Triage to Final Review in OpenFront Release Management Jul 28, 2026
@Celant
Celant added this pull request to the merge queue Jul 28, 2026
Merged via the queue into main with commit a8469dc Jul 28, 2026
13 checks passed
@Celant
Celant deleted the clantagsplit branch July 28, 2026 17:57
@github-project-automation github-project-automation Bot moved this from Final Review to Complete in OpenFront Release Management Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

UI/UX UI/UX changes including assets, menus, QoL, etc.

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

3 participants