3.4 KiB
3.4 KiB
Implementation Plan: Internal Match Game Analysis P0/P1
Overview
Deliver three independently verifiable slices: P0 existing-data UI, P1-A timeline checkpoints and lane comparison, and P1-B unified notable events. Preserve the existing detail endpoint and use builder/cache versioning to refresh old projections.
Task List
Phase 1: P0 Existing Data
- Add tested objective normalization, chart markers, an accessible event list, and move game flow above the detail tabs.
- Add a complete objective comparison strip with conservative dragon-type fallback behavior.
- Label KP and add participant gold/GPM to the combined CS/economy presentation.
Checkpoint: P0
- Web tests, lint, and production build pass.
- Desktop and mobile layouts retain all existing scoreboard/build behavior.
Phase 2: P1-A Lane Checkpoints
- Parse the remaining participant event identifier fields and project tested participant checkpoints at 10 and 15 minutes.
- Persist and expose optional checkpoint fields, reject stale caches, and bump the match-stats builder/detail-response versions.
- Replace final-state lane comparisons with tested role-based 10/15-minute GD/CSD/XPD and K/D/A comparisons.
Checkpoint: P1-A
- Focused API tests and builds pass.
- Web tests and production build pass.
- Short and missing-timeline games show unavailable states rather than zeros.
Phase 3: P1-B Unified Events
- Project objectives, champion kills, towers, and inhibitors into a deterministic tested event stream.
- Expose
timelineEventswhile retainingobjectiveEventscompatibility and bump persisted/cache versions as required. - Add accessible event filtering and chart selection with objective-only fallback.
- Coalesce concurrent hydration and short-cache incomplete results so transient failures retry without rebuilding on every sequential page request.
Checkpoint: Complete
- API and web focused suites pass without skipped tests.
- API and web production builds pass.
- Responsive runtime review passes at 320px, 390px, 768px, 1024px, and 1440px.
- P0/P1 edits exclude unrelated Competition/bracket modifications already in the shared worktree.
Risks and Mitigations
| Risk | Impact | Mitigation |
|---|---|---|
| Missing or delayed Riot frames misrepresent @10/@15 | High | Use only a frame at/before the target within one frame interval and expose its actual timestamp. |
| Building events attribute the destroyed team's side as the scorer | High | Prefer killer participant side; otherwise invert the destroyed teamId; cover both paths in tests. |
| Old cached shapes hide new fields | High | Increment builder and response cache versions and strengthen completeness validation. |
| A kill-heavy game makes the page excessively long | Medium | Add event-category filters and a bounded scroll region. |
| Mobile chart remains hard to reach | Medium | Move flow directly below the summary before any participant cards. |
| Existing dirty work is accidentally included | High | Restrict edits and verification to the named game-analysis files and inspect the final diff by path. |
Dependencies
P0 event normalization -> P0 objective strip
P1 checkpoint projector -> response contract -> lane UI
P1 checkpoint identifiers -> event projector -> response contract -> event UI
Open Questions
None.