fix(ui): stabilize WebChat message ordering#74733
Conversation
|
Thanks for the context here. I did a careful shell check against current Close: current main already ships same-or-better WebChat reconciliation for the stale So I’m closing this as already implemented rather than keeping a duplicate issue open. Review detailsBest possible solution: Keep the shipped current-main WebChat reconciliation implementation; any remaining durable user-send acceptance concern should stay on #86946. Do we have a high-confidence way to reproduce the issue? Yes. Current-main source and regression tests cover a stale history request resolving after a local WebChat send while preserving the optimistic message and stream state; I did not run a live browser repro in this read-only pass. Is this the best way to solve the issue? Yes for the current-main solution, not for landing this PR. The shipped fix lives in the WebChat controller/stream reconciliation owner boundary with broader coverage, while this branch is now conflicting and redundant. Security review: Security review cleared: The diff touches UI controller/tests, changelog text, and a temp filename string; I found no dependency, credential, permission, CI, or supply-chain concern. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 462c076a24e2; fix evidence: release v2026.6.2-beta.1, commit 17a285f29825. |
b1c77be to
ee167f9
Compare
ee167f9 to
b13558d
Compare
b13558d to
f8ca635
Compare
f8ca635 to
4069f02
Compare
4069f02 to
cd7e5c3
Compare
1f5d1ca to
62a2076
Compare
63df144 to
0afb27a
Compare
3c6572b to
ff32a73
Compare
606340a to
e0b4405
Compare
e0b4405 to
48efa0e
Compare
|
This pull request has been automatically marked as stale due to inactivity. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
ClawSweeper applied the proposed close for this PR.
|
Summary
origin/mainand replaced the old XL patch with a focused WebChat reliability fix.chat.historyresponse resolves after a local send./clear/sessions.resetso old stream/tool cards cannot survive a reset.pnpm checkpasses.Problem
WebChat can start a
chat.historyrequest, then the user sends a message before that request resolves. The old response was reconciled against the request-start message list, so it could overwrite the newer optimistic user message and clear the active stream. Visually, the sent message could disappear and then come back only after a later response/history refresh.Approach
/clearreset path before reloading history.Real behavior proof
chat.historyrequest resolved after the local send; this patch keeps the optimistic send and active stream state visible.ai.openclaw.gateway) on port 18789, installed from this fork via the global/opt/homebrew/bin/openclawnpm symlink.pnpm build,pnpm ui:build,npm install -g /Users/vladyslavlevchuk/Projects/openclaw-pr-74733,launchctl kickstart -k gui/$(id -u)/ai.openclaw.gateway,openclaw --version,curl -I http://127.0.0.1:18789/, and log inspection of~/.openclaw/logs/gateway.log.Verification
pnpm buildpassed.pnpm ui:buildpassed.pnpm checkpassed.pnpm --dir ui exec vitest run src/ui/controllers/chat.test.ts src/ui/chat/history-merge.test.ts src/ui/app-chat.test.ts --config vitest.config.tspassed: 101 tests.pnpm format:check CHANGELOG.md src/auto-reply/reply/context-treemap.ts ui/src/ui/controllers/chat.ts ui/src/ui/controllers/chat.test.ts ui/src/ui/chat/history-merge.test.ts ui/src/ui/app-chat.ts ui/src/ui/app-chat.test.tspassed.pnpm exec oxlint src/auto-reply/reply/context-treemap.ts ui/src/ui/controllers/chat.ts ui/src/ui/controllers/chat.test.ts ui/src/ui/chat/history-merge.test.ts ui/src/ui/app-chat.ts ui/src/ui/app-chat.test.tspassed.pnpm tsgo:test:uipassed.48efa0e303:pnpm check:changedpassed.48efa0e303:env -u OPENCLAW_ALLOW_INSECURE_PRIVATE_WS -u OPENCLAW_GATEWAY_HOST -u OPENCLAW_GATEWAY_TOKEN -u OPENCLAW_VAPID_SUBJECT pnpm test:changed:maxpassed: 21 shards.Full Test Note
I also ran
pnpm testafterpnpm build. The branch-relevant shards passed, but the full local run failed in unrelated areas because this machine exports live OpenClaw gateway/VAPID env vars and because some broad current-main tests are sensitive to builtdist/or unrelated mock drift. I did not fold those unrelated repairs into this WebChat PR.AI Assistance
AI-assisted. I reviewed the resulting diff and understand the behavior it changes.