Repository navigation
fix(ui): separate parent and child session activity - #137789
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: blocked before merge. Reviewed September 3, 2026, 11:59 PM ET / September 4, 2026, 03:59 UTC. ClawSweeper reviewWhat this changesThe PR makes Control UI working state follow the selected session’s own run while the Gateway separately projects a live or queued subagent onto its child session row. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 3 items remain The earlier lifecycle-generation finding is addressed and the code cleanly separates direct session activity from descendant abortability. Keep this member-authored, maintainer-labeled PR open until it has the repository-required live dev-Gateway UI proof; the supplied screenshots are explicitly synthetic Gateway responses. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway turns run-registry state into session rows consumed by the Control UI. The chat pane uses those rows to show working indicators while preserving parent-level Stop controls for descendant work. flowchart LR
A[Parent and child agent runs] --> B[Subagent run registry]
B --> C[Gateway session activity projection]
C --> D[Session list rows]
D --> E[Control UI chat pane]
E --> F[Working indicator]
E --> G[Descendant Stop control]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +4, Tests +154. Total +158 across 12 files. View PR surface stats
Review metrics
Mantis proof suggestionA redacted web chat interaction recording of the real parent/child session states would materially validate the missing live Control UI proof. A maintainer can ask Mantis to capture proof by posting this exact PR comment: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the direct-versus-descendant activity split after a sanitized live dev-Gateway recording demonstrates an idle completed parent, an active visible child, and queued-child status through the real session flow. Do we have a high-confidence way to reproduce the issue? Yes—current main derives selected-chat working state from descendant-aware abortability and only projects queued direct subagents; the submitted boundary tests express the concrete parent/child scenario. This read-only review did not execute the tests. Is this the best way to solve the issue? Yes—the patch introduces one explicit direct-activity fact while retaining descendant-aware Stop behavior, which is cleaner than compensating at individual UI consumers. The remaining gap is live end-to-end validation, not an alternate design. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7ace0d00c7a6. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Addressed the lifecycle-generation finding and a related queued-child regression in
Verification: 421 tests passed. Before the queue fix, both native collector admission cases failed with The screenshots below exercise the real Control UI in Chromium with synthetic Gateway RPC responses. They are not evidence of a live model-backed Gateway flow. They show the completed parent with zero working indicators, the selected child with one working indicator, and one child sidebar spinner in both cases. The local proof commit Release-note impact: Control UI working timers follow the selected session's own turn, while active visible children keep their own activity and queued children retain queued status. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Live dev-Gateway before/after proof is now complete. Both captures use an isolated local Gateway, a separate state directory, a loopback-only port, the real Control UI, and real WebSocket RPC. Session entries and run owners are seeded through the canonical session accessor,
The child sidebar remains active while the child is live. On the fixed head it also becomes idle after lifecycle rotation. Raw Before: pr-137789-base-live-flow.mp4After: pr-137789-fixed-live-flow.mp4MP4 SHA-256: Final local gates on the hosted head passed: Hosted CI's only failure was the npm advisory service timing out in @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
The npm advisory interruption is resolved. CI attempt 3 completed successfully on unchanged head Pre-merge evidence remains valid at this exact head:
Latest review follow-through: the live video closes the synthetic-RPC-only evidence gap for parent completion, active child visibility, and lifecycle retirement. A separate queued-child video is intentionally omitted: queued capacity transitions are covered by the native collector integration tests and the Gateway current-lifecycle regression. The live fixture uses canonical seeded run owners, not a provider/model call. The net four production lines are retained because the shared lifecycle fence and direct-session projection are distinct required checks; the obsolete combined working/abortability path and redundant activity prop were removed. The native prepare and head-pinned squash-merge procedure is now running. This comment is not yet a merge confirmation. |
|
Merged via squash.
|
* fix(ui): separate direct and descendant session activity * fix(gateway): preserve queued subagent capacity state


Summary
sessions.listrowReproduction and cause
After a parent turn completed, a visible child session could remain active. The parent row correctly exposed descendant activity for control/sidebar projection, but the chat pane reused the combined abortability predicate as its working state. That kept the parent timer and accessibility announcement running. Separately, a live subagent could be present in the subagent registry while
sessions.listomitted direct activity on the child row, leaving the sidebar idle even though the footer reported a running task.The fix keeps the ownership boundary explicit: direct session activity drives working UI, descendant activity remains available for abort controls and sidebar rollups, and the live subagent registry is a direct liveness source only for the child session key.
Verification
pnpm vitest run ui/src/pages/chat/chat-view.test.ts ui/src/pages/chat/run-lifecycle.test.ts ui/src/pages/chat/chat-pane-run-activity.test.ts src/gateway/server-methods/session-active-runs.test.ts(419 passed)pnpm ui:build(passed, performance budgets passed)pnpm check:changed(all gates passed through the final guard; wrapper hit its 10-minute timeout during that guard)node --import ./scripts/tsx.mjs scripts/check-no-pairing-store-group-auth.mts(passed)