Skip to content

[T-112b] Comparison page: discovery curves with 95 % bands, box plots, statistics table, threats notes #181

Closed

Description

@CodewithJha

Task T-112b · Milestone M8 — Dashboard · Size M · Priority P1 · Epic #8

Implements 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.tsx from useExperimentComparison(id) (doc 12 §3.5): DiscoveryBands (Plotly scatter with fill: '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) and ThreatsNotes (textarea saved via PATCH experiment notes with If-Match).
  • Colour per strategy from an ordinal colour-blind-safe token palette (strategy-1…8 in 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 Unreleased updated 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)

Activity

  1. added this to the M8 — Dashboard milestone on Nov 19, 2026
  2. CodewithJha commented on Nov 22, 2026

    @CodewithJha
    OwnerAuthor

    Shipped on main (merged PR).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:dashboardReact web dashboardarea:experimentsExperiment runner and EXP-xx protocolsmilestone:M8M8 — Dashboardpriority:P1Required for milestone exitsize:M1-3 daystaskChild task of a milestone epictype:featureNew functionality

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions