Skip to content

fix(ui): restore in-progress chat responses after reconnect - #115691

Merged
steipete merged 1 commit into
mainfrom
codex/fix-control-ui-inflight-history
Jul 29, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/fix-control-ui-inflight-history

Conversation

@steipete-oai

Copy link
Copy Markdown
Contributor

Closes #90755

What Problem This Solves

Fixes an issue where users who reconnect to a running Control UI chat would see their last prompt but not the assistant response already streaming in the background.

Why This Change Was Made

Restore only the unpersisted assistant tail from the existing authoritative Gateway history snapshot. Reconcile same-run updates using the Gateway's documented-in-source cumulative assistant-message contract and the shared pane-owned run projection, rather than guessing from repeated or overlapping delta text. Keep terminal, other-run, hidden-reply, branch, and plan ownership unchanged.

User Impact

Refreshing or reopening a running chat immediately shows the response already produced, keeps its Stop control active, continues live streaming, and never duplicates text already saved in the transcript or resurrects a completed run.

Evidence

Fail-first proof: on unchanged main, the new real Chromium reconnect test timed out waiting for the missing assistant response, while the existing four lifecycle browser scenarios remained green. Focused regressions also independently reproduced missing snapshots, repeated cumulative tokens, split tool-turn prefixes, stale completed-run ABA, same-run updates, history arriving after an earlier live delta, and persisted history overtaking live cumulative text in ordinary, steered, and tool-segmented turns.

510 passing end-to-end, Gateway, UI, and i18n tests on isolated Blacksmith Testbox tbx_01kyp8ma0f2het95varpk99bbb:

  • 42 actual Chromium tests across reconnect lifecycle, plan replay, messaging, streaming, and follow-up suites; the new reconnect scenario verifies persisted text occurs exactly once, the unpersisted stream is visible, and Stop generating is present. Screenshot and recorded video remain outside the source tree.
  • 129 real Gateway agent-event tests prove both production delta emitters carry the full cumulative assistant message, including segmented and throttled output.
  • 40 Gateway active-run/snapshot tests.
  • 281 focused Control UI history, Gateway, lifecycle, projection, and stream reconciliation tests, including 21 new reconnect/race regressions.
  • 18 Control UI translation-verifier regression tests and the unchanged raw-copy baseline.
  • Complete path-scoped pnpm check:changed, including UI/core tsgo, changed-file lint, max-lines, dead exports, formatting, package/dependency guards, and i18n.
  • Fresh gpt-5.6-sol extra-high-effort autoreview with no accepted or actionable findings.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: L maintainer Maintainer-authored PR labels Jul 29, 2026
@steipete
steipete force-pushed the codex/fix-control-ui-inflight-history branch from 6911237 to 10b5515 Compare July 29, 2026 06:56
@steipete
steipete merged commit 4a10815 into main Jul 29, 2026
98 checks passed
@steipete
steipete deleted the codex/fix-control-ui-inflight-history branch July 29, 2026 08:09
@steipete

Copy link
Copy Markdown
Contributor

Merged via squash.

vincentkoc added a commit that referenced this pull request Jul 29, 2026
* origin/main: (100 commits)
  fix(hooks): kill gog process tree on gmail-watcher shutdown (#112452)
  fix(memory): avoid phantom continuation pages (#115722)
  fix(agents): reject cancelled foreground commands (#115694)
  fix(telegram): prevent false empty replies after message-tool delivery (#115588)
  refactor: unify session cost rollup scans (#115749)
  fix(agents): honor completed semantic command exits (#115737)
  feat(agents): persist last-used session model as the agent default (#115717)
  feat(openai): support GPT-Live over backend WebSocket (#115622)
  fix(ui): unify sidebar thread density (#115646)
  feat(ui): path-based agent and panel URLs on Settings > Agents (#115673)
  feat(gateway): serve HTTP byte ranges on media routes (#115667)
  refactor: consolidate Teams and Zoom meeting plugin shells (#115707)
  fix(browser): release unread CDP response streams (#115675)
  feat(ui): move settings save feedback into the sidebar footer (#115679)
  fix(plugins): enforce hook security invariants (#115701)
  refactor: deduplicate extension normalization primitives (#115650)
  feat(gateway): add least-privilege voice-node pairing (#115712)
  fix(ui): restore in-flight assistant replies after reconnect (#115691)
  fix(whatsapp): infer native media from filenames (#115725)
  fix(system-agent): avoid TUI startup catalog preparation (#113136)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: reconnecting to a running session only shows last user message, missing agent's in-progress response

2 participants