Repository navigation
Description
Task
T-089c· Milestone M8 — Dashboard · Size S · Priority P0 · Epic #8Implements FR-DSH-005
Branch
feat/t-089c-timelinechart-component-synced-cursor-across— one task = one branch = one PR (doc 32 §6)
Summary
Implement components/TimelineChart (SVG line charts: clearance with d_safe, localisation error with e_max, cmd_v vs meas_v, Nav2 status band) and a shared cursor context that syncs hover across all timelines and the TrajectoryPlot ghost; wire into the Run entry page.
Context / motivation
Synced timelines are how engineers see when and why a failure happens.
Scope
In scope
- Threshold lines from the run's resolved oracle thresholds (not constants).
Implementation guidance
components/TimelineChart/TimelineChart.tsx: propsseries: {t: number[]; y: number[]; label; style}[],thresholds?: {value, label, style}[],bands?: {start, end, label, tone}[](Nav2 status band),cursorT?,onCursorChange?,yUnit.- SVG with small local linear scales (
scale.ts) instead of a heavy charting dependency; axis ticks via a nice-number algorithm (unit-tested). features/runs/cursor.ts:CursorContext(t,setT) shared by all timelines and the TrajectoryPlot; updates throttled to animation frames.features/runs/charts/RunTimelines.tsx: clearanced(t)withd_safe, localisation error withe_max,cmd_vvsmeas_v, Nav2 status band — threshold values from the run's resolved oracle thresholds in the Run DTO.- Accessible alternative: a "Show data table" toggle rendering downsampled values.
- Standards: respect the layering contracts (doc 16 §2) and conventions in doc 34; no hard-coded tunables — thresholds/defaults come from typed settings (doc 27); no magic numbers (ruff
PLR2004); public APIs typed (mypy strict) and documented.
Acceptance criteria
- Hover on one chart moves the cursor on all (test).
- Threshold lines come from API data.
- Cursor sync across 4 charts + trajectory (integration test).
- Thresholds come from the DTO (changing the fixture threshold moves the line).
- Tests listed below added and green in CI; coverage of new code meets the gate in doc 18 §3.
- Docs, config reference and CHANGELOG
Unreleasedupdated where behaviour, keys or interfaces changed. - Definition of Done (doc 32 §3) satisfied.
Tests required
components/TimelineChart/*.test.tsx.
Dependencies
Blocked by: #162 (T-085a), #174 (T-089b)
Blocks: #187 (T-118)
Parallelization notes
Files / paths owned by this task — avoid editing other paths; shared files (pyproject.toml entry points, cli/main.py, api/routers/__init__.py, router.tsx, docker/compose.yaml, ci.yml) are append-only:
web/src/components/TimelineChart/**web/src/features/runs/cursor.tsweb/src/features/runs/charts/**
Small.
Definition of Done
Per doc 32 §3 and AGENTS.md §5: lint, format, mypy strict and import-linter green; tests added and passing; docs updated; PR template completed with Closes #<this issue>; Conventional Commit messages referencing T-089c (doc 16 §6); commits authored only by the repository owner identity (AGENTS.md §4); CI green; reviewer checklist (doc 32 §5.1) satisfied.
References
Design docs: doc 13 §3.4 · doc 07 §1
Requirements: FR-DSH-005 (traceability: doc 28)
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsBacklog
Activity