Repository navigation
fix: hold queued messages through inline edits - #189869
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. What this changesRecheck inline-edit ownership after delivery preparation so queued text remains held until Save or Cancel. Example: While readiness is pending, change “Original queued message” to “Corrected queued message” in the inline editor.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR repairs a current queue-edit contract violation with a focused admission check; no introduced correctness defect was found, and exact-head CI is green. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI outbox prepares queued inputs, checks final delivery admission, and submits admitted messages to the Gateway through chat.send. flowchart TD
A[Queued message] --> B[Readiness preparation]
B --> C[Final delivery admission]
D[Shared inline edit owner] --> C
C --> E[Pending while editing]
C --> F[Gateway chat send]
E --> G[Save or Cancel]
G --> A
Technical reviewBest possible solution: Keep the existing final-admission owner responsible for honoring the shared edit hold and preserve normal Save/Cancel continuation. Do we have a high-confidence way to reproduce the issue? The source exposes the late-edit window, and the linked issue supplies a controlled real-Gateway occurrence; this read-only review ran no reproduction. Is this the best way to solve the issue? This is the smallest complete repair: reuse the existing edit predicate at final admission, after preparation yields, without introducing new state or another decision owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c633ec6376e1. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +1, Tests +88, Other +2. Total +91 across 3 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 31, 2026, 7:57 PM ET / 23:57 UTC. |
|
Fixed: queued messages stay held while their inline editor is open and resume through Save or Cancel. |
…ed-backup-search-exports-20261101 * commit 'cde4bfe4f10ce470ded7264c68d9a72ae03594cc': fix(ci): keep backup and chat search internals private (#189894) fix(codex): recover unused native threads without dropping history (#189900) fix(oc-path): use last duplicate JSON key to match runtime parsing (#189855) perf(test): parse the Mantis resolver workflow once (#189801) fix(agents): revert default hard context admission (#189891) refactor(test): use canonical tracked temp paths (#189800) chore(ui): refresh control ui locales (#189898) improve: show gateway commit and build time on About refactor(test): share SDK export fixture JSON writes (#189799) fix: restore Files navigation from unavailable previews (#189879) refactor(test): share raw ratchet fixture writes (#189798) fix(ai): honor Model Studio compatible-mode output limits (#189870) fix: hold queued messages through inline edits (#189869) perf(test): reuse the baseline fixture Node resolver (#189790) test(qa): correlate handoff replies by run identity (#189885) fix(ui): normalize canonical Unicode in local search comparisons (#189874) fix(ui): explain unsupported browsers without module scripts (#189883) # Conflicts: # ui/src/pages/chat/components/chat-search-highlight.browser.test.ts
Keep queued text held until its active inline edit is saved or canceled. Fixes openclaw#189845.
Backport accepted fixes onto 2026.11.5-beta.2. Base: bc061f9 Canonical source tree before commit: e6c0c39 These are adapted/squashed backports; do not claim each is an exact Git cherry-pick. Source provenance (selected verified commits; other cohorts use their frozen patch/adoption manifests): runtime-B: b20a0cc fix(macos): connect with configured credentials despite stale app environment (#191468) c4c0942 fix(update): failed updates from 10.7–10.9 crash in automatic migration recovery (#189713) 6aae408 fix(update): preserve recovery errors and async triage callbacks (#191495) 8910654 fix(macos): prevent first-launch Gateway failures after upgrades (#191436) 00b2ff4 fix: parent sessions miss child approvals with a custom session store (#189827) c6142a8 fix: avoid copying managed plugin binaries during Gateway startup (#187865) e72b356 fix(anthropic): avoid token profile collisions (#187875) 807075d fix(anthropic): set API workspace at login (#186976) bafe92f fix(exec): preserve no-timeout results from macOS app nodes (#190729) 9b05a64 fix(imessage): use a PostgreSQL-safe recovery cursor key (#184919) 6ba197f fix: session search on PostgreSQL scans every transcript row instead of using the text index (#187909) 4f49aa5 fix(sessions): PostgreSQL session search scans every transcript row again after the 5th search on a connection (#188979) de3936c fix(macos): Mac tab shows a blank or stale page when a load fails (#185432) e977080 fix(macos): prevent duplicate voice sends and false sent feedback (#186271) provider-compaction: 1b43c2e fix(compaction): preserve active request provenance (#180214) 7b0cfe3 fix(google): restore tool calls with Python keyword parameters (#191561) 9039ceb fix(ci): keep compaction attribution helpers internal d6a1327 feat(google): use the Interactions API for Gemini Flash models (#189395) fe0f8d1 fix(google): Gemini models ignore configured topP (#190695) history: c51d733 fix(sessions): stop expanding archive reads from exhausting memory (#190690) 3c8bd4d fix(sessions): page oversized earlier history instead of failing at 8 MiB (#188450) b195f61 fix(sessions): page oversized transcript history in both directions (#188483) b65482e fix(gateway): preserve older history across hidden message gaps (#188557) 3d4fc94 fix(sessions): avoid oversized listing and imported-history reads (#189284) 33e7baf fix(sessions): bound active accounting without blocking writers (#190182) 682ade7 fix: preserve chat history continuation metadata (#188612) runtime-C: 7e005b0 fix(macos): keep secrets when a Gateway config save fails (#187734) 15cf738 fix(macos): keep Gateway auth when Tailscale exposure is turned off (#187664) b53a06b perf(update): read candidate state inventory without copying the shared database (#187921) 970fc4e fix: restore CLI message sends with agent tool policies (#188058) 73ad731 fix: stop model fallback when session capability metadata changes (#179312) 32305db fix: subagent turns fail after session metadata changes (#183501) d13bd0f fix(codex): include relay conversation instructions in trajectory (#189005) e375530 fix: replies after a plugin reload from Control UI go to the session's last external chat (#190982) 9346376 fix: reasoning-only retry is refused by Anthropic as reasoning_extraction (#184434) direct-auth-state: 1b15408 fix(models): keep the model list when one plugin-owned provider lacks a credential (#189014) 7d8dc60 fix: recover startup migration with retained worker index (#189023) capacity: 41772e3 fix(worktrees): settle completed disk debt on refused postchecks (#188727) command-once-189369: 8269137 fix(plugins): plugin commands that continue the agent run three times on native command turns (#189369) pg-board-189564: 7232a8d fix(boards): publish widgets with PostgreSQL storage (#189564) queued-edit-189869: 92b32ca fix: hold queued messages through inline edits (#189869) Preserve source attribution from original commits. For a genuinely exact individual pick only, use the conventional (cherry picked from commit <sha>) line. Full file-level provenance: coverage-manifest.json; reviewed patch hashes: artifact-registry.json. No held136/native82 content adopted by this work. No release or full-candidate qualification claim. Additional original-source identities (exact adapted hunk scope is in frozen artifacts): release-guides-185258: 39c37e6 docs(release): define ledger-first hotfix routing (#185258) UI-history: 10a6e4f fix(ui): scope provider-add discovery warning to its own provider (#188541), 3d7b4c4 fix(ui): never fail loading earlier chat history without a boundary (#188372) obsolete-cache-188203: 90d82c2 fix: preserve completed reasoning and refill chat snapshots (#188203) webhook-169778: b1f643f fix(startup): keep webhook decisions startup recorded for channels Doctor left pending (#169778) schema-lease-188391: ba6cfcd fix(state): keep lease renewal independent of parent admission (#188391) backfill-188976: c75a8a8 fix(gateway): stop session row backfill once the Gateway is closing (#188976) canonical-disable-188846: 88b56ee fix(config): auto-enable reads and writes mixed-case plugin policy under the canonical id (#188846) matrix-177272: 5a6d22c fix(matrix): stop seeding new thread sessions from the room transcript (#177272) provider-hook-189059: 0588f51 fix(models): isolate every per-provider catalog failure (#189059) unicode-189868: 87396e7 fix(oc-path): avoid reading and editing a different Unicode key (#189868) replay-cohort: 2031044 fix(sessions): acknowledge committed input retries without duplicate turns (#188527), 9114431 fix: resume configured fallback after interrupted attempts (#188672) Co-authored-by: RomneyDa <[email protected]>
Closes #189845.
What Problem This Solves
Queued text can be sent while the operator is changing it in the inline editor. The browser checks the edit hold before preparing delivery, but preparation can wait for idle readiness. If the operator opens Edit during that wait, the original text can reach the Gateway before Save or Cancel.
This was reproduced through ordinary Queue and Edit controls on an isolated real Gateway. A single real readiness response was delayed for 1.447 seconds and then forwarded unchanged; the original message was dispatched and accepted while the changed draft remained visibly open.
User Impact
An open queued-message edit continues to hold its source through delivery preparation. Saving can replace it through the existing queue, and canceling can resume the original input. The correction preserves queue order, current connection and source-version checks, attachment handling, and the existing distinction between Queue and Steer.
There is no new configuration, state format, persistent flag, or public protocol. This change prevents a pending delivery continuation from sending text the operator is still editing; it does not withdraw work that the Gateway already accepted.
Why This Change Was Made
Final admission already decides whether the prepared queue item may be dispatched. It now checks the existing edit owner alongside the existing held-state check, after the preparation waits. This keeps the decision at the effect boundary without introducing another hold mechanism or changing the edit's source/draft ownership.
The early drain check remains useful because it avoids preparation for an edit that was already open. Existing history and attachment checks retain their own boundaries. The new regression exercises the real outbox/edit/delivery owners with fixed external Gateway responses, including separate Save and Cancel continuations.
Evidence
On unchanged production, both new delayed-readiness cases failed because the original text reached
chat.sendwhile the edit was open; the other 32 cases in that file passed.On
1258f4cecd42956b49f78f77d606271b15eaa009, all 73 tests in the four selected files passed: readiness, queued edits, creation handoff, and asynchronous send preparation. Both new cases retain the changed draft during the wait and then send the selected input exactly once after Save or Cancel.Canonical AutoReview of
06a71d75..1258f4cecompleted with P0–P3 coverage and no actionable findings. It reviewed the committed change and supplied owner/caller context; it did not execute tests or substitute for independent engineering review.Native changed-file format/lint, UI i18n, and the selected production/test type checks passed. The four-file test stage took 4.85 seconds; the combined invocation also included type checking. The new regression adds 88 test lines with an equal per-change allocation; the shared ceiling is unchanged.
Fixed-source browser proof passed on the same guest permissions and unchanged Gateway: one real readiness response held for 1.455 seconds, original queued input sent zero times while editing, Save delivered the edited text once, and Cancel on a distinct row delivered its original text once. Both useful replies completed; the unsaved Cancel draft was never sent, and the settled queue and editor were empty.
Independent engineering review found no actionable issue. Exact-head hosted CI passed, including all three UI shards, UI E2E, the Control UI performance check, and the selected lint/type/architecture/security families.
The comparison uses distinct synthetic equipment and room-booking tasks to preserve previously accepted work. Both use the same viewport, theme, guest scopes, ordinary queue/edit controls, and delayed-readiness boundary. Content differs; the claim concerns delivery ownership, not pixel layout. The focused recording labels omitted waits and half-speed actions. The original baseline recording has a capture artifact and is excluded; its inspected still and protocol observations establish the before result. No natural failure frequency or broader platform coverage is claimed.
Visual evidence
Queue, delayed-readiness Edit, Save, Cancel and completed replies. Omitted waits and half-speed actions are labeled; final frame held for two seconds.
queued-edit-proof.mp4
Visual verification
1258f4cecd42956b49f78f77d606271b15eaa009