Skip to content

Keep the player card off the open leaderboard from 1024px - #6157

Merged
evanpelle merged 1 commit into
mainfrom
fix/player-card-leaderboard-overlap
Oct 26, 2026
Merged

evanpelle merged 1 commit into
mainfrom
fix/player-card-leaderboard-overlap

Conversation

@evanpelle

Copy link
Copy Markdown
Collaborator

Summary

  • Even with the clan column hidden (Hide the leaderboard's clan column by default #6147), the centered player card still covered about 65px of the open leaderboard on Poki's 1080p frame (1031×580).
  • From lg (1024px), where the leaderboard opens by default, the leaderboard, the card and the timer sidebar (with the replay panel) now share one top row in index.html. It's a 3-column grid, [minmax(max-content,1fr) | minmax(0,max-content) | minmax(max-content,1fr)]. When there's room the card stays centered as before. Otherwise it shifts right to clear the leaderboard, and narrows (lg:max-w-full) only if it would reach the sidebar. The card's building-count boxes shrink a few pixels rather than wrap.
  • Below lg, nothing changes: each piece keeps its own fixed position (max-lg:), as on main. There's no shrinking and no vertical sidebar.
  • The row is pointer-events-none. The leaderboard, the sidebar and the visible card opt back in, so map clicks pass through the empty parts of the row.

Test plan

Headed Chromium against a local dev server, solo game, leaderboard open:

Viewport Leaderboard Card Sidebar
1024×600 0–331 331–797 797–1024
1031×580 (Poki on 1080p) 0–331 331–804 804–1031
1280×720 0–331 341–939 (centered) 1053–1280
1920×1080 0–331 661–1259 (centered) 1693–1920
836×470 (below lg) unchanged from main
  • Hit tests at 1031×580: empty row space reaches game-input-overlay, and the leaderboard and sidebar take clicks.
  • npx vitest run: 9534 passed, 1 skipped. npm run typecheck, oxlint and oxfmt are clean.

🤖 Generated with Claude Code

From lg, where the leaderboard opens by default, the leaderboard, the
hovered-player card and the timer sidebar share one top row: the card
stays centered when it fits and otherwise shifts right (narrowing if it
has to) to clear the leaderboard. Fixes the overlap on Poki's 1031px
frame. Below lg nothing changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6cfc07f2-7bd5-4de1-9a02-cef56f9a5a7d
Commits

Reviewing files that changed from the base of the PR and between e5e31ad and 9306b8a.

Files selected for processing: 3
  • index.html
  • src/client/hud/layers/GameLeftSidebar.ts
  • src/client/hud/layers/PlayerInfoOverlay.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

Walkthrough

The top HUD now uses a three-column row at large screen widths. Below the lg breakpoint, the right-side controls stay at the top right, and the sidebar and player-info overlay use their responsive positioning rules.

Changes

Responsive HUD

Layer / File(s) Summary
Responsive top HUD layout
index.html, src/client/hud/layers/GameLeftSidebar.ts, src/client/hud/layers/PlayerInfoOverlay.ts
At lg and above, the left sidebar, player-info overlay, and right-side controls occupy three columns. Below lg, the right-side controls remain fixed at the top right. The sidebar and overlay use breakpoint-specific positioning and pointer-event classes.

Priority: Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

Suggested reviewers: celant, jb940

Merge Risk: Minimal · up to 9306b

The responsive HUD change is ready to merge after normal checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Description check Passed The description clearly explains the responsive three-column HUD layout, breakpoint behavior, pointer-event handling, and test results.
Title check Passed The title clearly summarizes the main change: keeping the player card clear of the open leaderboard from the 1024px breakpoint.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
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.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files. (1 skipped: 1 unsupported.)

Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Three columns line up at the top.
The side controls keep their place.
Below lg, the layout shifts.
The player card finds its space.
A tidy HUD settles in.

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

@evanpelle evanpelle added this to the v35 milestone Oct 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🤖 Claude Code Review

Verdict: No issues found. Findings: 0 critical, 0 major, 0 minor.

Checked for bugs and CLAUDE.md compliance. Below lg, the leaderboard, card and sidebar keep the same positions and z-indexes as on main (max-lg:fixed, z-900, z-[1001], z-1000). From lg, the leaderboard and card move into the shared z-1000 row. Overlays that could sit on top of them (emoji-table, game-starting-modal, Modal, player-panel) still stack correctly: they use higher z-indexes or come later in the DOM.

@evanpelle
evanpelle merged commit 9628a3e into main Oct 26, 2026
22 of 24 checks passed
@evanpelle
evanpelle deleted the fix/player-card-leaderboard-overlap branch October 26, 2026 21:52
@github-project-automation github-project-automation Bot moved this from Triage to Complete in OpenFront Release Management Oct 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🍒 Cherry-pick onto v35 conflicted; Claude fixed it in #6165 for review.

evanpelle added a commit that referenced this pull request Oct 26, 2026
Cherry-pick of #6157 onto `v35`. It conflicted, and Claude resolved it.

Conflicted files:
- `src/client/hud/layers/PlayerInfoOverlay.ts`

Typecheck, format and lint pass on the result.

Check the fix before merging.

Co-authored-by: Evan <evanpelle@gmail.com>

This branch was successfully deployed

1 active and 1 inactive deployments
backport — 9306b8ad Deployed Oct 26, 2026 by evanpelle via Cherry-pick #620
staging — 9306b8ad Deployed Oct 26, 2026 by openfrontio[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

1 participant