diff --git a/documentations/refactor/24-phase-16-live-timing-polish.md b/documentations/refactor/24-phase-16-live-timing-polish.md new file mode 100644 index 0000000..d3ac5a9 --- /dev/null +++ b/documentations/refactor/24-phase-16-live-timing-polish.md @@ -0,0 +1,43 @@ +# Phase 16: Live Timing Polish + +## Goal + +Improve the React Live Timing route as an operations screen while preserving the +existing official F1 SignalR bridge and TUI live behavior. + +## Completed Scope + +- Added pure helpers for position delta styling and race-control flag classes. +- Improved the timing tower with podium position styling, colored position + deltas, best-lap/lap-count columns, and compact status badges. +- Reworked the session banner so track status, lap count, clock, live/stale + state, and weather read as dense operational metadata. +- Improved race-control feed treatment with color-coded flag badges, category + labels for non-flag messages, and bounded scrolling. +- Reworked the live route layout into a two-column desktop view with timing + tower priority and race control alongside it. +- Improved empty and disconnected states without requiring a real live F1 + session. + +## Constraints + +- No backend live bridge or TUI live code was changed. +- No persisted live storage was added. +- Tests continue to use disabled-live/empty-state coverage because an active F1 + session is not guaranteed. + +## Verification + +```bash +npm --prefix frontend test -- --run +npm --prefix frontend run build +npm run test:e2e +npm run test:e2e:prod +npm run test:visual +npm run test:visual:prod +``` + +## Related + +- [21 MVP Completion Checklist](21-mvp-completion-checklist.md) +- [23 Phase 15 Command Center](23-phase-15-command-center.md) diff --git a/documentations/refactor/README.md b/documentations/refactor/README.md index a12a162..d1acbf2 100644 --- a/documentations/refactor/README.md +++ b/documentations/refactor/README.md @@ -81,6 +81,8 @@ not implementation tickets yet. screenshot coverage for MVP routes and responsive viewports. - [23 Phase 15 Command Center](23-phase-15-command-center.md): default Web entry screen for local coverage, weekend focus, live status, and next actions. +- [24 Phase 16 Live Timing Polish](24-phase-16-live-timing-polish.md): denser + React live timing layout, status treatment, and race-control polish. ## External References diff --git a/frontend/src/components/live/RaceControlFeed.tsx b/frontend/src/components/live/RaceControlFeed.tsx index da270ed..b667821 100644 --- a/frontend/src/components/live/RaceControlFeed.tsx +++ b/frontend/src/components/live/RaceControlFeed.tsx @@ -1,5 +1,5 @@ import type { LiveRCMessage } from '../../types' -import { latestRaceControl } from '../../lib/live' +import { latestRaceControl, rcFlagClass } from '../../lib/live' interface Props { messages: LiveRCMessage[] @@ -17,13 +17,18 @@ export function RaceControlFeed({ messages }: Props) { {latest.length === 0 ? (
- {[session?.SessionName, session?.CircuitName].filter(Boolean).join(' · ') || 'F1 live feed'} -
++ {[session?.SessionName, session?.CircuitName].filter(Boolean).join(' · ') || 'F1 live feed'} +
+| Pos | @@ -28,12 +42,15 @@ export function TimingTower({ snapshot }: Props) {Tyre | Last Lap | Gap | -Best | +Best | +Laps | |||
|---|---|---|---|---|---|---|---|---|---|
| {row.Position} | -{positionDelta(driver)} | +{row.Position} | +{delta} |
{driverCode(row)}
{row.RacingNumber}
{driver.InPit && PIT}
- {driver.Retired && OUT}
+ {driver.PitOut && !driver.InPit && OUT}
+ {driver.Retired && RET}
+ {driver.KnockedOut && KO}
+ {driver.Cutoff && !driver.KnockedOut && CUT}
+ {driver.OnFlyingLap && FL}
|
@@ -61,7 +82,10 @@ export function TimingTower({ snapshot }: Props) { {driver.LastLapTime || '-'} | {driver.GapToLeader || driver.Interval || '-'} | -{driver.BestLapTime || '-'} | ++ {driver.BestLapTime || '-'} + | +{driver.NumberOfLaps || '-'} |