Skip to content

feat(api,ui): showcase-completion E2 — safe replay & workspace lifecycle (#408)#415

Merged
w7-mgfcode merged 6 commits into
devfrom
feat/showcase-completion-e2-safe-replay-lifecycle
Jun 12, 2026
Merged

feat(api,ui): showcase-completion E2 — safe replay & workspace lifecycle (#408)#415
w7-mgfcode merged 6 commits into
devfrom
feat/showcase-completion-e2-safe-replay-lifecycle

Conversation

@w7-mgfcode

Copy link
Copy Markdown
Owner

Summary

Implements epic #408 (umbrella #406) per PRPs/PRP-showcase-completion-E2-safe-replay-lifecycle.md:

  • Safe replay — every panel Replay now opens a confirmation dialog with a recorded-vs-sent config preview (buildReplayRequest is the single source for both the preview and the wire request). A reset=true workspace escalates to destructive copy + a destructive-styled "Replay & wipe database" button. No code path starts a replay without the dialog. This supersedes the E4 (feat(api,ui): showcase-workspace E4 — workspace restore/replay (list/load workspaces + replay through the run path) #393) "deliberately no confirm dialog" decision, as committed by feat(api,ui): showcase workspace completion — the forecastlab control story #406.
  • Lineage — replayed rows carry a replay badge; the loaded view renders the replayed_from_workspace_id ancestor chain (depth-capped at 5, deleted ancestors render "(original deleted)" — never an error), ancestors clickable.
  • Lifecycle panel — search (q), show-archived toggle, allow-listed sort, clickable tag chips, pin toggle, per-row dropdown (pin / archive / edit details / delete), rename/notes/tags editor over the E1 PATCH endpoint.
  • Server-side list filtersGET /demo/workspaces gains q (name ILIKE), repeated tags (JSONB containment), include_archived (default false — archived rows now hidden by default), allow-listed sort_by/sort_order (unknown → silent default, dimensions precedent); pinned rows always order first; total respects the active filters (scenarios precedent — shared _apply_filters on count + rows).
  • Multi-select delete — N sequential single DELETEs behind one confirmation; no new bulk endpoint (product-vision guardrail).
  • Compare page/showcase/compare?a=&b= (frontend-only diff over two served details, mirroring run-compare): config diff, result diff with sign-only WAPE delta, created-objects presence matrix, lineage note, partial-run badges; bad ids degrade to the picker.
  • Link health — new GET /demo/workspaces/{id}/health probes the row's soft references in-process via httpx.ASGITransport (the pipeline._Client mechanism — no cross-slice imports): 2xx→alive, 404→dead, anything else→unknown (a probe never 500s the route). Loaded-workspace artifact cards get dead-link warnings + an alive/dead summary chip + a partial-run warning.

CONTRACT(E1) reconciliation

All seven CONTRACT(E1) points reconciled against the merged #407 code with zero divergence — columns, WorkspaceUpdateRequest, PATCH route, GET response fields, DemoRunRequest.replayed_from_workspace_id (+ frontend send), job_ids slot shape all matched the assumed names. One verify-or-add fallback fired: the frontend WorkspaceListItem/WorkspaceDetail TS types did not yet carry the E1 fields — added additively here.

Deferral (Decision 1 of the PRP)

A replay-policy picker (exact / safe-keep / modified) is out of scope — replay stays verbatim. A "modified replay" already exists as Load → edit controls → Run; the confirm dialog carries a "Use Load instead" hint.

Validation

  • All five backend gates green (ruff check + format --check, mypy --strict, pyright --strict, pytest -m "not integration" — 2005 passed); demo integration suite green against real Postgres (30 passed, incl. new filter + health tests); strict-mode AST walker green.
  • Frontend pnpm lint clean + pnpm test --run green (403 passed; 66 files).
  • Level 4 smoke + browser dogfood on a seeded stack: keep-run → health probe (3 alive) → alias delete flips the probe dead + renders the card warning marker and ✕ 1 dead chip → confirmed replay records provenance and the replay badge → lineage strip renders the chain → pin/tags/notes round-trip → compare page renders config/result diff + lineage note → multi-select delete removed 2 metadata rows, created objects verified intact.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @w7-mgfcode, your pull request is larger than the review limit of 150000 diff characters

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3f2e7281-fba2-4a13-b639-18b31cb83296

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/showcase-completion-e2-safe-replay-lifecycle

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@w7-mgfcode w7-mgfcode merged commit 0708d7d into dev Jun 12, 2026
8 checks passed
@w7-mgfcode w7-mgfcode deleted the feat/showcase-completion-e2-safe-replay-lifecycle branch June 12, 2026 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant