feat(v2.0.0-rc2): close 3 endpoint-coverage gaps + 1 dead route (retry / un-duplicate / app-overlay)#39
Merged
Conversation
8490cec to
d2d287a
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
d2d287a to
a56ccb9
Compare
The post-rc1 endpoint audit found that the React UI was behind the
backend on 3 features and that one route (`/un-duplicate`) was defined
but never mounted on the production app (only on a test fixture). rc2
closes all four.
Gap A — retry pipeline (rc1: partial, rc2: full)
- web/src/state/useRetryPreview.ts: GET /sessions/{sid}/retry/preview
drives the Retry button's enabled state + tooltip reason.
- web/src/canvas/CanvasHead.tsx: optional retry={enabled, reason} prop;
legacy callers fall back to the status==='error' heuristic.
- web/src/canvas/SessionCanvas.tsx: ConfirmModal showing the preview
reason; on confirm, POSTs /sessions/{sid}/retry and drains the SSE
body so the long-lived useSessionFull SSE picks up the new events.
Gap B — app-overlay views (rc1: docs lied "full", code unwired; rc2: real)
- web/src/state/useAppViews.ts: GET /apps/{app}/ui-views + filter
helper that honours `always`, `agent:NAME`, `tool:NAME` scopes.
- web/src/monitors/SelectedPanel.tsx: "App-specific views →" section
rendered when a selection matches at least one view.
Gap C — un-duplicate (rc1: dead route + no UI; rc2: full)
- src/runtime/api.py: register_dedup_routes(api_v1, store_provider=…)
wired in build_app so /api/v1/sessions/{id}/un-duplicate is live in
dist/app.py (was only live in tests).
- src/runtime/api_dedup.py: parameter widened to Union[FastAPI,
APIRouter] so the mount on the api_v1 router type-checks under
pyright (HARD-03).
- web/src/modals/UnDuplicateModal.tsx: confirm + free-text note +
error envelope rendering.
- web/src/canvas/CanvasHead.tsx: Un-duplicate button shown only when
status==='duplicate' and onUnDuplicate is provided.
- web/src/canvas/SessionCanvas.tsx: modal mount + handler.
- tests/test_dedup_mounted_in_build_app.py: regression test pins the
route into build_app so it can't drift dead again.
Other:
- web/package.json + web/src/App.tsx: bumped to 2.0.0-rc2.
- web/package.json: added @vitest/coverage-v8 devDep (web.yml runs
`npx vitest run --coverage`).
- web/.gitignore: coverage/ (vitest's lcov report).
- .github/workflows/web-e2e.yml: corrected boot to
`uvicorn runtime.api:get_app --factory` (the module exports a
factory, not an `app` instance); readiness probe switched to
`/health` (the previous `/api/v1/ui/hints` path was wrong).
- docs/REACT_UI_PARITY.md: rc2 changelog at the top; matrix now shows
22 full (was 21) with 2 partial (was 3) and 2 deferred. Explicitly
notes the rc1 app-overlay overclaim.
- dist/* regenerated (HARD-08).
Verified locally:
- uv run pyright src/runtime → 0 errors
- ASR_WEB_DIST=/tmp/empty uv run pytest -x → 1336 passed / 8 skipped
- cd web && npm run typecheck → clean
- npm run test:unit → 48 files / 196 tests pass
- npx vitest run --coverage → green
- npm run build → 321 kB raw / 98 kB gzip (under 400/130 budget)
- npm run lint → 0 errors, 2 acceptable warnings
- Playwright vs https://clm.randomcodespace.dev (Caddy → uvicorn:37777
running this branch): new-session.live PASS, retry-after-error.live
PASS, hitl-approve.live SKIP.
a56ccb9 to
d33ca27
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Post-rc1 endpoint audit found the React UI was behind the backend on 3 features + one route was defined but unmounted in production. rc2 closes all four and corrects the parity-doc overclaim that flagged this gap initially.
POST /sessions/{id}/retry+GET /sessions/{id}/retry/previewrefresh()no-opuseRetryPreviewdrives enabled/reason; ConfirmModal POSTs and drains SSEGET /apps/{app}/ui-viewsuseAppViews+<SelectedPanel>"App-specific views →" links filtered byapplies_toPOST /sessions/{id}/un-duplicateapi_dedup.pybutregister_dedup_routesnever called outside tests — dead indist/app.pybuild_app+<UnDuplicateModal>+ button on<CanvasHead>(status==='duplicate'); regression test pins the mountdocs/REACT_UI_PARITY.mdoverclaimed app-overlay fullFiles
Backend (3 lines + regression test):
src/runtime/api.py(+5 / -1):register_dedup_routes(api_v1, store_provider=…)tests/test_dedup_mounted_in_build_app.py(new): pins the mountFrontend:
web/src/state/useRetryPreview.ts(new, 28 lines)web/src/state/useAppViews.ts(new, 54 lines + filter helper)web/src/modals/UnDuplicateModal.tsx(new, 124 lines)web/src/canvas/CanvasHead.tsx(+18 / -4): retry prop + un-duplicate buttonweb/src/canvas/SessionCanvas.tsx(+62 / -3): retry/un-duplicate state + handlers + modalsweb/src/monitors/SelectedPanel.tsx(+34 / -2): app-views sectionweb/package.json+web/src/App.tsx: bumped to2.0.0-rc2Docs:
docs/REACT_UI_PARITY.md: rc2 changelog + matrix updatesTests (new, 16 cases):
web/tests/component/UnDuplicateModal.test.tsx(5)web/tests/component/useAppViews.test.ts(5)web/tests/component/useRetryPreview.test.tsx(3)Bundles:
dist/app.py,dist/apps/*.pyregenerated (HARD-08)Verification (locally)
uv run pytest -x→ 1336 passed / 8 skipped (withASR_WEB_DIST=/tmp/empty; the unrelatedtest_unknown_endpoint_returns_404_envelopeis fragile whenweb/distexists on disk — pre-existing flake, not introduced here)cd web && npm run typecheck→ cleannpm run test:unit→ 48 files / 196 tests (was 45/183 on rc1; +3/+13 from rc2 tests)npm run build→ 321 kB raw / 98 kB gzip (under 400/130 budget)npm run lint→ 0 errors, 2 acceptable react-refresh warningsnpm run check:size→ ✓https://clm.randomcodespace.dev(Caddy → uvicorn:37777 running this branch):new-session.live.spec.ts— PASSretry-after-error.live.spec.ts— PASShitl-approve.live.spec.ts— SKIP (config-dependent; HITL pause doesn't trigger in smoke backend)Test plan
Lint / Type-check / Test / SonargreenWeb CI(.github/workflows/web.yml) greenv2.0.0-rc2onmainNotes
useRetryPreviewtranslates 4xx into{retry: false, reason: <msg>}(non-throwing) so the panel doesn't crash on unknown ids.{retracted_by, note}body; UI sendsnote=nullwhen the textarea is empty.tool:NAMEagainst the{tool}@{ts}selected-ref shape used byuseSetSelected.🤖 Generated with Claude Code