Repository navigation
feat(scout-for-lol): add the Server page to the app - #5452
Conversation
|
This change is part of the following stack: Change managed by git-spice. |
|
Automatic reviews are disabled for this repository. Configure in Code Review Settings. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
6e2082e to
25deeb6
Compare
25deeb6 to
a2c1195
Compare
|
@codex review Automated re-review request for |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Why The redesign's Server page had an endpoint (`consumerGuild.server`) and an approved design (D11-Server) but no page. A server's ladder, its week's awards, its duos and what it plays were not visible anywhere in the app. What - `/servers/:guildId` shows one Discord server: hero (name, who leads and at what rank, head count and where the viewer stands, everyone as initials), the ladder with "See all N", the week's awards (an award nobody earned is hidden), what the server plays, and the best duos with a win/loss tally. It sits under the existing consumer access; the server decides scope, and a server outside it gets a "not available" state, not a retry. - The route is `/servers`, not `/g` (the admin workspace) and not under `/halls` or `/duels`, which are named for what they show. `serverPath()` is exported from `lib/server/server-path.ts` for Home and Player to link here. - Preload-only loader, `Loaded.strict`, `server_page_opened` analytics event and `/servers/:guildId` path normalisation. - View logic in `lib/server/` (hero lines, division gap, award lines, duo names and tally) with default-tier tests, plus view, loader and route tests. - `FriendRow` and `Sticker` take an `onClick` so a router can take over their anchors; `useSpaLink` is the hook the Player PR adds, unchanged. - Design audit: `server` joins the matrix as a golden route (16 goldens). The page checks now wait for network idle before the image snapshot: a page that reads the report lake mounts after the chrome is visible, which made the image check fail on a different case each run. Verification - app, design-system and design-audit: build, typecheck, test, lint (turbo). - `bun run jscpd`, `bun run check-directory-file-counts`. - Design audit, 18 `server` cases (axe, contrast, keyboard, layout, images) against an isolated Postgres boot. - Not run: live beta behaviour; the extended tier (no extended steps in the touched workspaces). Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
a2c1195 to
54fd143
Compare
Why
The redesign's Server page had an endpoint (
consumerGuild.server, #5397) and an approved design (D11-Server) but no page. A server's ladder, its week's awards, its duos and what it plays were not visible anywhere in the app.What
/servers/:guildIdshows one Discord server: hero (name, who leads and at what rank, head count and where the viewer stands, everyone as initials), the ladder with "See all N", the week's awards, what the server plays, and the best duos with a win/loss tally. An award nobody earned is hidden; an empty server shows its name and a head count only. A server outside the viewer's reach gets a "not available" state, not a retry./servers/:guildId, not/g/:guildId(the admin workspace) and not under/hallsor/duels, which are named for what they show. The mockup sidebar also calls them "Servers". It sits under the consumer workspace, so it inheritsscout-consumer-player-profiles-enabled.serverPath(guildId)inapp/src/lib/server/server-path.ts, for Home and Player to link here. Those pages are not edited.Loaded.strict,server_page_openedanalytics event, and/servers/:guildIdpath normalisation.serversis deliberately not added toanalyticsContextRoute: that gate waits on a guild context registration this page never makes.app/src/lib/server/(hero lines, divisions or LP behind, award lines, duo names, tally) with default-tier tests, plus view, loader and route-registration tests.FriendRowandStickertake anonClickso the router can take over their anchors, anduseSpaLinkis added. These are byte-identical to the same changes in feat(scout-for-lol): redesign the in-app Player and Players pages #5400 and drop out on restack if feat(scout-for-lol): redesign the in-app Player and Players pages #5400 lands first.serverjoins the matrix as a golden route (16 goldens; 684 to 702 cases). The page checks now wait for network idle before the image snapshot: a page that reads the report lake mounts after the chrome is visible, and the image check otherwise failed on a different case each run. The endpoint's seed block already has what the page needs.Left out because the endpoint does not provide it: the order of a duo's games (the tally shows wins first, then losses, scaled to at most 12 dots), and a server list in the sidebar (existing chrome, untouched).
Demo
Implementation compared with the D11 mockup (the mockup has no 390 light capture). The seeded server is "Dev Guild 1", so names and numbers differ from the mockup's "Rift Study Group".
1440 dark
1440 light
390 dark
390 light (no mockup capture)
Verification
bunx turbo run build typecheck test lint --filter=@scout-for-lol/app --filter=@scout-for-lol/design-system --filter=@scout-for-lol/design-audit: 36 of 36 tasks passed (777 app tests, 127 design-system tests).bun run jscpd,bun run check-directory-file-counts,bunx lefthook run pre-commit: pass.servercases (axe, contrast, keyboard, layout, images) with--workers=1against an isolated Postgres boot: 18 of 18 passed in five consecutive runs after the page-check change below; goldens unchanged by the rebase onto main. With parallel workers a different case fails the image-load check on each run, on the Vite dev server; CI runs one worker.bun run jscpdandcheck-directory-file-countsflag one clone and one directory inpackages/temporalthat come from main (fixed upstream by test(temporal): unblock main verify after the SeaweedFS lifecycle enforcer (#5373) #5446); nothing from this change. The commit ran lefthook withLEFTHOOK_EXCLUDE=jscpdfor that reason.🤖 Generated with Claude Code
https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y