Skip to content

[T-110a] Casebook: case cards grid with ranges, rule, interaction badge, status chip, rename and actions #176

Closed

Description

@CodewithJha

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

Implements FR-DSH-003 · PR-06

Branch feat/t-110a-casebook-case-cards-grid-with — one task = one branch = one PR (doc 32 §6)

Summary

Implement features/casebook/ per doc 13 §3.5: case cards (code, label with optimistic rename via If-Match, class/size, characteristic ranges on parameter tracks, best rule with precision/support, interaction badge, reproducibility), status chip, actions (Medoid run, Minimal scenario, Replay ×5, Export, Confirm interaction).

Context / motivation

US-004/005/018: the catalogue of distinct failure modes.

Scope

In scope

  • 412 conflict handling on rename (refetch + message).

Implementation guidance

  • features/casebook/cards/CasebookGrid.tsx (tab casebook): responsive grid of CaseCard from useModes(campaignId); filters for status and primary class; sort by size or first seen.
  • CaseCard per doc 13 §3.5: header with code, primary class and size; label with inline rename (RenameField: optimistic setQueryData, rollback on error, 412 ⇒ refetch + toast "Changed elsewhere"); characteristic parameter tracks (range bar over the full range with physical labels); best rule with precision/support; interaction badge (CONFIRMED ×order / NOT_INTERACTION / INCONCLUSIVE / pending); reproducibility (from replay stats if available); status chip menu (open/accepted/fixed/duplicate; duplicate asks for the target code).
  • Actions: Medoid run, Minimal scenario (navigate to run), Replay ×5 (mutation), Export (scenario.yaml of the minimal run), Confirm interaction (POST; pending until campaign.updated).
  • Provisional modes (small-n fallback) are visibly marked "provisional".
  • 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

  • Fixtures with 3 modes render; rename optimistic + rollback on error.
  • Optimistic rename + rollback tested.
  • Status change sends If-Match.
  • Provisional badge rendered for fallback modes.
  • 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/casebook/cards/*.test.tsx.

Dependencies

Blocked by: #165 (T-085d), #166 (T-086a)

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/casebook/cards/**

Parallel with T-110b.

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-110a (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.5 · doc 12 §2 · doc 09 §3.3

Requirements: FR-DSH-003 · PR-06 (traceability: doc 28)

Activity

  1. added this to the M8 — Dashboard milestone on Nov 19, 2026
  2. added 2 commits that reference this issue on Nov 22, 2026
    0e39f24
    9581c15
  3. 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 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