Repository navigation
fix(ui): Gateway event listener errors while chat Details updates are pending - #198380
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. |
…props are pending
The automations inventory compared each Gateway event against its binding by
reading parent props inside the untracked callback. Details passes sessionKey as
a conditional, which the Solid compiler wraps in a fresh memo per read; while an
async frame holds the parent's props write that memo has no committed value, so
the read threw NotReadyError ("[gateway] event listener handler error: Error")
and dropped the cron invalidation. Read the inventory's owned memos instead, and
do the same in the Show more and Retry handlers.
43de048 to
ecab9a5
Compare
|
Codex review: needs maintainer review before merge. What this changesThis PR makes automation event callbacks and Show more/Retry handlers read existing session memos instead of reevaluating parent props. Example: Details for agent:ops:task has 25 automations while an asynchronous update holds its parent props.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR provides a focused repair for a current-main listener failure, with no concrete introduced correctness defect found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI automation inventory consumes session props and Gateway events, uses the existing cron loader for scoped reads, and supplies desktop and mobile Details views. flowchart LR
A[Chat Details props] --> B[Owned binding memos]
C[Gateway events] --> D[Automation inventory]
B --> D
D --> E[Existing cron loader]
E --> F[Details automation rows]
G[Show more and Retry] --> D
Technical reviewBest possible solution: Use the existing binding memos throughout these callbacks while preserving the current inventory, connection, and presentation owners. Do we have a high-confidence way to reproduce the issue? The source and committed regression identify a conditional session prop read from an untracked callback during a held Solid frame; the author reports a matching pre-fix failure, but a deterministic production trigger is not established and this review ran no tests. Is this the best way to solve the issue? The patch repairs the unsafe reads at their existing owner rather than catching the exception or adding synchronization machinery, and all production hunks serve that repair. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3bf446ef4475. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +2, Tests +41. Total +43 across 2 files. Added test files: 0. View PR surface stats
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. 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 November 13, 2026, 12:28 PM ET / 17:28 UTC. |
|
Merged via squash.
|
…props are pending (openclaw#198380) The automations inventory compared each Gateway event against its binding by reading parent props inside the untracked callback. Details passes sessionKey as a conditional, which the Solid compiler wraps in a fresh memo per read; while an async frame holds the parent's props write that memo has no committed value, so the read threw NotReadyError ("[gateway] event listener handler error: Error") and dropped the cron invalidation. Read the inventory's owned memos instead, and do the same in the Show more and Retry handlers.
Port Telegram callbacks, hook session keys, private-topic approvals and interactive widgets with complete send/edit/route security companions. Include Feishu captioned media, iOS permission Sendable callbacks, WebKit animation/menu retirement and pending automations props handling. Keep Matrix malformed formatted-mention parsing linear-time. Adapt the 11.4 equivalents to the fixed beta baseline where available. Source PRs: #196217, #191585, #196822, #194027, #197519, #198038, #196991, #198380, #198658, #184432. Companion scope: #191647, #192162, #198022, #197271, #194146; #197670 is folded into #197519 equivalent. (cherry picked from commit 928c118) (cherry picked from commit 569ca48) (cherry picked from commit efa744e) (cherry picked from commit c301da9) (cherry picked from commit 641c4d5) (cherry picked from commit b9d3fb4) (cherry picked from commit a213a51) (cherry picked from commit ec46689) (cherry picked from commit 779d22e) (cherry picked from commit 129ccc3) (cherry picked from commit 849c050) (cherry picked from commit b22f35f) (cherry picked from commit 8b414e9) (cherry picked from commit 01ecda4) (cherry picked from commit f978e54) (cherry picked from commit 6e60479) (cherry picked from commit ec7b49a) (cherry picked from commit 1d72ad0) (cherry picked from commit 5e2c66f) (cherry picked from commit dfb6454) Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit f7c581c7f8bf0e57c7d8799e928a121b24462450) Co-authored-by: vincentkoc <[email protected]>
Related: #196820 (found while investigating that freeze; this error is not known to cause it)
What Problem This Solves
Fixes: while a chat Details update is waiting on async data, the Control UI logs
[gateway] event listener handler error: Errorfor every Gateway event, and Details Automations misses cron updates.User Impact
Cron events reach Details Automations even while a chat update is pending, and those console errors no longer appear. "Show more" and "Retry" in Automations also stop throwing in that state.
Why This Change Was Made
The automations inventory checks each Gateway event against its session binding by reading the parent's props inside the event callback. Details passes
sessionKeyas a conditional expression, and the Solid compiler turns that into a new memo on every read. While an async frame holds the parent's props write, that new memo has no committed value, so an untracked read throwsNotReadyError. Its message is empty, so the console shows onlyError. The event guard and the Show more/Retry handlers now read the inventory's own memos, which return the committed binding. Event fencing across session and Gateway changes is unchanged.Evidence
The new test in
chat-summary-automations.test.tsxrenders the real component under a parent that passessessionKeythe way Details does, holds a props write behind a pending read, then delivers a cron event and clicks Show more.68542b21d0: fails withNotReadyError. The stack isserve→read←sessionKeygetter ←current(chat-summary-automations.tsx:224) ←subscribeEventscallback (:245). The production report showed the same frames.details()?.sessionKey) does not throw. The conditional getter with nothing pending does not throw either.NotReadyError. With only the handlers fixed, the event still throws.node scripts/run-vitest.mjs ui/src/pages/chat/components/chat-summary-automations.test.tsxpasses 40/40. The existing session/reconnect fencing test (fences late pages on session and same-client reconnect boundaries) still passes.solid(reactivity)warnings as base, shifted two lines by the new comment.Gap: I couldn't reproduce this in a browser E2E with the mock Gateway. I tried holding
progressCard.get,sessions.messages.subscribe,session.reactions.list, andmodels.listacross a session switch, andartifacts.list,sessions.processes.list,progressCard.get, andcron.statuswhile opening Details and then refreshing its props. None of them staged the Details props write. Which read keeps a frame held in the reporting Mac app is still unknown. The unit test uses the real component and the real Solid runtime.No UI changes, so no screenshots.