Skip to content

fix: stop the browser error when closing a split chat pane - #208172

Closed
roboclaw-bot wants to merge 3 commits into
mainfrom
openclaw/split-pane-type-error-8960f9
Closed

roboclaw-bot wants to merge 3 commits into
mainfrom
openclaw/split-pane-type-error-8960f9

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Closing a split chat pane can raise TypeError: e is not a function even when keyboard focus lands in the right place. The same error appears when closing Dashboard to reveal a shared chat or closing the bound conversation in a saved split.

User Impact

The pane closes without the browser exception. The surviving pane keeps its existing focus and draft behavior. Desktop Details still hides when empty and appears when it has content. No settings or saved layouts need to change.

Why This Change Was Made

The desktop Details observer notifies its parent from Solid’s onSettled callback. The parent uses a signal setter, which returns the observer object. Returning that object from onSettled registers it as a cleanup function, so Solid tries to call it when the pane is disposed. The notification now returns nothing. This preserves the Details discovery behavior introduced in #205093 and leaves the pane-close and focus code untouched.

Evidence

An independent AWS VM ran the same Chromium tests on main and on e047d325, using fixture Gateway responses. On main d68b6d92, eight of 13 cases threw e is not a function. These covered all six close/focus cases, closing Dashboard to reveal the shared chat, and closing the bound conversation in a saved split. The other five cases passed.

On main 3f172894, both additional cases failed. The native plugin lost its session accessory under auth:none. After a failed shell import, the chat recovered its draft but kept an error view on screen.

On e047d325, all 15 cases passed. They cover the surviving pane’s keyboard focus, chat and Home drafts, Dashboard and saved split behavior, Details appearing and disappearing as progress changes, the session accessory, and shell recovery. The UI typecheck (pnpm run tsgo:ui) passed. The AWS VM was released.

The original Chromium run also passed its 13 selected cases on the fix. Formatting passed, and focused lint completed with one warning. Original close/focus CI · Original Dashboard and saved-pane CI

Worked on by: @daniel-lxs

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

roboclaw-bot and others added 2 commits November 29, 2026 08:56
Notify the parent when desktop Details observers are ready without returning the signal setter result to Solid as a cleanup callback.

Co-authored-by: daniel-lxs <[email protected]>
Worked on by:
- @daniel-lxs

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: c0e2dc7b-db8d-4f6f-991c-d9e5021f71d3
@clawsweeper

clawsweeper Bot commented Nov 29, 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.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. labels Nov 29, 2026
@daniel-lxs daniel-lxs added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Nov 29, 2026
@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. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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 29, 2026
@clawsweeper

clawsweeper Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

The desktop Details readiness callback now returns nothing instead of forwarding the parent signal setter’s return value.

Example: Close the second pane in a two-pane chat.

  • Before: Disposing the Details observer can throw TypeError: e is not a function.
  • After: The pane closes without registering the observer object as a cleanup function.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-verified repair with relevant existing browser coverage; confidence is limited by fixture-backed reported results and unfinished exact-head CI.
Proof confidence 🦐 gold shrimp (3/6) The body reports 15 passing Chromium cases on e047d32 with fixture Gateway responses; inspected media concerns the preceding layout feature, and linked historical CI does not independently verify this head’s result.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

The scores reflect the reviewer's assessment. Real behavior proof is not required for maintainer- or bot-authored pull requests.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Closing a chat pane can raise a browser exception during Details observer disposal.
Reason: The maintainer-authored change restores valid lifecycle behavior while preserving the approved Details presentation.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

✅ Ready for maintainer review

This PR fixes a current-main cleanup error with a minimal change that preserves Details discovery; no introduced correctness or security defects were found.

Reviewed head: e047d3257365666221e51c7309ecb501840d3268

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI’s pane-local Details observer gathers content availability and publishes accessors to its parent; Solid owns the observer’s setup and disposal.

