Skip to content

fix(ui): Gateway event listener errors while chat Details updates are pending - #198380

Merged
fuller-stack-dev merged 1 commit into
openclaw:mainfrom
fuller-stack-dev:fix/ui-automations-held-props-listener
Nov 13, 2026
Merged

fuller-stack-dev merged 1 commit into
openclaw:mainfrom
fuller-stack-dev:fix/ui-automations-held-props-listener

Conversation

@fuller-stack-dev

Copy link
Copy Markdown
Member

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: Error for 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 sessionKey as 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 throws NotReadyError. Its message is empty, so the console shows only Error. 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.tsx renders the real component under a parent that passes sessionKey the way Details does, holds a props write behind a pending read, then delivers a cron event and clicks Show more.

  • Red on base 68542b21d0: fails with NotReadyError. The stack is serve → read ← sessionKey getter ← current (chat-summary-automations.tsx:224) ← subscribeEvents callback (:245). The production report showed the same frames.
  • Falsifiers on base: the same held write with a plain getter (details()?.sessionKey) does not throw. The conditional getter with nothing pending does not throw either.
  • Each half is needed: with only the guard fixed, the Show more click still rejects with NotReadyError. With only the handlers fixed, the event still throws.
  • Green: node scripts/run-vitest.mjs ui/src/pages/chat/components/chat-summary-automations.test.tsx passes 40/40. The existing session/reconnect fencing test (fences late pages on session and same-client reconnect boundaries) still passes.
  • Lint: the file has the same three 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, and models.list across a session switch, and artifacts.list, sessions.processes.list, progressCard.get, and cron.status while 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.

@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

…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.
@fuller-stack-dev
fuller-stack-dev force-pushed the fix/ui-automations-held-props-listener branch from 43de048 to ecab9a5 Compare November 13, 2026 17:13
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 13, 2026
@clawsweeper

clawsweeper Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: A cron event throws NotReadyError, and Show more can reject instead of revealing rows.
  • After: The event refreshes the inventory, and Show more reveals 20 rows using the committed session binding.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The implementation is focused and source-consistent, but supplied behavior evidence stops at a mocked-Gateway component test.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Automation updates can be missed and Show more or Retry can throw while Details props are held by pending asynchronous work.
Reason: This maintainer-authored change restores existing behavior with a narrow repair and correctly uses Related for the separately unresolved renderer freeze.

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
Reviewed head: ecab9a53ca2d3b404b55c6cd2786ac9083bcdacf

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Show the production Details pending-frame scenario accepting cron updates and completing Show more/Retry without listener errors through browser or Mac-app console/network logs or a diagnostic recording.
Agent review details

How this fits together

The 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
Loading

Technical review

Best 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

  • Inventory event binding keeps the original intent (feat(ui): show session automations in Details #176490: The shared inventory follows Gateway, session, and read-access scope; its guard rejects obsolete event delivery before lifecycle cleanup.)
  • Show more and Retry session reads keeps the original intent (9019674: The handlers reveal retained or paginated rows and restore focus only within their captured session; the patch retains those comparisons using existing memos.)
  • Presentation retirement checks keeps the original intent (fix(ui): retain automation inventory across reconnects #184483: Keep logical inventory across physical-row changes while preventing pending reveal or retry work from affecting a replacement presentation.)
  • Solid test harness keeps the original intent (refactor(ui): remove the summary automation bridge #171807: Replace the custom-element bridge with the production Solid component and preserve behavior coverage; the added regression extends that same harness.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vyctor H. Brzezowski: Raw commit 9019674 adds ui/src/pages/chat/components/chat-summary-automations.tsx:270 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 901967444973; files: ui/src/pages/chat/components/chat-summary-automations.tsx)
  • Peter Steinberger: Raw commit 2d45b90 adds ui/src/pages/chat/components/chat-summary-automations.tsx:377 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 2d45b904bdba; files: ui/src/pages/chat/components/chat-summary-automations.tsx)

PR surface

Source +2, Tests +41. Total +43 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 10 8 +2
Tests 1 42 1 +41
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 52 9 +43

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P2: The demonstrated failure affects Details automation refreshes and controls without establishing a broader chat or renderer outage.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: The demonstrated failure affects Details automation refreshes and controls without establishing a broader chat or renderer outage.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Provide the production Details verification described in the proof assessment.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 13, 2026, 12:28 PM ET / 17:28 UTC.

@fuller-stack-dev
fuller-stack-dev merged commit 8b414e9 into openclaw:main Nov 13, 2026
97 checks passed
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Merged via squash.

@fuller-stack-dev
fuller-stack-dev deleted the fix/ui-automations-held-props-listener branch November 13, 2026 18:36
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 14, 2026
…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.
RomneyDa added a commit that referenced this pull request Nov 15, 2026
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant