Repository navigation
fix: clear stuck Responding after external channel replies in Companion - #2392
Conversation
Co-authored-by: daniel-lxs <[email protected]>
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: d807c062-fb3c-4e82-86d6-5bf42087639e
|
🦞👀 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: passed. What this changesThe PR clears completed external replies through fresh Gateway history while preserving queued work, replacement-session prompts, transcript paging, and reader position. Example: A WeChat reply finishes while Companion displays the conversation.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR addresses a recovery gap still present on main; this review found no blocking defect. Reviewed head: Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherGateway transcript events and history responses enter the shared client; existing conversation and history owners reconcile them into the native chat timeline and activity state. flowchart LR
A[Gateway transcript events] --> B[Shared Gateway client]
C[Gateway history responses] --> B
B --> D[Chat history loader]
D --> E[Conversation state]
E --> F[Reactor chat timeline]
Technical reviewBest possible solution: Settle external turns through identity-matched fresh history and sound queue observations within the existing runtime owners. Do we have a high-confidence way to reproduce the issue? Main's registered-run requirement explains the reported transcript-only failure, and the PR supplies matching event-sequence regressions and reported baseline failures; this review did not execute a reproduction. Is this the best way to solve the issue? Extending the existing history-recovery path is appropriate, and the independent legacy confirmation avoids treating an earlier queue sample as terminal authority. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8d31176d3ad4. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
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 HistoryReview history (6 earlier review cycles)
Reviewed November 28, 2026, 3:58 AM ET / 08:58 UTC (Revision 7). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Co-authored-by: daniel-lxs <[email protected]>
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: e1d30844-fa9b-4251-ac14-e3cc2df6554c
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Co-authored-by: daniel-lxs <[email protected]>
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 807d90b0-7273-49f0-ae45-c30ebc41b261
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Co-authored-by: daniel-lxs <[email protected]>
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 0c09821c-6b04-481b-a365-6bc6d1fca14d
Co-authored-by: daniel-lxs <[email protected]>
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 265e2000-2a0f-4e8a-9b3e-32090e86a168
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Co-authored-by: daniel-lxs <[email protected]>
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 6610cc4f-6060-4bc9-b373-798fa27b18e1
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Co-authored-by: daniel-lxs <[email protected]>
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: b29bf36f-57f5-4c32-a0e2-c29787997aaf
Co-authored-by: daniel-lxs <[email protected]>
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: c6a7dea0-7a5a-448c-8070-9bf67b8aeb95
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Closes #2310. Community report. Paired with Gateway PR #207051.
What Problem This Solves
Windows Companion could stay on Responding after an external reply, omit a quoted reply until reload, or lose a new prompt and its clock when the session roster caught up. Refreshing the latest transcript page could also move the message the reader was looking at. A pending queue can look empty when the Gateway reads it before projecting the terminal run. Separate pages can also reflect different points in time.
User Impact
Companion shows the saved reply once and checks fresh Gateway history before settling activity. A prompt from the new physical session and its running clock survive roster acknowledgment. A latest-page refresh retains older rows and the reader's position. Load earlier messages still works while a legacy Gateway queue confirmation is pending.
Why This Change Was Made
Saved replies and invalidations trigger history reads, not completion by themselves. Recovery checks the physical session, run, original prompt, and queued work. Companion opts in with
chat-history-queue-observationand uses the paired Gateway's queue-wide observation when present. On older Gateways, a complete legacy page is a hint. After seeing the terminal run, Companion starts a fresh read to confirm the same run and an empty queue without blocking transcript paging. A newer latest history result supersedes the old confirmation; older pages do not. Partial pages cannot prove emptiness, and Companion does not combine them. A tracked run can still finish and dispatch its queued successor. Ordinary refreshes no longer reinitialize tail navigation.Evidence
baca75ab, the first activation sent no request while confirmation was held; the second worked after release. The corrected app sent one real cursor request and rendered older sequence 001 with the same confirmation still held.Required proof pools
windows-winui-interactive: foreground paging and legacy queue controls, foreground off-tail refresh, mounted reader and foreground clock, and foreground follow control.Validation
3028b0803dfce1e3a96512027acd3b803c0a9bf7) as tested source082815136231699def5c6cbb32aacfb569a49c59. Clean AWS Windows run:build.ps1exit 0; full Shared test suite 6,196 passed, 12 skipped, 0 failed; full Tray suite 7,081 passed, 0 skipped or failed. Exact candidate foreground cases passed 3/3. The local authenticated Gateway-fixture suite passed 36/36; two additional fixture controls confirmed settlement after an older prepend and rejection of a stale empty response after a newer latest read showed queued work.ab2f6bd60a5d44cb2b91ef2a87c5ac5f13d4af29: standalone AWS Windows build and full suites passed. Earlier Companion build and full suites passed on2f22cf83.6fb27914on tree766b2a17, matching the corresponding Gateway PR head.Real behavior proof
The foreground main and previous PR comparison and foreground correction used actual Windows Hub executables and an authenticated Gateway built from main. Each paging arm used 203 persisted entries and the real latest-200 reply. The wire observer held only the post-terminal queue confirmation, never the older-page reply. On the corrected build, one enabled Load earlier messages activation sent one cursor request, and the previously absent older row was visible before confirmation release. The candidate also passed both queue controls. Earlier native queue proof isolates the original false-idle bug from this paging correction.
The earlier foreground viewport replay used the actual Hub on an interactive Windows session with synthetic Gateway fixture messages. Native keyboard input on the history rail moved the reader away from the tail. Both images use the same earlier
2f22cf83build: first the response is held, then the refresh marker is painted on the same answer at the same Y. This verifies a settled reader viewport, not refresh during wheel motion.Clean comparison
Annotated comparison
The native C# production-socket replay passed 3/3 with the actual AWS Gateway capture; the held pair had two false-idle failures and passed the empty control. The replay preserved captured success and retryable error envelopes except for request correlation IDs. The Gateway and cold legacy Chromium run verified old clients did not receive the new field. Archived evidence includes the previous exact-head 17/17 Windows client replay on
c4da409b, not the current head.Worked on by:
Work sessions
Linked for team reference; these sessions aren’t public.
Worked on by
🦞 Made with OpenClaw