Skip to content

feat(scout-for-lol): redesign the in-app Player and Players pages - #5400

Open
shepherdjerred wants to merge 4 commits into
scout-pages-championsfrom
scout-pages-player
Open

shepherdjerred wants to merge 4 commits into
scout-pages-championsfrom
scout-pages-player

Conversation

@shepherdjerred

@shepherdjerred shepherdjerred commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner

Why

The Player page was a five-tab admin profile and Players was a search box with cards. The Warm Friends design puts the person first: how their last games went, who they play with, what they are good at, and how the server sits.

Stacked on #5381 (Champions). That branch is based on a main from before #5308, so the new consumerPlayer.roster and the extended profileSummary are not in this stack until #5381 is restacked onto main; app typecheck needs that restack first.

What

  • /players: hero (who is in a game now, else the week's activity) with a real search, "Your friends" as FriendRows (latest game, rank, live dot) with server chips and See all, and a "You" panel. Search runs consumerPlayer.search and shows the roster's rows for what it finds. One lake query: consumerPlayer.roster.
  • /players/:id: hero (splash art, rank lockup, "Mid main in server", most played champions), Lately (record, streak, win rate, KDA, result strip), Recent games as sentences linking to the match with All/Ranked chips and a More filters sheet, Plays with, Best champions, This split climb, Highlights from the newest game, and More about folds (accounts, mastery, when they play, challenges). Reads profileSummary and matchHistory (lake) plus rankHistory (Postgres).
  • Preload-only loaders keyed on the URL filters, Loaded.strict reads, two analytics events. The old status/home access gate is gone; the consumer profiles flag still gates every read on the server.
  • GameSentenceRow and Sticker gain onClick, as FriendRow did, so rows stay anchors while the router takes the click.
  • The champions hero search is now the shared HeroSearch.
  • Rates are whole percents. The Player page starts on every game (no queue in the URL is All; Ranked is written out as its queues); the shared profile filters the Champions pages read keep their ranked default.
  • A seed fixture (separate file, wired in with one wrapper around the lake fact list) gives the audit player a Solo/Duo climb across the current split that ends on the rank they already have, an LP change on each recent solo game, and a quadra kill in the newest game.
  • Both routes join the design-audit matrix as golden routes (720 cases, 20 golden routes). The Player route uses SCOUT_DESIGN_AUDIT_PLAYER_ID (default 1, the first Player row of a fresh seed).

Left out because the endpoint has no field for it: lane rates, tips and tooltips, "Watch the lobby", Compare, "Looked at lately", best-game and first-blood highlights, lane in "Mid main" for sub-50% positions. "Find a lobby" and "Server community" leave the Players page; the Server and Live pages replace them. Old components (CombinedPerformance, ConsumerLobbySearch, ConsumerGuildCommunity and friends) stay.

Demo

Rendered through dev:design-audit in PinchTab on isolated ports (design-audit seed: one server, the viewer plus seven friends).

Players

Before (1440, dark) After (1440, dark)
Before (1440, light) After (1440, light)
Before (390, dark) After (390, dark) Before (390, light) After (390, light)

Player

The old Player page re-enters its "Checking profile access" and "Loading player profile" states whenever the browser viewport is emulated or resized (its access query is staleTime: 0 with a refetch on every mount), so only one loaded "before" frame could be captured: dark at the default desktop viewport. The after frames cover all four combinations.

Before (desktop, dark) After (1440, dark)
After (1440, light) After (390, dark) After (390, light)

The More filters sheet (games window and queues):

The after frames now show the "This split" climb (Silver I to Gold II, "Reached Gold"), an LP change on each recent solo game, a Highlights sticker ("Quadra kill as Ahri") and whole percentages, with Recent games opening on All. The seed fixture behind them is in design-audit-player-page-fixture.ts.

The Players page's "Dec 31" rows (Quillon, Halcyon, TidalWren) are real timestamps, not a missing one: the champion fixture dates their games 2026-01-01 minus a few hours, which is more than a week before "now", so the row reads as a date. A zero or missing time now throws instead of printing a 1970 date, and a date in another year says the year ("Dec 31, 2025"):

Verification

Second commit (review fixes): app typecheck, lint, 820 tests; backend typecheck, lint and the fixture's 7 tests; both routes' 32 goldens regenerated and compared green in the pinned image. The other golden routes were not compared against the changed seed: their committed goldens predate the #5308 friends fixture, so they cannot match on this stack. The seed change leaves the audit player's current rank unchanged, so rank-showing pages should not move. A local restack check (this branch onto the champions branch rebased onto main) applied cleanly, including the seed wiring, and the seed wrapper skips the climb when the player has no recent solo game, so it also runs on the old base.

First commit:

  • bunx turbo run build typecheck --filter=@scout-for-lol/app --filter=@scout-for-lol/design-system --filter=@scout-for-lol/design-audit: pass.
  • app eslint + check-architecture, design-system eslint, design-audit eslint: clean. app vitest: 103 files, 812 tests pass; design-system rows (25) and design-audit (15) pass.
  • bun run jscpd: ratchet passed. bun run check-directory-file-counts: no new over-limit directory. bunx lefthook run pre-commit: pass.
  • Rendered in PinchTab through dev:design-audit on isolated ports (backend 3611, SPA 5611, own Postgres) at 1440 and 390, dark and light.
  • design-audit Playwright (axe, contrast, keyboard, goldens) for both routes in the pinned mcr.microsoft.com/playwright image: 32 goldens written, comparison run green case by case (a few consumer-player cases failed "images must load" in some full runs, a flake of the container-to-host forwarder; each passed on an isolated rerun, and no screenshot comparison ever failed). The image ran as linux/arm64 on a Mac, not the CI amd64 host.
  • Extended tier: none of the touched workspaces has an extended step that applies.
  • Not run: live beta check; CI (needs feat(scout-for-lol): redesign the in-app Champions index and Champion pages #5381 restacked onto main first).

🤖 Generated with Claude Code

https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y

@shepherdjerred

Copy link
Copy Markdown
Owner Author

@greptile-apps

greptile-apps Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Automatic reviews are disabled for this repository. Configure in Code Review Settings.

@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • 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

@shepherdjerred
shepherdjerred force-pushed the scout-pages-player branch 2 times, most recently from 316572c to e19d7d3 Compare November 27, 2026 22:41
@shepherdjerred
shepherdjerred marked this pull request as ready for review December 3, 2026 04:50
@shepherdjerred
shepherdjerred force-pushed the scout-pages-player branch 2 times, most recently from 696564f to d1c6937 Compare December 3, 2026 06:47
shepherdjerred and others added 4 commits December 3, 2026 00:21
Why
The Player page was a five-tab admin profile and Players was a search box with
cards. The Warm Friends design puts the person first: how their last games
went, who they play with, what they are good at, and how the server sits.

What
- /players: hero (who is in a game now, else the week's activity) with a real
  search, "Your friends" as FriendRows (latest game, rank, live dot) with server
  chips and See all, and a "You" panel. Search runs consumerPlayer.search and
  shows the roster's rows for what it finds. Reads consumerPlayer.roster.
- /players/:id: hero (splash art, rank lockup, Mid main in server, most played
  champions), Lately (record, streak, win rate, KDA, result strip), Recent
  games as sentences linking to the match with All/Ranked chips and a More
  filters sheet, Plays with, Best champions, This split climb, Highlights
  from the newest game and More about folds (accounts, mastery, when they
  play, challenges). Reads profileSummary, matchHistory and rankHistory.
- Preload-only loaders keyed on the URL filters, Loaded.strict reads, two
  analytics events, and the old status/home access gate dropped: the consumer
  profiles flag still gates every read on the server.
- GameSentenceRow and Sticker gain onClick (as FriendRow did) so rows stay
  anchors while the router takes the click.
- The champions hero search moves to a shared HeroSearch.
- Both routes join the design-audit matrix as golden routes.

Left out because the endpoint has no field for it: lane rates, tips, tooltips,
Watch the lobby, Compare, Looked at lately, and best-game and first-blood
highlights. Find a lobby and Server community leave the Players page; the
Server and Live pages replace them.

Verification
- app, design-system, design-audit: typecheck, lint, tests, build;
  check-architecture, jscpd, directory file counts, lefthook pre-commit.
- Rendered in PinchTab through dev:design-audit at 1440 and 390, dark and light.
- design-audit Playwright (axe, contrast, keyboard, goldens) for both routes in
  the pinned Playwright image: 32 goldens written, comparison run green. The
  image ran as linux/arm64 on a Mac, not the CI amd64 host.
- Not run: live beta check; extended tier (no touched workspace has extended
  steps that apply).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
…ter and seed

Why
Review against the D11 mockups found whole percentages shown with a decimal,
Recent games opening on Ranked instead of All, and goldens that showed neither
the "This split" climb nor a Highlights sticker, because the audit seed had one
rank point and no multi-kill.

What
- Player page rates are whole percents ("Won 59%", "a 60% win rate") through
  one shared formatter.
- The Player page starts on every game: no queue in the URL is All, and Ranked
  is written out as its queues. The shared profile filters, which the Champions
  pages read, keep their ranked default.
- relativeWhen fails loudly on a zero or missing time instead of printing a
  1970 date; a test pins the seed's real "Dec 31" games as dates.
- Design-audit seed: a separate fixture gives the audit player a Solo/Duo
  climb across the current split that ends on the rank they already have (so
  no other page's rank changes), an LP change on each recent solo game, and a
  quadra kill in the newest game. It wraps the lake fact list, so it does not
  depend on the fixtures that built it, and skips the climb when the player has
  no recent solo game.
- Both routes' goldens are recaptured.

Verification
- app: typecheck, lint, 820 tests; backend: typecheck, lint, the fixture's
  7 tests; design-audit Playwright goldens for both routes regenerated in the
  pinned image (linux/arm64) and compared green.
- Not run: the other golden routes against the changed seed (local goldens for
  them predate #5308's friends fixture, so they cannot be compared on this
  stack); CI.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
Why
"Dec 31" for a game from 2025-12-31 reads as last month once the year has
turned. A date in another year needs its year.

What
- relativeWhen (and relativeWhenInline) print "Dec 31, 2025" when the year,
  read in UTC like the date itself, differs from now's; the current year
  keeps "Nov 17".

Verification
- app: typecheck, lint, 821 tests, including a test for a prior-year date and
  for the turn of the year.
- The design-audit Players goldens were regenerated against the new text in the
  pinned image; they compare equal inside the existing pixel tolerance, so no
  golden file changed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
Why: the Matchup and lane line change (#5441) made `lane` a required field of the Player summary, so the Player page fixture no longer typechecked on main.
What: the fixture's default summary reports the lane as unavailable; tests override it where they need a lane line.
Verification: app typecheck, lint and test:ci pass; design-audit routes test passes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant