feat(front): rework the navigation, the account page, the Game page and My games #527

Merged
root merged 13 commits from feat/400-front-screens into main 2026-10-14 16:05:07 +00:00
root commented 2026-10-14 14:52:23 +00:00 (Migrated from gitlab.core-project.space)

Summary

The four screens from the #399 prototype (navigation D, account page C, Game page C, My games D), plus the one contract change they need.

 game.list
-  () → GameSummary[]                       (latest 50)
+  { result?, cursor? } → { games, nextCursor, counts }   (20 per page, newest first)
 account.me
-  { kind, account? }
+  { kind, account?, hasGames }
<SiteFrame> (app/site-frame.tsx)                 reads only account.me
  <Sidebar> ≥lg / phone bar <lg                  design-system/ui/sidebar.tsx
    New game · My games (when hasGames)
    footer: <AccountNavView>                     Username menu: Account · Language · Sign out
                                                 or Sign in + Language (+ Guest note)
  /account  <PageFrame> + <PageTabs> ?section=   Profile · Your data · Delete account (dialog)
  /games    <PageFrame> + <PageTabs> ?result=    All · Won · Lost · Draw, counts, Show more
  /games/$id rail header "You vs …" + date       footer: Copy link (Copied) · Export PGN

Shared pieces: design-system/page-frame.tsx, design-system/ui/tabs.tsx, lib/routes.harness.tsx, tryChoiceOf and dateText.

Evidence

  • API (S5): rpc-game-reads and rpc-account-games page 41 Games that pair up on end time with none repeated or skipped. They filter by each result, keep the counts under a filter, and answer hasGames for a Guest, an Account and a browser with neither.
  • Front (S1–S4): site-navigation.test.tsx (new), app-shell, account-page (including a 375px French browser test of the phone tab row), game-page and my-games. Front: 1266 tests, green.
  • e2e (S6): my-games.spec reaches My games from the navigation and filters it. accounts.spec deletes an Account through the Username menu and the dialog. The full suite ran locally, 39/39.
  • Before: pipeline #119 failed (the devtools trigger covered "Leave the game"; a room-closed timing flake). After: see the pipeline on this head.

Merge Danger

Door: two-way