flowchart LR
  A[Chat pane] --> B[Details observer]
  B --> C[Content availability]
  B --> D[Readiness notification]
  D --> E[Parent signal setter]
  F[Pane disposal] --> G[Solid cleanup]
Loading

Technical review

Best possible solution:

Keep the existing observer owner and discard the readiness notification’s return value at its onSettled call site.

Do we have a high-confidence way to reproduce the issue?

The current-main callback, parent signal setter, and published Solid cleanup implementation establish the failure path; no target code was executed during this read-only review.

Is this the best way to solve the issue?

This is the smallest complete fix: it corrects the invalid cleanup value at its producer without changing pane focus, discovery policy, or resource disposal.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against b904594b0377.

Provenance checked

  • Desktop Details observer readiness keeps the original intent (d4e1305: Discover desktop Details content without mounting closed renderers, hiding the button and column when empty.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Pinned patch fixes the notification boundary: The introduced diff only changes the onSettled callback from an implicit return to a block body, preserving the onReady call and observer payload. (ui/src/pages/chat/components/chat-details-observers.tsx:132, e047d3257365)
  • Current-main caller establishes the failing path: The parent passes setObservers directly as onReady, and fetched main still contains the implicit-return callback. (ui/src/pages/chat/components/chat-details.tsx:576, b904594b0377)
  • Published dependency confirms cleanup semantics: The changed module imports Solid directly, making its runtime contract relevant. Published solid-js and @solidjs/signals 2.0.0-rc.18 identify this commit: onSettled retains the callback result through trackedEffect, and signal setters return the assigned value. OpenClaw’s inspected signals patch does not change those contracts. (packages/signals/src/signals.ts, 225014bf8757)
  • Original Details intent is preserved: fix: hide desktop Details when there is nothing to show #205093 introduced this observer to hide empty desktop Details while retaining shared readers; this PR preserves that behavior and only corrects the notification return. (ui/src/pages/chat/components/chat-details-observers.tsx:132, d4e1305213ee)
  • Existing browser regressions observe the reported failure: The split-close suite captures pageerror and checks an empty error list after closing panes across editable, read-only, and Dashboard presentations; Dashboard and saved-split suites also check browser errors. (ui/src/e2e/chat-split-close-focus.e2e.test.ts:32, e047d3257365)
  • Validation evidence has bounded scope: The body reports failing baseline cases and 15 passing Chromium cases on the reviewed head using fixture Gateway responses. The inspected screenshots show the earlier Details layout change. Linked original CI jobs ran another SHA and failed overall; their logs redirect to a blocked Azure host, so their selected-case results could not be independently checked. (e047d3257365)

Likely related people:

  • Vyctor H. Brzezowski: Raw commit d4e1305 adds ui/src/pages/chat/components/chat-details-observers.tsx:134 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d4e1305213ee; files: ui/src/pages/chat/components/chat-details-observers.tsx)

PR surface

Source 0. Total 0 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 3 3 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 3 3 0

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:

No label changes.

Label justifications:

  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-29T09:13:41.067Z sha e047d32 :: passed. :: none

Reviewed November 29, 2026, 4:21 AM ET / 09:21 UTC (Revision 2).

@daniel-lxs
daniel-lxs marked this pull request as ready for review November 29, 2026 09:17
@daniel-lxs

Copy link
Copy Markdown
Member

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀

Re-review progress:

daniel-lxs added a commit to daniel-lxs/openclaw that referenced this pull request Nov 29, 2026
daniel-lxs added a commit to daniel-lxs/openclaw that referenced this pull request Nov 29, 2026
daniel-lxs added a commit to daniel-lxs/openclaw that referenced this pull request Nov 29, 2026
daniel-lxs added a commit to daniel-lxs/openclaw that referenced this pull request Nov 29, 2026
daniel-lxs added a commit that referenced this pull request Nov 29, 2026
Use the header's known machine placement and shared session participants
to present Details before background discovery finishes. Keep the existing
desktop rule for empty sessions and the discovery rules for a possible
self-only chat. Notify the parent without registering its setter's return
value as a Solid cleanup. Let compact tool frames use the activity gap
and keep their metadata alongside the restored operation.

