Repository navigation
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 28, 2026, 11:20 PM ET / 03:20 UTC. Summary PR surface: Source +84, Tests +197. Total +281 across 2 files. Reproducibility: yes. at source level: a history response with a committed assistant prefix plus cumulative Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Revise the PR so adopted in-flight state remains compatible with cumulative gateway snapshots/deltas, cover adoption followed by a later delta, and add real Control UI switch-back proof. Do we have a high-confidence way to reproduce the issue? Yes at source level: a history response with a committed assistant prefix plus cumulative Is this the best way to solve the issue? No. The narrow Control UI adoption direction is reasonable, but this implementation still needs a cumulative-baseline-safe reconciliation or a canonical unpersisted-tail contract before it is the best fix. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 2001b15f5b92. Label changesLabel justifications:
Evidence reviewedPR surface: Source +84, Tests +197. Total +281 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
…ssion switch-back - Add inFlightRun to ChatHistoryResult type so the Control UI receives the gateway's existing in-flight run data on chat.history / chat.startup. - Create adoptInFlightRunFromChatHistory() with text reconciliation: strip any overlap between the cumulative in-flight buffer and the last committed assistant message to avoid duplicating already-persisted text. - Call adoption after stream reconciliation when no fresher local run exists, mirroring the TUI loader in src/tui/tui-session-actions.ts. Fixes openclaw#90755
…iliation, clear stale errors, add edge-case tests Co-Authored-By: Claude <[email protected]>
4e968f2 to
18eed42
Compare
|
Thanks @wings1029 for pursuing #90755. Closing this branch because the submitted client-side overlap heuristic cannot preserve the Gateway stream contract safely, and the touched Control UI controller paths have since been replaced.
The canonical issue remains open. The landable fix needs a Gateway-owned active-run projection with an explicit visible/unpersisted boundary while retaining the cumulative baseline for later deltas, consumed consistently by both Control UI and TUI. Required proof should cover switch-away/back, persisted tool-phase prefixes, the next cumulative delta, finalization, and stale-local-run protection in a real mocked-Gateway Chromium flow. This is the same contract gap that blocked the older attempts #92969 and #93273; keeping another heuristic branch open would invite an unsafe partial merge. |
What Problem This Solves
When you switch away from a Control UI chat session while the agent is actively generating a response and then switch back, the in-progress streaming reply was lost — only the last user message was shown.
The gateway already exposes the still-streaming run via
chat.history/chat.startupresponses (theinFlightRunfield), and the TUI already uses this to restore state on reconnect. The Control UI was simply ignoring it.Fixes #90755.
Root cause
Three things were missing in
ui/src/ui/controllers/chat.ts:ChatHistoryResulttype didn't includeinFlightRun— the field was silently droppedinFlightRun.textis the cumulative gateway buffer that overlaps with already-persisted assistant messages; without reconciliation, the UI would show duplicate textThree previous PRs attempted this fix (#90832, #92969, #93273) but all were closed — two because they lacked the text reconciliation step.
Change
ui/src/ui/controllers/chat.tsinFlightRuntoChatHistoryResulttypeui/src/ui/controllers/chat.tsadoptInFlightRunFromChatHistory()with text overlap reconciliationui/src/ui/controllers/chat.tsui/src/ui/controllers/chat.test.tsReconciliation logic
This prevents duplicating already-persisted text while preserving the new suffix.
Evidence
ui/src/ui/controllers/chat.test.tsRisk
inFlightRunfield is already returned by the gateway for TUI usage🤖 Generated with Claude Code