Repository navigation
Description
Task
T-112b· Milestone M8 — Dashboard · Size M · Priority P1 · Epic #8Implements FR-DSH-006 · FR-EXP-002
Branch
feat/t-112b-comparison-page-discovery-curves-with— one task = one branch = one PR (doc 32 §6)
Summary
Implement features/trials/comparison per doc 13 §3.7 using /experiments/{id}/comparison: per-strategy discovery curves with bands, box plots per metric, stats table (median, IQR, p, p_Holm, Â12 + verbal effect), editable threats-to-validity notes.
Context / motivation
Shows the research result honestly (all strategies, all metrics).
Scope
In scope
- Verbal effect thresholds (negligible/small/medium/large) from the API, not hard-coded.
Implementation guidance
features/trials/comparison/ComparisonPage.tsxfromuseExperimentComparison(id)(doc 12 §3.5):DiscoveryBands(Plotly scatter withfill: 'tonexty'bands per strategy),MetricBoxes(a box plot per metric),StatsTable(metric, strategy pair, median, IQR, p, p_Holm, Â12 + verbal effect from the API),KaplanMeier(step lines for MET-03) andThreatsNotes(textarea saved via PATCH experimentnoteswith If-Match).- Colour per strategy from an ordinal colour-blind-safe token palette (
strategy-1…8in tokens.json). - Export report button → the T-113b flow.
- 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
- Fixture comparison renders all metrics; stats table sortable.
- All strategies and all metrics displayed (test).
- Notes save with optimistic concurrency.
- 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
features/trials/comparison/*.test.tsx.
Dependencies
Blocked by: #177 (T-110b), #180 (T-112a)
Blocks: #188 (T-114)
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/features/trials/comparison/**
Independent folder.
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-112b (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.7 · doc 12 §3.5 · doc 19 §5
Requirements: FR-DSH-006 · FR-EXP-002 (traceability: doc 28)
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsBacklog
Activity
Build Risk Atlas and Trials dashboard (#305)
feat(trials): add comparison charts and HTML report export (T-112b) (#…
CodewithJha commentedon Nov 22, 2026
Shipped on main (merged PR).
fix(trials): retain responsive comparison chart height (T-112b) (#319)
feat(api): complete risk, replay and durable reports (T-082/T-084) (#318
fix(reporting): share the API comparison with offline reports (T-084a) (