Skip to content

[T-088a] Campaign console: header controls, progress panel, discovery curve (live) #171

Closed

Description

@CodewithJha

Task T-088a · Milestone M8 — Dashboard · Size M · Priority P0 · Epic #8

Implements FR-DSH-002

Branch feat/t-088a-campaign-console-header-controls-progress — one task = one branch = one PR (doc 32 §6)

Summary

Implement features/console/ top half per doc 13 §3.3: name/strategy/backend/seed header with Pause/Resume/Cancel (pending state until server confirms), progress counters, phase, discovery curve (unique cases vs runs; optional random reference band), alert banner on alert SSE events.

Context / motivation

US-003/US-012: watch and control a running campaign.

Scope

In scope

  • Discovery curve as lightweight SVG (Plotly not needed here).

Implementation guidance

  • features/console/ConsolePage.tsx (tab console of /campaigns/:id) with header/CampaignHeader.tsx (name, strategy, backend, seed; Pause/Resume/Cancel shown per status; Cancel requires a confirmation dialog), progress/ProgressPanel.tsx (budget progress, PASS/FAIL/INVALID counts with verdict shapes, current phase), progress/DiscoveryCurve.tsx (SVG step line of unique cases vs runs; optional reference band from an experiment's random arm), and AlertBanner.tsx (alerts from the SSE store; dismissible; INFRA_UNHEALTHY links to runbook RB-01).
  • Commands via a useCampaignCommand(id) mutation: pending state until 202 returns; on 409 show inline ProblemView and refetch the campaign.
  • Data: useCampaign(id), useCampaignProgress(id); SSE patches counters; the discovery curve appends on run.finished/mode.discovered.
  • 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

  • Live counters update from SSE within 2 s (MSW SSE).
  • Pause/Resume/Cancel flows incl. error handling.
  • Buttons reflect the allowed transitions from doc 12 §5 (parametrised test).
  • Alert banner appears on an alert event (MSW SSE).
  • Cancel confirmation is accessible (focus trap, Esc).
  • 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/console/*.test.tsx.

Dependencies

Blocked by: #165 (T-085d), #167 (T-086b)

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/features/console/header/**
  • web/src/features/console/progress/**

Parallel with T-088b (different subfolder).

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-088a (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.3 · doc 12 §5 · doc 14 §6 · doc 30 §RB-01

Requirements: FR-DSH-002 (traceability: doc 28)

Activity

  1. added this to the M8 — Dashboard milestone on Nov 19, 2026
  2. added a commit that references this issue on Nov 22, 2026
    996eb54
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 dashboardmilestone:M8M8 — Dashboardpriority:P0Critical path / blocks otherssize:M1-3 daystaskChild task of a milestone epictype:featureNew functionality

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions