Repository navigation
fix(ui): stop duplicate commentary after replay eviction - #147600
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 8:31 PM ET / September 14, 2026, 00:31 UTC. ClawSweeper reviewWhat this changesThe Control UI uses persisted commentary to remove duplicate streamed text when the corresponding replay events have been evicted, with a browser regression covering the rendered result. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix: current main still exhibits the underlying reconciliation gap, and the supplied screenshots demonstrate the intended improvement. No blocking introduced defect was found. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI combines saved conversation history with a running assistant's text and recent activity events. History reconciliation determines which text is already displayed and which continuation should remain visible. flowchart TD
A[Saved conversation messages] --> D[History reconciliation]
B[Cumulative assistant text] --> D
C[Bounded activity replay] --> E[Identify surviving commentary items]
E --> D
D --> F[Remove matching persisted prefix]
F --> G[Saved commentary and new visible text]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +44, Tests +69. Total +113 across 3 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep prefix reconciliation in the existing history owner, preserving saved commentary, genuinely new text, and established steering boundaries. Do we have a high-confidence way to reproduce the issue? Yes: hydrate an active run with saved keyed commentary, cumulative text containing that commentary, and a replay snapshot lacking its item events. Current source establishes the duplicate path, and the supplied before screenshot demonstrates it; this reviewer did not execute tests. Is this the best way to solve the issue? Yes: the patch supplies missing replay facts to the existing reconciler and preserves the default behavior of its other callers without adding settings, storage, or a competing owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5705cf3898fa. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
What Problem This Solves
Fixes: Control UI repeats persisted commentary when opening a long active run after the matching replay item events have fallen out of the bounded in-flight snapshot.
User Impact
User impact: active session commentary renders once after navigation or reconnect, while genuinely new streamed text remains visible.
Why This Change Was Made
History hydration previously assumed every keyed commentary mirror was still owned by a replay item event. The in-flight event snapshot is bounded, so older item events can be evicted while their durable commentary rows and the cumulative assistant buffer remain.
Hydration now treats only surviving replay item IDs as live owners. Persisted commentary without a surviving item is optional cumulative-prefix evidence: matching text is retired from the live tail, while nonmatching commentary is skipped so steer boundaries remain intact.
Evidence
078ca0bc2ff: the two persisted paragraphs render again inside the cumulative live stream.Still working.; the retained tool row remains visible.101focused history/reconciliation tests passed.check:changedpassed formatting, conflict, dependency, i18n, TypeScript, coercion, and dead-export gates. Its final lint pass initially found an unused test binding and an over-limit touched legacy test; both were removed, and targeted Oxlint passes.0.81.Before
After