Exercise populated panels and real publication events in the browser
fixtures. Distinguish an Environment summary from a full Review patch
and count duplicate requests within each checkout or run. Require all
three row-scoped readers to start after the initial chat.send.

Includes repairs from #208172, #208179, #208182 and #208205.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: c0e2dc7b-db8d-4f6f-991c-d9e5021f71d3
OpenClaw-Publication: 48605718-55f9-4d15-9a0f-9f1e0f3e381c
OpenClaw-Publication: 3c1d30d9-8521-4f29-8f22-a3a132bb4c3c
daniel-lxs added a commit that referenced this pull request Nov 29, 2026
Use the header's known machine placement and shared session participants
to present Details before background discovery finishes. Keep the existing
desktop rule for empty sessions and the discovery rules for a possible
self-only chat. Notify the parent without registering its setter's return
value as a Solid cleanup. Let compact tool frames use the activity gap
and keep their metadata alongside the restored operation.

Exercise populated panels and real publication events in the browser
fixtures. Distinguish an Environment summary from a full Review patch
and count duplicate requests within each checkout or run. Require all
three row-scoped readers to start after the initial chat.send.

Includes repairs from #208172, #208179, #208182 and #208205.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: c0e2dc7b-db8d-4f6f-991c-d9e5021f71d3
OpenClaw-Publication: 48605718-55f9-4d15-9a0f-9f1e0f3e381c
OpenClaw-Publication: 3c1d30d9-8521-4f29-8f22-a3a132bb4c3c
daniel-lxs added a commit that referenced this pull request Nov 29, 2026
Use the header's known machine placement and shared session participants
to present Details before background discovery finishes. Keep the existing
desktop rule for empty sessions and the discovery rules for a possible
self-only chat. Notify the parent without registering its setter's return
value as a Solid cleanup. Let compact tool frames use the activity gap
and keep their metadata alongside the restored operation.

Exercise populated panels and real publication events in the browser
fixtures. Distinguish an Environment summary from a full Review patch
and count duplicate requests within each checkout or run. Require all
three row-scoped readers to start after the initial chat.send.

Includes repairs from #208172, #208179, #208182 and #208205.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: c0e2dc7b-db8d-4f6f-991c-d9e5021f71d3
OpenClaw-Publication: 48605718-55f9-4d15-9a0f-9f1e0f3e381c
OpenClaw-Publication: 3c1d30d9-8521-4f29-8f22-a3a132bb4c3c
daniel-lxs added a commit that referenced this pull request Nov 29, 2026
Use the header's known machine placement and shared session participants
to present Details before background discovery finishes. Keep the existing
desktop rule for empty sessions and the discovery rules for a possible
self-only chat. Notify the parent without registering its setter's return
value as a Solid cleanup. Let compact tool frames use the activity gap
and keep their metadata alongside the restored operation.

Exercise populated panels and real publication events in the browser
fixtures. Distinguish an Environment summary from a full Review patch
and count duplicate requests within each checkout or run. Require all
three row-scoped readers to start after the initial chat.send.

Includes repairs from #208172, #208179, #208182 and #208205.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: c0e2dc7b-db8d-4f6f-991c-d9e5021f71d3
OpenClaw-Publication: 48605718-55f9-4d15-9a0f-9f1e0f3e381c
OpenClaw-Publication: 3c1d30d9-8521-4f29-8f22-a3a132bb4c3c
@daniel-lxs

Copy link
Copy Markdown
Member

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀

Re-review progress:

@daniel-lxs

Copy link
Copy Markdown
Member

The split-pane fix already landed in main through #208485.

@daniel-lxs daniel-lxs closed this Nov 30, 2026
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 ci:full Keep ordinary native-locale CI selection on the next PR run. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS 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.

2 participants