Files
lolympus-tournament-support/docs/plans/team-progress-page-ux-refresh.md
T

117 lines
5.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Implementation Plan: Team Progress Page UX Refresh
## Overview
Deliver the redesign in three verifiable slices: tested presentation rules, shared
Series semantics, and the integrated page/copy experience. No API or dependency
change is required because the team view already exposes `seriesId`, ordinal, round
metadata, outcome categories, and code expiry.
## Architecture Decisions
- Keep API/query ownership in the page and move deterministic presentation logic
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.
- Keep the team page's Series presentation in a page-specific card so shared
bracket/history layouts are unaffected; exhaustively test its outcome mapping.
- Reuse the bracket's canonical round-label helper so the bracket and team detail
cannot drift to different visible match names.
- Use one responsive layout and native disclosure/table semantics rather than
separate desktop and mobile component trees.
## Task List
### Phase 1: Tested View Model
- [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`
- [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
- [x] Focused tests pass and no API/contract file changed.
### Phase 2: Series Semantics and Code Interaction
- [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/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.
- Files: `apps/web/src/components/competition/TeamTournamentCodes.tsx`
### Checkpoint: Interaction
- [x] Full web tests pass and the web build succeeds.
### Phase 3: Page Hierarchy and Polish
- [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`
- [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.
- Files: `apps/web/src/pages/MatchTeamProgressPage.tsx`
### Phase 4: Bracket Naming Alignment
- [x] Reuse canonical bracket round labels in the team-detail view model.
- Acceptance: upper round 1 displays `브래킷 1R`, later upper rounds display
`브래킷 상위 nR`, lower rounds display `브래킷 하위 nR`, and multi-match
rounds keep the `· n경기` suffix.
- Verify: focused view-model test, full web suite, scoped lint, and build.
- Files: `apps/web/src/components/competition/double-elimination-bracket-layout.ts`,
`apps/web/src/pages/match-team-progress-view.ts`, and
`apps/web/test/match-team-progress-view.test.ts`
### Checkpoint: Complete
- [x] Focused (9) and full web tests (88) 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
| Risk | Impact | Mitigation |
|---|---|---|
| A code appears under the wrong Series | High | Join only on exact `seriesId` and cover opponent/other-Series codes in tests. |
| Global and local game numbers are confused | High | Lead with `ordinal` as set number and demote `displayNumber`. |
| 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. |
| 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
Exhaustive Series outcome tests -> page-specific score semantics -> recent results
```
## Open Questions
None.