feat: link competition games to detail analysis

Route each result-history Game by its global display number and preserve the Competition return target. Refuse stale detail fallbacks so a missing requested Game cannot silently show another Game.
This commit is contained in:
dahyeon committed 2026-07-13 10:41:44 +00:00
1 parent 3c60081ece
commit 3bd3120eb1
11 files changed
+382 -54

No files matched your search

+34 -3
View File
@@ -27,6 +27,16 @@ times, venues, replay links, or team logos.
- Group and format dates explicitly in `Asia/Seoul`.
- Keep individual Games in a native, keyboard-accessible disclosure below the Series
row.
- Make each disclosed Game row a real link to its internal-stat Game detail. Keep the
visible Series-local `ordinal`, but build the route from the globally unique
`displayNumber`.
- Preserve the current Competition page path in router state so the detail page can
return users to the same result view.
- Use the coral semantic primary token as an interaction cue on Game links (leading
edge, focus ring, subtle state background, and arrow), not as a winner or score
color.
- Scope that primary override to the result-history section so the exact coral remains
consistent in light and dark themes without changing unrelated dark-theme actions.
## Tech Stack
@@ -48,9 +58,13 @@ times, venues, replay links, or team logos.
- `apps/web/src/components/competition/competition-series-history.ts` derives the
stable, timezone-aware history view model without React.
- `apps/web/src/components/competition/CompetitionSeriesHistory.tsx` renders the
semantic date sections, responsive Series rows, and Game disclosures.
semantic date sections and responsive Series rows.
- `apps/web/src/components/competition/CompetitionGameHistory.tsx` renders the
disclosed, navigable Game rows and their responsive interaction states.
- `apps/web/src/components/competition/CompetitionResults.tsx` replaces the existing
completed-Game card grid with the new component.
completed-Game card grid with the new component and supplies the route context.
- `apps/web/src/lib/internal-match-game-selection.ts` keeps explicit Game-detail
routes from silently falling back to a different recorded Game.
- `apps/web/test/competition-series-history.test.ts` specifies aggregation, ordering,
outcome, and formatting behavior.
@@ -84,6 +98,10 @@ Develop the pure model test-first. Cover:
- exclusion of unstarted and orphan data;
- played, draw, walkover, forfeit, and administrative status semantics;
- deterministic tie-breaking and legacy zero-duration formatting.
- Game-detail route generation from `displayNumber`, including rejection of invalid
legacy display numbers.
- Exact internal Game selection, including a missing-result case when the requested
display number is absent from a stale or legacy detail payload.
After unit tests, run full web tests, changed-file lint, and the TypeScript/Vite build.
Review the markup for native keyboard interaction, heading order, visible status text,
@@ -97,6 +115,12 @@ and mobile layouts down to 320px.
winner; never infer identity from score, array position, or blue/red side.
- Keep game-less adjudications visible without presenting `0 : 0` as a played score.
- Omit `durationSeconds === 0` because it represents missing legacy data.
- Use `displayNumber`, never Series-local `ordinal`, for the internal Game URL.
- Keep each Game row as one semantic anchor with no nested interactive control.
- Keep link text readable in both themes; coral may indicate interaction but must not
be the only visible cue.
- Never substitute another Game when the Game number explicitly requested by the URL
is not present in the internal-stat payload.
- Preserve all unrelated working-tree changes.
### Ask First
@@ -123,7 +147,14 @@ and mobile layouts down to 320px.
timezone.
- The layout is readable without horizontal scrolling at 320px and uses the wider
double-elimination page naturally on desktop.
- Focused/full tests, lint, and web build pass without modifying unrelated work.
- Each recorded Game can be opened by pointer or keyboard, lands on its matching
internal-stat Game, and provides a return link to the Competition result page.
- A temporarily stale or inconsistent detail payload shows an explicit missing-Game
state rather than silently rendering the first Game.
- Game rows expose an always-visible detail cue and coral hover, active, and focus
affordances without changing winner semantics.
- Focused/full tests, changed-file lint, and web build pass without modifying
unrelated work.
## Open Questions