feat(web): redesign team progress experience

This commit is contained in:
dahyeon committed 2026-07-13 21:40:01 -07:00
1 parent 81b951889f
commit bb32c26694
7 files changed
+973 -183

No files matched your search

+22 -18
View File
@@ -13,8 +13,8 @@ metadata, outcome categories, and code expiry.
into a pure module that the existing Node test runner can exercise.
- Compose the active-Series card with code rows instead of maintaining a separate
page-wide code grid.
- Reuse existing Competition history result and score helpers instead of creating
a second interpretation of adjudicated outcomes.
- Keep the team page's Series presentation in a page-specific card so shared
bracket/history layouts are unaffected; exhaustively test its outcome mapping.
- Use one responsive layout and native disclosure/table semantics rather than
separate desktop and mobile component trees.
@@ -22,30 +22,30 @@ metadata, outcome categories, and code expiry.
### Phase 1: Tested View Model
- [ ] Add failing tests for Series/code grouping, stable ordering, Korean round
- [x] Add failing tests for Series/code grouping, stable ordering, Korean round
labels, code availability/expiry, unique copy labels, and explicit clipboard
results.
- Acceptance: the new focused test fails because the behavior is not implemented.
- Verify: `pnpm --filter web exec node --test --experimental-strip-types test/match-team-progress-view.test.ts`
- Files: `apps/web/test/match-team-progress-view.test.ts`
- [ ] Implement the minimal pure view helpers.
- [x] Implement the minimal pure view helpers.
- Acceptance: all focused assertions pass without React or DOM mocks.
- Verify: rerun the focused command once after implementation.
- Files: `apps/web/src/pages/match-team-progress-view.ts`
### Checkpoint: View Model
- [ ] Focused tests pass and no API/contract file changed.
- [x] Focused tests pass and no API/contract file changed.
### Phase 2: Series Semantics and Code Interaction
- [ ] Update the shared Series card to prefer supplied human labels, show technical
codes secondarily, and hide misleading pre-start/adjudicated scores.
- [x] Add a page-specific Series card that prefers supplied human labels, shows
technical codes secondarily, and hides misleading pre-start/adjudicated scores.
- Acceptance: ready and adjudicated cards show `—`; result categories remain
text-visible; bracket geometry stays unchanged.
- Verify: `pnpm --filter web test`
- Files: `apps/web/src/components/competition/SeriesScoreCard.tsx`
- [ ] Add the responsive tournament-code list with accessible clipboard feedback.
- Files: `apps/web/src/components/competition/TeamSeriesCard.tsx`
- [x] Add the responsive tournament-code list with accessible clipboard feedback.
- Acceptance: code rows show local set number first, full selectable codes,
unique 44px copy controls, expiry/state text, and success/failure announcements.
- Verify: TypeScript build plus runtime keyboard/copy check.
@@ -53,16 +53,16 @@ metadata, outcome categories, and code expiry.
### Checkpoint: Interaction
- [ ] Full web tests pass and the web build succeeds.
- [x] Full web tests pass and the web build succeeds.
### Phase 3: Page Hierarchy and Polish
- [ ] Reorder the page and integrate code rows with matching active Series.
- [x] Reorder the page and integrate code rows with matching active Series.
- Acceptance: order is next match, roster, recent results; every code appears
under exactly one matching Series; empty states remain meaningful.
- Verify: desktop and mobile runtime screenshots.
- Files: `apps/web/src/pages/MatchTeamProgressPage.tsx`
- [ ] Compact and order the roster, and collapse results beyond the newest two.
- [x] Compact and order the roster, and collapse results beyond the newest two.
- Acceptance: position labels are Korean and role-ordered, captain is adjacent,
and older results remain keyboard-accessible.
- Verify: 320/768/1024/1440px reflow and keyboard traversal.
@@ -70,10 +70,14 @@ metadata, outcome categories, and code expiry.
### Checkpoint: Complete
- [ ] Focused and full tests pass without skips.
- [ ] Lint and build pass.
- [ ] Runtime review confirms no console errors or horizontal overflow.
- [ ] Final diff contains only the spec, plan, focused tests, and team-progress UI.
- [x] Focused (9) and full web tests (87) pass without skips.
- [x] Scoped lint and the production build pass.
- [ ] Full repository lint passes. It is currently blocked by pre-existing errors
outside the team-progress scope.
- [ ] Runtime review confirms no console errors or horizontal overflow. The
required in-app browser was unavailable in this session.
- [x] The scoped implementation contains only the spec, plan, focused tests, and
team-progress UI; unrelated concurrent worktree changes are excluded.
## Risks and Mitigations
@@ -84,13 +88,13 @@ metadata, outcome categories, and code expiry.
| Adjudication looks like a played 0–0 | High | Reuse tested outcome/score helpers from Competition history. |
| Clipboard permissions fail silently | Medium | Return a typed result and render an alert with manual-selection guidance. |
| Long codes overflow at mobile widths | Medium | Use `minmax(0,1fr)`, `break-all`, selectable text, and a stacked mobile row. |
| Shared Series card changes bracket dimensions | Medium | Preserve the bracket variant's fixed geometry and compact metadata treatment. |
| Page-specific result semantics drift | Medium | Cover every lifecycle/outcome branch in the pure presentation tests. |
## Dependencies
```text
View-model tests -> view helpers -> code component -> page composition
Existing history outcome helpers -> Series score semantics -> recent results
Exhaustive Series outcome tests -> page-specific score semantics -> recent results
```
## Open Questions
+20 -7
View File
@@ -53,8 +53,8 @@ accessible and explicit.
labels, code state, and copy-result behavior.
- `apps/web/src/components/competition/TeamTournamentCodes.tsx` owns code rows and
clipboard feedback.
- `apps/web/src/components/competition/SeriesScoreCard.tsx` remains the shared
Series summary while respecting pre-start and adjudicated score semantics.
- `apps/web/src/components/competition/TeamSeriesCard.tsx` owns the page-specific
Series summary, leaving bracket/history card geometry and behavior unchanged.
- `apps/web/test/match-team-progress-view.test.ts` specifies the new pure behavior.
## Code Style
@@ -82,11 +82,12 @@ high-contrast base-content color.
ordering before adding the UI.
- Test Korean round labels, code availability/expiry state, unique copy labels,
and explicit clipboard success/failure results as pure functions.
- Reuse existing tested Competition history helpers for adjudicated result labels
and score visibility.
- Test every page-specific Series lifecycle/outcome branch, including played and
administrative draws, so the local summary cannot drift silently.
- Run the complete web suite, lint, and build after the focused tests pass.
- Runtime verification covers 320px, 768px, 1024px, and 1440px; keyboard focus,
copy announcements, long-code reflow, and console output are checked manually.
- When the in-app browser is available, runtime verification covers 320px, 768px,
1024px, and 1440px; keyboard focus, copy announcements, long-code reflow, and
console output are checked manually.
## Boundaries
@@ -126,7 +127,19 @@ high-contrast base-content color.
marker close to the player name.
- At most two recent results are expanded by default; older results are available
through a keyboard-accessible disclosure.
- Focused and full tests, lint, build, and responsive runtime review pass.
- Focused and full tests, scoped lint, and build pass. Responsive runtime review is
recorded separately when the in-app browser is available.
## Verification Record
- Focused view-model tests: 9 passed.
- Full web suite: 87 passed without skips.
- Scoped ESLint for all team-progress files: passed.
- Production TypeScript/Vite build: passed; only the existing large-chunk warning
remains.
- Full repository lint remains blocked by pre-existing errors in unrelated files.
- Runtime screenshot/keyboard verification was not claimed because the required
in-app browser was unavailable in this session.
## Open Questions