Repository navigation
fix(ui): keep active commentary after session navigation - #129640
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 7:40 PM ET / 23:40 UTC. ClawSweeper reviewWhat this changesAdds bounded active-run replay to cursor-based chat history so an evicted Control UI session restores commentary and tool activity when reopened. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep open for maintainer review. The inspected PR head repairs the Gateway-to-Control-UI replay gap with no discrete correctness or security finding, but it changes session-state replay and needs the required isolated live UI proof plus exact-head CI before merge. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherThe Gateway serves durable chat history plus active-run state to the Control UI. Cursor refreshes update cached session panes, while the UI replays active commentary and tool events into the visible pane. flowchart LR
A[Active agent run] --> B[Gateway history handler]
B --> C[Cursor history response]
C --> D[Control UI replay reducer]
D --> E[Session cache and pane]
E --> F[Visible commentary and tools]
Decision needed
Why: The change affects live session-state presentation across the Gateway protocol and Control UI; the protected maintainer label requires explicit maintainer handling. Before merge
Agent review detailsSecurityNone. PR surfaceSource +47, Tests +381, Other +4. Total +432 across 11 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Mantis proof suggestionA redacted web UI chat recording would materially supplement the mocked browser flow for this session-navigation behavior. A maintainer can ask Mantis to capture proof by posting this exact PR comment: Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Keep one bounded Gateway snapshot and one UI replay owner, then verify navigation away and return during a real active run on the exact PR head. Do we have a high-confidence way to reproduce the issue? Yes, source and focused tests define a high-confidence reproduction: reopen an evicted active session through its cached cursor while the Gateway returns an empty durable delta plus active-run replay. This read-only review did not execute it. Is this the best way to solve the issue? Yes. Producing the bounded snapshot at the Gateway owner and applying it through the shared UI replay path is safer than having cache/prefetch infer transient run state. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against dfe29eda2daa. 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)
|
…9640) * fix(ui): restore active commentary after navigation * test(ui): wait for responsive activity layout
Closes #129639
What Problem This Solves
Fixes an issue where Control UI users switching among sessions could lose visible commentary from a still-active run after the original session pane was evicted and reopened through cursor history.
Why This Change Was Made
Cursor history now carries the same bounded
inFlightRunreplay state as full history, and both response kinds use one fenced UI replay path. Background prefetch leaves transient active-run replay for the presented pane to consume instead of advancing past it. The existing 50-event / 128 KiB replay snapshot bound is unchanged.User Impact
Returning to an active session after navigating elsewhere now restores its current commentary and tool activity instead of showing only a generic running state.
Evidence
inFlightRun.AI-assisted: yes. The implementation and evidence were reviewed against the affected Gateway, protocol, generated client, and Control UI paths.