Harden main webchat reliability#75776
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed May 29, 2026, 1:01 AM ET / 05:01 UTC. Summary PR surface: Source +407, Tests +465, Docs +1. Total +873 across 40 files. Reproducibility: no. this review did not reproduce a real browser send-refresh-reconnect path. The branch supplies focused tests and terminal output, but not the visible WebChat proof requested by the maintainer. Review metrics: 2 noteworthy metrics.
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: Rebase onto current main, drop the release-owned changelog edit, add visible redacted WebChat send-refresh-reconnect proof, then re-review the refreshed branch for session and message-delivery behavior before merge. Do we have a high-confidence way to reproduce the issue? No; this review did not reproduce a real browser send-refresh-reconnect path. The branch supplies focused tests and terminal output, but not the visible WebChat proof requested by the maintainer. Is this the best way to solve the issue? Unclear; the branch touches the right Gateway/UI/session surfaces, but the conflicted head and missing visible proof prevent judging it as the best final fix. A rebased, narrower, proof-backed version is the safer path. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 3c5f5efc8c41. Label changesLabel justifications:
Evidence reviewedPR surface: Source +407, Tests +465, Docs +1. Total +873 across 40 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
|
|
Updated the branch in
Verification:
The first non-elevated gateway test run hit local sandbox |
ff11103 to
0b425f7
Compare
3a4685c to
3811b24
Compare
|
Dear @steipete, @vincentkoc, We're experiencing a persistent WebChat issue where only the last message appears in the conversation view — history is not being rendered (backend data is intact, confirmed by checking session files). This problem is directly addressed by the two PRs below, both of which remain unmerged:
Both capture the exact symptoms we're seeing: stale in-flight Could either of these please be reviewed and merged into the next release? This is affecting daily usability of the Control UI / WebChat. Happy to help test if a preview build is available. Thanks 🙏 |
BunsDev
left a comment
There was a problem hiding this comment.
Thanks for the broad WebChat reliability work here. I am going to keep this blocked for now.
The remaining correctness issue is the main-session system-event suppression path. runPreparedReply still drains queued system events, then passes suppressSystemEventsInUserPrompt whenever the session key is agent:main:main; buildReplyPromptBodies responds by replacing the entire combined event block with an empty string. That means background, cron, node, runtime, or other queued system events can be consumed and then dropped instead of reaching the model. This regresses the existing system-event contract covered by get-reply-run.media-only.test.ts.
Please narrow this so only the specific generated WebChat noise is filtered, or avoid draining events that will not be delivered. The fix should include focused coverage for a main WebChat/session run with a queued generic system event proving that the event is still present in the prompt/follow-up body.
Duplicate/related triage:
#74733is related and overlaps the WebChat history/reconciliation surface, but it is not a clean duplicate of this PR: it is a draft XL UI/Gateway ordering branch with different implementation scope and its own open findings.#76446has already merged the narrower active WebChat duplicate-send fix for#75737.#76437has already merged the narrower compaction-boundary/history UX fix for#76415.#72892should stay open for now because the exact duplicate-sender origin still is not proven closed by the active-send fix.
So I am treating this as request-changes, not close-as-duplicate.
|
Thanks @BunsDev. I updated the branch to address the remaining system-event blocker. Changes:
Verification:
Note: the old direct UI typecheck command from the previous PR body no longer maps cleanly onto current |
e0b4b94 to
00fabcf
Compare
00fabcf to
345a997
Compare
345a997 to
cf60f98
Compare
9b60e92 to
60355dc
Compare
4cb8cce to
939ba32
Compare
|
Updated the branch again to clear the latest upstream conflicts. Current live PR state:
Conflict repair details:
Current review state:
@BunsDev could you please re-review when you have a chance? The branch should now be conflict-free and current with |
|
@copilot resolve the merge conflicts in this pull request |
939ba32 to
dfd776c
Compare
|
Updated the branch to clear the latest merge conflicts and CI failures. Current live PR state after push:
What changed in the repair:
Verification passed locally on the pushed tree:
I also rechecked PR comments/review threads. The Copilot threads are resolved/outdated; the only remaining review blocker is the prior |
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
|
Thanks @ZRAIVenture. I'm deferring this for now: the current head conflicts with main, my prior requested changes review is still active, and ClawSweeper still needs real WebChat proof. Please rebase onto current Current blocker proof I rechecked:
Related WebChat threads/PRs such as #74733, #83992, #80670, #85472, #45952, #77136, #76654, and #70391 overlap adjacent symptoms, but I am not marking this as a clean duplicate from the current evidence. |
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
Closing this as stale/superseded by current main behavior. OpenClaw/WebChat is working better after the recent upstream updates, and this branch is now conflict-heavy with active CHANGES_REQUESTED plus missing browser-visible proof. If the specific pending-turn/ephemeral-receipt symptom comes back, we should open a narrower fresh PR against current main instead of continuing to rebase this broad branch. |
Summary
System:text is no longer globally stripped.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause (if applicable)
System:preservation, or the exact preflight compaction threshold behavior.Regression Test Plan (if applicable)
src/gateway/server.sessions.reset-models.test.ts,src/auto-reply/reply/strip-inbound-meta.test.ts,src/gateway/server-methods/chat.inject.parentid.test.ts,src/gateway/server.chat.gateway-server-chat.test.ts,ui/src/ui/controllers/chat.test.ts,ui/src/ui/views/chat.test.ts,ui/src/ui/chat/message-normalizer.test.ts, plus compaction/memory-flush tests already in the branch.System:lines remain intact, preflight acknowledgement text stays ephemeral, and preflight compaction gates trigger from fresh token totals.User-visible / Behavior Changes
Control UI WebChat should show a received/working state sooner, keep the pending user prompt visible during refresh/reconnect windows, and avoid unnecessary context saturation before compaction. Default WebChat tools/capabilities are unchanged by this PR.
Diagram (if applicable)
Security Impact (required)
NoNoNoNoNoYes, explain risk + mitigation: N/A.Repro + Verification
Environment
agent:main:mainSteps
System:.exactlyto make sure they still receive preflight acknowledgement, while explicit output-only/silent prompts do not.Expected
System:text is preserved.Actual
System:text. After the latest patch, focused tests cover the intended behavior and the latest Copilot review comments are addressed in the current head.Evidence
Recorded verification for the current head
4cb8cce017b0ce976c691066b524f417dd2f633a:corepack pnpm test src/agents/prompt-overlay-runtime-contract.test.ts src/auto-reply/reply/get-reply-run.media-only.test.ts src/auto-reply/reply.raw-body.test.ts src/gateway/server.sessions.reset-models.test.tspassed: 3 Vitest shards, 74 tests.corepack pnpm test src/gateway/server.chat.gateway-server-chat.test.ts src/gateway/server.chat.gateway-server-chat-b.test.ts ui/src/ui/controllers/chat.test.ts ui/src/ui/views/chat.test.ts ui/src/ui/chat/message-normalizer.test.tspassed: 2 Vitest shards, 169 tests.corepack pnpm exec oxfmt --check --threads=1 src/agents/gpt5-prompt-overlay.ts src/agents/prompt-overlay-runtime-contract.test.ts src/auto-reply/reply/get-reply-run.media-only.test.ts src/gateway/server-methods/chat.ts ui/src/ui/controllers/chat.ts ui/src/ui/chat/run-lifecycle.ts ui/src/ui/chat/message-normalizer.ts ui/src/ui/views/chat.test.ts ui/src/ui/chat/message-normalizer.test.tspassed.corepack pnpm exec tsc --noEmit --pretty false -p tsconfig.core.jsonpassed.git diff --checkpassed.backfill-pr-labels.Note: a prior non-elevated gateway test run hit local sandbox
listen EPERM 127.0.0.1, then passed when rerun with local loopback binding allowed.Human Verification (required)
4cb8cce017b0ce976c691066b524f417dd2f633a.System:lines, no hard-coded WebChattoolsAllowremains, Control UI transport sender label is hidden only for user messages, ordinary prompts containingexactlystill receive acknowledgement, upstream heartbeat-ack filtering remains combined with this PR's ephemeral preflight-stream guard, and the global GPT-5 stable prefix no longer asks the model to emit a second durable acknowledgement.Real behavior proof
mainchurn.4cb8cce017b0ce976c691066b524f417dd2f633a, branchcodex/openclaw-ui-reliability-upstream. GitHub CLI/API was run against the live PRopenclaw/openclaw#75776; focused Control UI/Gateway behavior was run from the local source checkout.main, resolved the system-event test conflict created by upstream'sdrainFormattedSystemEventBlockshape, removed the global GPT-5 stable-prefix progress acknowledgement so the WebChat receipt remains gateway/UI-owned and ephemeral, ran the focused verification listed above, pushed the branch, then checked live GitHub mergeability/check state for the current head.ui/src/ui/chat/message-normalizer.tsnow hidesopenclaw-control-uionly whenrole === "user".src/gateway/server-methods/chat.tsno longer treatsexactlyalone as a blanket acknowledgement-suppression phrase; suppression is limited to explicit silence/output-only wording.src/agents/gpt5-prompt-overlay.tsno longer contains the global<progress_acknowledgement>stable-prefix block.src/agents/prompt-overlay-runtime-contract.test.tsnow asserts that the GPT-5 stable prefix does not contain<progress_acknowledgement>.main, checks are green/skipped as expected, the active code addresses the two Copilot findings plus the ClawSweeper P2 durable-acknowledgement finding, and focused source-run verification covers the server/UI/prompt behavior this PR changes.Review Conversations
ClawSweeper issue-comment findings were addressed in commit
a4396316and later follow-up commits; BunsDev's system-event review was addressed in the current branch; the two Copilot comments from May 9 are addressed at current head4cb8cce017b0ce976c691066b524f417dd2f633a; the ClawSweeper P2 about a second durable GPT-5 acknowledgement is addressed by removing the global<progress_acknowledgement>stable-prefix block.Compatibility / Migration
YesNoNoRisks and Mitigations