Blast Radius: front-wide

  • Navigation: it changes on every page.
  • game.list shape: it changed, and the front is its only consumer.
  • router.test.tsx: edited despite the spec's "unchanged". Story 27 changes /account's signed-out heading; the / and /local assertions are untouched.
  • Devtools trigger: moved from bottom-right to middle-left, because bottom-right now covers the Room's Leave button.
  • Room re-reads account.me when its Game ends, so "My games" appears without a reload.
  • Guest claim: not implemented yet (spec #365, ADR 0035). The Guest note's sign-up link doesn't carry a Guest's Games to the new Account until #365 lands.
  • site-frame.tsx: keeps its query and markup together, because front/view-is-composition forbids a view passing <AccountNavView/> to its UI.

Closes #400
Closes #401
Closes #402
Closes #403
Closes #404
Closes #405

## Summary The four screens from the #399 prototype (navigation D, account page C, Game page C, My games D), plus the one contract change they need. ```diff game.list - () → GameSummary[] (latest 50) + { result?, cursor? } → { games, nextCursor, counts } (20 per page, newest first) account.me - { kind, account? } + { kind, account?, hasGames } ``` ```text <SiteFrame> (app/site-frame.tsx) reads only account.me <Sidebar> ≥lg / phone bar <lg design-system/ui/sidebar.tsx New game · My games (when hasGames) footer: <AccountNavView> Username menu: Account · Language · Sign out or Sign in + Language (+ Guest note) /account <PageFrame> + <PageTabs> ?section= Profile · Your data · Delete account (dialog) /games <PageFrame> + <PageTabs> ?result= All · Won · Lost · Draw, counts, Show more /games/$id rail header "You vs …" + date footer: Copy link (Copied) · Export PGN ``` Shared pieces: `design-system/page-frame.tsx`, `design-system/ui/tabs.tsx`, `lib/routes.harness.tsx`, `tryChoiceOf` and `dateText`. ## Evidence - **API (S5):** `rpc-game-reads` and `rpc-account-games` page 41 Games that pair up on end time with none repeated or skipped. They filter by each result, keep the counts under a filter, and answer `hasGames` for a Guest, an Account and a browser with neither. - **Front (S1–S4):** `site-navigation.test.tsx` (new), `app-shell`, `account-page` (including a 375px French browser test of the phone tab row), `game-page` and `my-games`. Front: 1266 tests, green. - **e2e (S6):** `my-games.spec` reaches My games from the navigation and filters it. `accounts.spec` deletes an Account through the Username menu and the dialog. The full suite ran locally, 39/39. - **Before:** pipeline #119 failed (the devtools trigger covered "Leave the game"; a `room-closed` timing flake). **After:** see the pipeline on this head. ## Merge Danger **Door:** two-way **Blast Radius:** front-wide - **Navigation:** it changes on every page. - **`game.list` shape:** it changed, and the front is its only consumer. - **`router.test.tsx`:** edited despite the spec's "unchanged". Story 27 changes `/account`'s signed-out heading; the `/` and `/local` assertions are untouched. - **Devtools trigger:** moved from bottom-right to middle-left, because bottom-right now covers the Room's Leave button. - **Room re-reads `account.me` when its Game ends,** so "My games" appears without a reload. - **Guest claim:** not implemented yet (spec #365, ADR 0035). The Guest note's sign-up link doesn't carry a Guest's Games to the new Account until #365 lands. - **`site-frame.tsx`:** keeps its query and markup together, because `front/view-is-composition` forbids a view passing `<AccountNavView/>` to its UI. Closes #400 Closes #401 Closes #402 Closes #403 Closes #404 Closes #405
root commented 2026-10-14 14:57:58 +00:00 (Migrated from gitlab.core-project.space)

added 3 commits

  • f2c462eb - feat(api): page, filter and count a Player's Games, and say whether they own any
  • f4f5c0ff - Merge branch 'feat/400-front-screens' into worktree-agent-abb96ff4f053bc8b2
  • c1ce200c - chore(api): merge #401 Game pages and hasGames into the integration branch

Compare with previous version

added 3 commits <ul><li>f2c462eb - feat(api): page, filter and count a Player&#39;s Games, and say whether they own any</li><li>f4f5c0ff - Merge branch &#39;feat/400-front-screens&#39; into worktree-agent-abb96ff4f053bc8b2</li><li>c1ce200c - chore(api): merge #401 Game pages and hasGames into the integration branch</li></ul> [Compare with previous version](/amaurycoudr/chess-project/-/merge_requests/27/diffs?diff_id=170&start_sha=55c558259ecded8d3f09cc275bd2551fd3a97c4e)
root commented 2026-10-14 14:59:27 +00:00 (Migrated from gitlab.core-project.space)

added 3 commits

  • 7045a0e8 - feat(front): head the account page with the Username, tab it, delete through a dialog
  • 00bcf15e - Merge branch 'feat/400-front-screens' into worktree-agent-a041e4be571112c53
  • 571c2445 - chore(front): merge #402 account page into the integration branch

Compare with previous version

added 3 commits <ul><li>7045a0e8 - feat(front): head the account page with the Username, tab it, delete through a dialog</li><li>00bcf15e - Merge branch &#39;feat/400-front-screens&#39; into worktree-agent-a041e4be571112c53</li><li>571c2445 - chore(front): merge #402 account page into the integration branch</li></ul> [Compare with previous version](/amaurycoudr/chess-project/-/merge_requests/27/diffs?diff_id=172&start_sha=c1ce200cb4cb88b9f25c5587a39327ac7cf82b48)
root commented 2026-10-14 15:03:27 +00:00 (Migrated from gitlab.core-project.space)

added 1 commit

  • 2eafe417 - fix(front): lay the account page's tabs beside the section from md

Compare with previous version

added 1 commit <ul><li>2eafe417 - fix(front): lay the account page&#39;s tabs beside the section from md</li></ul> [Compare with previous version](/amaurycoudr/chess-project/-/merge_requests/27/diffs?diff_id=174&start_sha=571c2445e9b39dca3548952332bf175618107827)
root commented 2026-10-14 15:05:42 +00:00 (Migrated from gitlab.core-project.space)

added 7 commits

  • 2eafe417...b86107e8 - 3 commits from branch main
  • bed61e4d - feat(front): head the account page with the Username, tab it, delete through a dialog
  • 2f4b2c5d - feat(api): page, filter and count a Player's Games, and say whether they own any
  • e49a1b8a - feat(front): name the Game in the Game page's rail, and say Copied on its Copy link
  • d0489250 - fix(front): lay the account page's tabs beside the section from md

Compare with previous version

added 7 commits <ul><li>2eafe417...b86107e8 - 3 commits from branch <code>main</code></li><li>bed61e4d - feat(front): head the account page with the Username, tab it, delete through a dialog</li><li>2f4b2c5d - feat(api): page, filter and count a Player&#39;s Games, and say whether they own any</li><li>e49a1b8a - feat(front): name the Game in the Game page&#39;s rail, and say Copied on its Copy link</li><li>d0489250 - fix(front): lay the account page&#39;s tabs beside the section from md</li></ul> [Compare with previous version](/amaurycoudr/chess-project/-/merge_requests/27/diffs?diff_id=176&start_sha=2eafe41759fc1531af2e57af37375be6a608d64d)
root commented 2026-10-14 15:12:27 +00:00 (Migrated from gitlab.core-project.space)

added 1 commit

  • fd2d26da - feat(front): filter My games by result with counts, and page through every Game

Compare with previous version

added 1 commit <ul><li>fd2d26da - feat(front): filter My games by result with counts, and page through every Game</li></ul> [Compare with previous version](/amaurycoudr/chess-project/-/merge_requests/27/diffs?diff_id=186&start_sha=d0489250e225a869e79dd6bf08e183d13f705965)
root commented 2026-10-14 15:15:43 +00:00 (Migrated from gitlab.core-project.space)

added 2 commits

  • 00da4b69 - feat(front): lead the navigation with New game, My games once owned, the account in a menu
  • a39d06f0 - test(e2e): reach the account page from the Username menu before deleting the Account

Compare with previous version

added 2 commits <ul><li>00da4b69 - feat(front): lead the navigation with New game, My games once owned, the account in a menu</li><li>a39d06f0 - test(e2e): reach the account page from the Username menu before deleting the Account</li></ul> [Compare with previous version](/amaurycoudr/chess-project/-/merge_requests/27/diffs?diff_id=188&start_sha=fd2d26daf500cf8a4e3260f91d2ff4d3887566e7)
project_1_bot_a8dd9262857d850eef8dca5206e61de5 commented 2026-10-14 15:27:07 +00:00 (Migrated from gitlab.core-project.space)

Screenshots

Before is production, after is this merge request's review app at 484481e.

Desktop

Page Before After
Home
Local game
Room

Mobile

Page Before After
Home
Local game
Room
<!-- chess-screenshots --> ### Screenshots Before is production, after is this merge request's review app at 484481e. #### Desktop | Page | Before | After | | --- | --- | --- | | Home | <img src="https://gitlab.core-project.space/amaurycoudr/chess-project/-/jobs/1111/artifacts/raw/review-screenshots/before/home-desktop.png" width="400"> | <img src="https://gitlab.core-project.space/amaurycoudr/chess-project/-/jobs/1111/artifacts/raw/review-screenshots/after/home-desktop.png" width="400"> | | Local game | <img src="https://gitlab.core-project.space/amaurycoudr/chess-project/-/jobs/1111/artifacts/raw/review-screenshots/before/local-desktop.png" width="400"> | <img src="https://gitlab.core-project.space/amaurycoudr/chess-project/-/jobs/1111/artifacts/raw/review-screenshots/after/local-desktop.png" width="400"> | | Room | <img src="https://gitlab.core-project.space/amaurycoudr/chess-project/-/jobs/1111/artifacts/raw/review-screenshots/before/room-desktop.png" width="400"> | <img src="https://gitlab.core-project.space/amaurycoudr/chess-project/-/jobs/1111/artifacts/raw/review-screenshots/after/room-desktop.png" width="400"> | #### Mobile | Page | Before | After | | --- | --- | --- | | Home | <img src="https://gitlab.core-project.space/amaurycoudr/chess-project/-/jobs/1111/artifacts/raw/review-screenshots/before/home-mobile.png" width="200"> | <img src="https://gitlab.core-project.space/amaurycoudr/chess-project/-/jobs/1111/artifacts/raw/review-screenshots/after/home-mobile.png" width="200"> | | Local game | <img src="https://gitlab.core-project.space/amaurycoudr/chess-project/-/jobs/1111/artifacts/raw/review-screenshots/before/local-mobile.png" width="200"> | <img src="https://gitlab.core-project.space/amaurycoudr/chess-project/-/jobs/1111/artifacts/raw/review-screenshots/after/local-mobile.png" width="200"> | | Room | <img src="https://gitlab.core-project.space/amaurycoudr/chess-project/-/jobs/1111/artifacts/raw/review-screenshots/before/room-mobile.png" width="200"> | <img src="https://gitlab.core-project.space/amaurycoudr/chess-project/-/jobs/1111/artifacts/raw/review-screenshots/after/room-mobile.png" width="200"> |
root commented 2026-10-14 15:46:06 +00:00 (Migrated from gitlab.core-project.space)

added 6 commits

  • 801eee8c - fix(front): keep an overflowing tab row from clipping its first tab
  • 9f6a463f - refactor(front): read the Account again at a Game's end from the Room view, given an options object
  • 584b8ec1 - test(front): render the auth and games pages on one routes harness, and name the nav's placement
  • 93aae90d - refactor(front): share the account and My games page frame, and branch on unions exhaustively
  • 1e0802de - fix(front): keep the devtools trigger off the Room's Leave button
  • c0a41f20 - test(e2e): read the chosen filter by its role, and name Delete account once

Compare with previous version

added 6 commits <ul><li>801eee8c - fix(front): keep an overflowing tab row from clipping its first tab</li><li>9f6a463f - refactor(front): read the Account again at a Game&#39;s end from the Room view, given an options object</li><li>584b8ec1 - test(front): render the auth and games pages on one routes harness, and name the nav&#39;s placement</li><li>93aae90d - refactor(front): share the account and My games page frame, and branch on unions exhaustively</li><li>1e0802de - fix(front): keep the devtools trigger off the Room&#39;s Leave button</li><li>c0a41f20 - test(e2e): read the chosen filter by its role, and name Delete account once</li></ul> [Compare with previous version](/amaurycoudr/chess-project/-/merge_requests/27/diffs?diff_id=190&start_sha=a39d06f0cbf181178cd98299ac79265e96578068)
root commented 2026-10-14 15:46:23 +00:00 (Migrated from gitlab.core-project.space)

changed the description

changed the description
root commented 2026-10-14 15:55:36 +00:00 (Migrated from gitlab.core-project.space)

marked this merge request as ready

marked this merge request as **ready**
root commented 2026-10-14 15:56:45 +00:00 (Migrated from gitlab.core-project.space)

added 15 commits

  • c0a41f20...3f38e1b4 - 2 commits from branch main
  • 3f38e1b4...f09ab089 - 3 earlier commits
  • 0f990f14 - fix(front): lay the account page's tabs beside the section from md
  • 93cedf86 - feat(front): filter My games by result with counts, and page through every Game
  • 72e84b12 - feat(front): lead the navigation with New game, My games once owned, the account in a menu
  • f298e4ff - test(e2e): reach the account page from the Username menu before deleting the Account
  • 58d7de47 - fix(front): keep an overflowing tab row from clipping its first tab
  • e60fd920 - refactor(front): read the Account again at a Game's end from the Room view, given an options object
  • 86bf5c99 - test(front): render the auth and games pages on one routes harness, and name the nav's placement
  • 7abece09 - refactor(front): share the account and My games page frame, and branch on unions exhaustively
  • a5d7c300 - fix(front): keep the devtools trigger off the Room's Leave button
  • 484481ee - test(e2e): read the chosen filter by its role, and name Delete account once

Compare with previous version

added 15 commits <ul><li>c0a41f20...3f38e1b4 - 2 commits from branch <code>main</code></li><li>3f38e1b4...f09ab089 - 3 earlier commits</li><li>0f990f14 - fix(front): lay the account page&#39;s tabs beside the section from md</li><li>93cedf86 - feat(front): filter My games by result with counts, and page through every Game</li><li>72e84b12 - feat(front): lead the navigation with New game, My games once owned, the account in a menu</li><li>f298e4ff - test(e2e): reach the account page from the Username menu before deleting the Account</li><li>58d7de47 - fix(front): keep an overflowing tab row from clipping its first tab</li><li>e60fd920 - refactor(front): read the Account again at a Game&#39;s end from the Room view, given an options object</li><li>86bf5c99 - test(front): render the auth and games pages on one routes harness, and name the nav&#39;s placement</li><li>7abece09 - refactor(front): share the account and My games page frame, and branch on unions exhaustively</li><li>a5d7c300 - fix(front): keep the devtools trigger off the Room&#39;s Leave button</li><li>484481ee - test(e2e): read the chosen filter by its role, and name Delete account once</li></ul> [Compare with previous version](/amaurycoudr/chess-project/-/merge_requests/27/diffs?diff_id=192&start_sha=c0a41f20b608f5696e922e2ed0c22e7d7ad6523c)
root (Migrated from gitlab.core-project.space) merged commit into main 2026-10-14 16:05:07 +00:00
root commented 2026-10-15 21:19:13 +00:00 (Migrated from gitlab.core-project.space)

mentioned in merge request !537

mentioned in merge request !537
Sign in to join this conversation.
No description provided.