Skip to content

Show only the teams lobby card on compact screens - #6167

Merged
evanpelle merged 2 commits into
mainfrom
fix/teams-only-compact-lobbies
Oct 26, 2026
Merged

evanpelle merged 2 commits into
mainfrom
fix/teams-only-compact-lobbies

Conversation

@evanpelle

@evanpelle evanpelle commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • In short windows the homepage's right column used to split its height between the teams and the special lobby cards. In Poki's 1031×580 frame each card came out tiny.
  • In windows at most 700px tall, from sm up, when both lobbies are listed, the special card is hidden and the teams card spans both rows. That covers Poki's 580px and 470px frames, while an iPad mini in landscape (744px tall) keeps both cards. The special lobby is still listed in the "See all" lobby browser.
  • If there's no teams lobby, the special card still shows. Phones (below sm) keep their stacked, full-width cards, and larger screens are unchanged.

Test plan

Headed Chromium against a local dev server, measuring the right column:

Viewport Teams card Special card
1031×580 236×182 hidden
836×470 263×138 hidden
1366×650 236×210 hidden
1133×744 (iPad mini landscape) 236×116 236×116 (unchanged)
744×1133 (iPad mini portrait) 232×159 232×159 (unchanged)
390×844 358×176 358×176 (unchanged)
  • npx vitest run tests/client: 5010 passed. npm run typecheck, oxlint and oxfmt are clean.

🤖 Generated with Claude Code

The teams and special lobby cards split the column's height; on compact
screens (e.g. Poki's 1031x580 frame) each came out about 90px tall.
There, when both are listed, teams takes the whole column and the special
lobby is left to the lobby browser. Phones keep their stacked cards.

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: f35e949e-4aaf-4b11-b9e3-e1c464b9dce3
Commits

Reviewing files that changed from the base of the PR and between 8bde745 and e2d7fb3.

Files selected for processing: 1
  • src/client/GameModeSelector.ts

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

Walkthrough

When both secondary cards are present, the special card appears on row two and the teams card appears on row three. At viewport heights of 700px or less, the special card is hidden and the teams card spans both rows.

Changes

Lobby card layout

Layer / File(s) Summary
Compact card placement
src/client/GameModeSelector.ts
When both cards are present, the special card uses row two and is hidden at viewport heights of 700px or less. The teams card uses row three at greater heights and spans both rows at 700px or less.

Priority: Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Suggested labels: small-fix

Suggested reviewers: ryanbarlow97

Merge Risk: Minimal · up to e2d7f

No actionable merge-blocking risk remains.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title names the main change: on compact screens, only the teams lobby card is shown when both lobbies are listed. It matches the raw summary, which describes hiding the special card and expanding …
Description check Passed The description explains the layout problem, the 700px height rule from sm upward, the hidden special card when a teams lobby exists, and the unchanged phone and large-screen layouts. It also gives vi…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files.
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: Title check

Explanation

The title names the main change: on compact screens, only the teams lobby card is shown when both lobbies are listed. It matches the raw summary, which describes hiding the special card and expanding the team card at heights of 700px or less. The title is short, specific, and uses no vague terms.

Full details: Description check

Explanation

The description explains the layout problem, the 700px height rule from sm upward, the hidden special card when a teams lobby exists, and the unchanged phone and large-screen layouts. It also gives viewport measurements and test results. This fits the changeset, which modifies the GameModeSelector render logic.

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

Two cards find their place in line
Row two, then row three by design
When the screen grows short
One card steps out of court
The teams card spans the space just right

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

@github-actions

Copy link
Copy Markdown
Contributor

🤖 Claude Code Review

Verdict: looks good — 0 findings (0 high, 0 medium, 0 low).

No issues found. Checked for bugs and CLAUDE.md compliance.

The sm:compact: classes match the compact custom variant in src/client/styles.css. The important modifiers (row-start-2!, row-span-2!) reliably override sm:row-start-3 in the column's auto_1fr_1fr inner grid. When there is no teams lobby, the special card still takes the single-card path, so it isn't hidden.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Oct 26, 2026
… ones

Compact (up to 800px tall or under 1024px wide) also caught an iPad mini
in landscape (1133x744), whose column fits both cards. The teams-only
layout now applies only to windows at most 700px tall, which still covers
Poki's 580px and 470px frames.

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

Copy link
Copy Markdown
Contributor

🤖 Claude Code Review

Reviewed range: 8bde745..e2d7fb3 (incremental).

Verdict: looks good. 0 findings (0 high, 0 medium, 0 low).

No issues found. Checked for bugs and CLAUDE.md compliance.

This range changes the breakpoint from the shared compact variant (max-height: 800px in src/client/styles.css) to an inline Tailwind v4 arbitrary variant, sm:[@media(max-height:700px)]:. The syntax is valid and the classes are static string literals, so the Tailwind scanner picks them up. The ! important modifiers still override sm:row-start-3, and the case with only a special lobby is unaffected. The 700px cutoff matches the PR description: the special card is hidden in the 580px and 470px Poki frames and stays visible in iPad mini landscape (744px).

@evanpelle evanpelle added this to the v35 milestone Oct 26, 2026
@evanpelle
evanpelle merged commit cd8f7c3 into main Oct 26, 2026
20 of 22 checks passed
@evanpelle
evanpelle deleted the fix/teams-only-compact-lobbies branch October 26, 2026 23:56
@github-project-automation github-project-automation Bot moved this from Triage to Complete in OpenFront Release Management Oct 26, 2026
openfront-backport Bot pushed a commit that referenced this pull request Oct 26, 2026
## Summary

- In short windows the homepage's right column used to split its height
between the teams and the special lobby cards. In Poki's 1031×580 frame
each card came out tiny.
- In windows at most 700px tall, from `sm` up, when both lobbies are
listed, the special card is hidden and the teams card spans both rows.
That covers Poki's 580px and 470px frames, while an iPad mini in
landscape (744px tall) keeps both cards. The special lobby is still
listed in the "See all" lobby browser.
- If there's no teams lobby, the special card still shows. Phones (below
`sm`) keep their stacked, full-width cards, and larger screens are
unchanged.

## Test plan

Headed Chromium against a local dev server, measuring the right column:

| Viewport | Teams card | Special card |
|---|---|---|
| 1031×580 | 236×182 | hidden |
| 836×470 | 263×138 | hidden |
| 1366×650 | 236×210 | hidden |
| 1133×744 (iPad mini landscape) | 236×116 | 236×116 (unchanged) |
| 744×1133 (iPad mini portrait) | 232×159 | 232×159 (unchanged) |
| 390×844 | 358×176 | 358×176 (unchanged) |

- `npx vitest run tests/client`: 5010 passed. `npm run typecheck`,
oxlint and oxfmt are clean.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit cd8f7c3)
@github-actions

Copy link
Copy Markdown
Contributor

🍒 Cherry-picked onto v35 as 9188675.

evanpelle added a commit that referenced this pull request Oct 27, 2026
… Solo under the hero (#6168)

## Summary

On compact screens (the `compact` variant: up to 800px tall or under
1024px wide), e.g. Poki's 1031×580 frame:

- **Smaller header:** the desktop nav bar renders at 3/4 scale (`zoom:
0.75`), 66px tall instead of 88px. The zoom goes on the inner `<nav>`,
not the sticky host, so the host's `top` offset below a header ad isn't
scaled. The account menu's dropdown is portaled to `body` and positioned
from the trigger's on-screen rect, so it still lines up.
- **Solo under the hero card:** the Solo/Tutorial row sits under the
main lobby card only (column 1) instead of spanning the whole row.
- **Both lobbies are back:** the lobby column now runs down beside
Solo/Tutorial (`row-end-4`), so the teams and special cards both show
and are taller. This undoes #6167's teams-only rule.
- **Smaller username bar:** 38px instead of 50px, with the name at
`text-xl`.
- **Tighter spacing:** on `lg` screens, the page padding drops to 16px
at the sides and 8px at the top, and the gap above the footer drops to
16px. The lobby grid's gaps drop from 16px to 12px.
- **No extra gap under the username:** the top strip's 16px bottom
padding (it only went away at `lg`) is dropped, and the lobby grid pulls
up over the gap after the iOS banner's row when that row is empty. The
gap between the username bar and the lobby cards goes from 40px to 12px
in Poki's 836×470 frame.
- **Side lobby cards are at least 7.5rem tall:** on very short frames
(836×470) the side cards had shrunk to about 99px, and their modifier
badges overlapped the map name. Their grid rows now have a 7.5rem
minimum. Row 3 is pinned to Solo's height, so the extra height goes to
the hero card (188px to 230px) and Solo stays right under it. The page
already scrolled at that size.

Phones (below `sm`) and larger screens are unchanged.

## Test plan

Headed Chromium against a local dev server:

| Viewport | Nav height | Lobby cards (each) | Solo row |
|---|---|---|---|
| 1031×580 (Poki on 1080p) | 66px (was 88) | 237×121, both shown (was
teams only) | under the hero, 475px wide |
| 1133×744 (iPad mini landscape) | 66px | 237×154 (was 116) | under the
hero |
| 744×1133 (iPad mini portrait) | mobile bar | 233×197 (was 159) | under
the hero |
| 1920×1080 | 88px | 286×159, unchanged | full row, unchanged |
| 390×844 | mobile bar | stacked, unchanged | unchanged |

- The username bar is 38px on the compact sizes, 50px at 1920×1080 and
40px on the phone (both unchanged).
- `npx vitest run tests/client`: 5010 passed. `npm run typecheck`,
oxlint and oxfmt are clean.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

2 active deployments
backport — e2d7fb30 Deployed Oct 26, 2026 by evanpelle via Cherry-pick #630
staging — e2d7fb30 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