Skip to content

refactor(ui): port chat pane support to Solid - #173265

Merged
steipete merged 29 commits into
mainfrom
solid2/w-final-chat-pane
Oct 15, 2026
Merged

steipete merged 29 commits into
mainfrom
solid2/w-final-chat-pane

Conversation

@steipete

@steipete steipete commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Problem and solution

Chat pane layout and embedded panels still rendered through Lit. This ports the pane/page support renderers to Solid while preserving retained panes, lazy panels, header and model actions, hosted-tab routing, board reset confirmation, and Continue in terminal. Existing tags, classes, routes, selectors, callbacks, and lazy boundaries stay in place; no dependencies are added.

Solid consumes render descriptors from the existing TypeScript owners. Session state, persistence, lifecycle, and mutations remain with those owners. Ref-owned DOM islands retain cleanup and data-sidebar-panel-host routing. The port preserves stream-frame cancellation, composer persistence, pane titles and menu actions, hidden-pane parking, focus restoration, and awaited iframe/MCP retirement. Details remains a direct header child whose node survives unrelated updates; external panel links remain direct anchors.

Main independently landed both investigated fixture repairs: the live Gateway model-picker mutation in #172739, commit 6907edb07437410c6ffa6bff33d3ca9bbe5e2cf9, and distinct update warning details in Patrick Erichsen’s #173438, commit 59d3a4a36cdb89. Main also owns the command-palette connection diagnostics from #172695. All three E2E files are adopted unchanged from main and absent from this PR's net diff; this PR has no authored CI-repair files. The update-warning fixture honors the report owner's intentional deduplication of identical warning details; all original assertions and timeouts remain.

The scope is 49 logical files, above the approximate 40-file target because of directly coupled test-harness conversions and shared JSX declarations. Production growth comes from explicit Solid view modules, render descriptors, and retained DOM-island boundaries. The drop indicator belongs to the separate welcome slice.

Proof

Reviewed head: 2f9494f56c009ed2c7dd6c76ec455c177fd21d1f. Comparison base: f6c0408505eb32d25d794557df153bdc4738a85d.

Check Result
Focused tests Embedded-panel and session-controls runs passed 13 and 12 cases; focused repairs passed 4 and 3 cases. These are 32 passing case outcomes, not a full final-suite rerun. The four repaired embedded-panel cases also passed on the base.
Repair regressions Settings spy: 7/7 passed. Direct Details child and node retention: 1/1 passed.
Types, lint, review Integration pnpm tsgo:ui and core lint passed. Shared JSX declarations passed replacement-head core test-type jobs. Final repairs passed focused lint/format and independent review through P2; the main integrations were also inspected directly. All three E2E sidequest files now match main and are absent from the net diff.
Retention and ownership Final exact-head full CI passed the three WeakRef retentions, three-pane retention, single startup RPC, MCP disposal ownership, and both real-Gateway shards.
Build and strict performance Fresh same-machine f6c04085 → 2f9494f5 production builds and strict checks passed with zero warnings/violations, using Node 26.11.1 and pnpm 12.10.1 on both sides. Startup JS 351,591 → 350,772 B gzip (−819 B), 8 requests each; startup CSS 45,894 B / 1 request, unchanged. Budget 374,285 B / 1 CSS request.
Route loading Chat JS 1,697,461 → 1,699,051 B (+1,590 B), 31 JS / 8 CSS requests; New Session JS 1,388,153 → 1,387,218 B (−935 B), 29 JS / 7 CSS requests. Request counts unchanged.
Production Knip Required final-head pnpm deadcode:knip exited 1 with four inherited unused files: src/agents/workspace-bootstrap-seed-verify.ts, src/claws/provenance-record.ts, src/claws/provenance-write.worker-contract.ts, and src/cron/store/run-receipt-drain.ts. Earlier exact-base 3150853d reproduced them; current f6c04085 base and 2f9494f5 head retain identical relevant source, configuration, and dependency inputs. No new baseline rerun or ignores.
Full CI Final run 38805541911 completed successfully on exact 2f9494f5, including openclaw/ci-gate and both real-Gateway shards. Merged as aee0ee2f16208b97d3797f62d2d614690751ffce. Prior failures and adopted main repairs are recorded below.
Baseline replays Exact-base update-run and earlier model-picker replays passed. Passing replays establish neither inheritance nor a proven fix.
LOC Production/declarations 8,119 → 8,587 (+468); tests/helpers 5,443 → 5,865 (+422); generated manifest 2,765 → 2,770 (+5); pruned mock baseline 9,535 → 9,533 (−2); total 25,862 → 26,755 (+893) across 49 logical files.
Visual proof Preserved e0728f7f → 87379d25 synthetic Continue in terminal captures at 1440×1000; both complete frames inspected. This PR’s migrated view source is unchanged; these are historical captures, not a claim of full current-main visual parity.

CI failure investigation

The only substantive failure on 66938d70 was update-run.e2e.test.ts > Control UI update run E2E > resumes the same update after restart and keeps its successful report visible. The diagnostic found a succeeded run, one dialog, and the actual headline ✅ OpenClaw updated to 2.0.0 (from 1.0.0); 1 warning needs attention. The fixture expected three warnings. The report owner intentionally deduplicates identical details; supplying three distinct fixture messages preserves that production contract. Main’s #173438 repair supplies distinct warning details. Its entire file is adopted unchanged, removing our diagnostic while retaining all assertions and timeouts.

Scheduled main run 38794323475 also failed the same case, exact expected headline selector, and 30-second wait. The main repair is adopted rather than requesting an inherited-CI exception for a changed test. Earlier model-picker failures exposed an invalid offline config write while the Gateway was running; main's #172739 repair now uses live config.patch, and both real-Gateway shards passed on 66938d70.

Earlier catalog-refresh, Gateway-readiness, and route-fulfillment failures are recorded in PR history; non-recurrence is not claimed as a causal fix. Six earlier STRICT_READ_UNTRACKED diagnostics matched the comparison base.

Screenshots

These complete synthetic Continue in terminal frames were captured from e0728f7f72f7c579f570b1cdb338888653b84c62 and 87379d2567a41d34400d2be0ab64b068d5f5ce2d. The later fixture repairs and main integration do not change this PR’s migrated view source; these historical captures do not establish full current-main visual parity, and fresh build/performance proof uses f6c04085 → 2f9494f5.

Before: synthetic Continue in terminal at the merge base

After: synthetic Continue in terminal with Solid pane support

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 15, 2026
@clawsweeper

clawsweeper Bot commented Oct 15, 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T20:56:26.996238Z 2f9494f New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 15, 2026
@clawsweeper

clawsweeper Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR ports chat pane support renderers from Lit to Solid while retaining existing state and lifecycle owners.

Example: Open Continue in terminal for a chat session at 1440×1000.

  • Before: Lit renders the continuation dialog with its command, copy control, and Close button.
  • After: Solid renders the same dialog; the inspected comparison images preserve its appearance.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The migration direction and visual evidence are sound, but a structural CSS regression and two deterministic test failures prevent a correctness pass.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored refactor is outside the ordinary contributor proof gate; directly inspected before/after browser images demonstrate the Continue in terminal presentation, while interaction coverage remains bounded by the recorded CI results.
Patch quality 🦪 silver shellfish (2/6) 3 actionable review findings remain.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Chat pane support still depends on Lit during the approved Solid migration.
Reason: Maintainer authorship establishes direction, and the change continues the existing migration while retaining domain owners and lazy boundaries.

Merge readiness

⛔ Needs changes before merge - 4 items remain

Keep open: this maintainer-directed Solid migration has a Details header regression and two test integrations that the renderer cutover breaks.

Priority: P2
Reviewed head: 2de3c7f08da440d70af14b4418ebdf41205f06b6

Before merge

  • Preserve the Details button's header ordering across the Solid wrapper (P2) - solidContent(PaneDetails, ...) inserts a display: contents span between .chat-pane__header-trailing and openclaw-chat-details. CSS selectors still follow the DOM tree, so details.css:49 no longer applies flex: none and order: 1. Details consequently precedes the actions instead of staying at the trailing edge, undoing the protection against its click target moving when an inactive pane reveals its actions. The existing chat-header-subagents browser test also times out on this exact direct-child contract. Preserve the direct host, or adapt the styling and locator together while retaining the fixed click position.
  • Migrate the unmaterialized-settings test off the removed renderer call (P2) - This now renders ChatModelControls directly through ChatPaneModelControl, but chat-pane-unmaterialized-settings.test.ts still spies on renderChatModelControls and reads its arguments after drawing. That function is never called on the new path, so every case throws 'Expected mounted composer control props' before checking queued settings, acknowledgment, or rollback. Exact-head checks-ui (2/3) reports seven such failures. Update the suite to mount the current rendering boundary and drive its controls while preserving those settings assertions.
  • Update the Discussion-link test for the new content boundary (P2) - Returning solidContent(ExternalPanelLink, ...) adds a span around the external link. The unchanged chat-sidebar-panel-contract.e2e.test.ts selects ':scope > a.rail-header__action[target="_blank"]' from the content actions, so Show discussion can no longer reach its href assertion. Exact-head checks-ui-e2e (4/9) times out at that locator. Update this consumer to locate the link through the new boundary, retaining its visibility and destination checks.
  • Explain or restore the original intent of Details header placement - bb7c69d: Details was deliberately ordered at the trailing edge to prevent pane activation from moving the click target; the new wrapper bypasses that CSS without explaining an intended behavior change.

Findings

  • [P2] Preserve the Details button's header ordering across the Solid wrapper — ui/src/pages/chat/chat-pane-layout-render.ts:190-191
  • [P2] Migrate the unmaterialized-settings test off the removed renderer call — ui/src/pages/chat/chat-pane-session-controls.ts:235-236
  • [P2] Update the Discussion-link test for the new content boundary — ui/src/pages/chat/chat-pane-embedded-panels.ts:39-40

Provenance

  • Details header placement changes intended behavior without addressing why it exists (bb7c69d: Details was deliberately ordered at the trailing edge to prevent pane activation from moving the click target; the new wrapper bypasses that CSS without explaining an intended behavior change.)

Tests

  • Missing end-to-end proof: The inspected screenshots establish dialog appearance, but do not demonstrate retained-pane switching, header activation, or hosted-panel interactions.
Agent review details

How this fits together

Control UI chat owners supply session facts, callbacks, and presentation descriptors to pane renderers, which produce headers, conversation layouts, embedded panels, and dialogs.

flowchart TD
  A[Gateway session facts] --> B[TypeScript pane owners]
  B --> C[Solid support views]
  C --> D[Chat header and layout]
  C --> E[Embedded panel hosts]
  C --> F[Dialogs]
  E --> B
  F --> B
Loading

Technical review

Best possible solution:

Complete the Solid cutover while preserving Details header geometry and updating the settings and Discussion-link tests to exercise their current boundaries.

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

Exact-head CI records the three failing integrations, and source inspection traces each to an introduced renderer change; no local runtime reproduction was attempted.

Is this the best way to solve the issue?

Keeping state and mutation authority in the existing TypeScript owners fits the migration, but the added interop wrappers require a complete cutover of structural CSS and test consumers.

Full review comments:

  • [P2] Preserve the Details button's header ordering across the Solid wrapper — ui/src/pages/chat/chat-pane-layout-render.ts:190-191
    solidContent(PaneDetails, ...) inserts a display: contents span between .chat-pane__header-trailing and openclaw-chat-details. CSS selectors still follow the DOM tree, so details.css:49 no longer applies flex: none and order: 1. Details consequently precedes the actions instead of staying at the trailing edge, undoing the protection against its click target moving when an inactive pane reveals its actions. The existing chat-header-subagents browser test also times out on this exact direct-child contract. Preserve the direct host, or adapt the styling and locator together while retaining the fixed click position.
    Confidence: 0.99
  • [P2] Migrate the unmaterialized-settings test off the removed renderer call — ui/src/pages/chat/chat-pane-session-controls.ts:235-236
    This now renders ChatModelControls directly through ChatPaneModelControl, but chat-pane-unmaterialized-settings.test.ts still spies on renderChatModelControls and reads its arguments after drawing. That function is never called on the new path, so every case throws 'Expected mounted composer control props' before checking queued settings, acknowledgment, or rollback. Exact-head checks-ui (2/3) reports seven such failures. Update the suite to mount the current rendering boundary and drive its controls while preserving those settings assertions.
    Confidence: 1
  • [P2] Update the Discussion-link test for the new content boundary — ui/src/pages/chat/chat-pane-embedded-panels.ts:39-40
    Returning solidContent(ExternalPanelLink, ...) adds a span around the external link. The unchanged chat-sidebar-panel-contract.e2e.test.ts selects ':scope > a.rail-header__action[target="_blank"]' from the content actions, so Show discussion can no longer reach its href assertion. Exact-head checks-ui-e2e (4/9) times out at that locator. Update this consumer to locate the link through the new boundary, retaining its visibility and destination checks.
    Confidence: 1

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Retained pane rendering keeps the original intent (5dd456a: The preceding retained-pane port preserved synchronous TypeScript ownership, retained content, routes, and disposal while cutting rendering over to Solid.)
  • Sidebar layout and embedded-panel definitions keeps the original intent (refactor(ui): give chat side-panel slots one definition #124950: One ordered panel declaration prevents availability, content, and empty-state behavior from drifting; the PR keeps that declaration and moves its rendering into Solid views.)
  • Stable sidebar content roots keeps the original intent (d9dcdfd: Interchangeable task panels retain content roots so docking and swapping preserve drafts, iframe documents, and terminal sessions.)
  • Queued session settings keeps the original intent (0805a9d: Settings intent must survive session creation and acknowledgment; production callbacks remain with the existing owner, although its regression test still depends on the replaced renderer.)
  • Terminal continuation dialog keeps the original intent (08b1343: Expose the existing session handoff command with independent terminal authentication; the PR preserves command construction and changes presentation only.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test ui/src/pages/chat/chat-pane-unmaterialized-settings.test.ts ui/src/pages/chat/chat-pane-session-controls.test.ts --maxWorkers=1
  • pnpm tsgo:ui
  • pnpm test:ui:e2e ui/src/e2e/chat-header-subagents.e2e.test.ts ui/src/e2e/chat-sidebar-panel-contract.e2e.test.ts --maxWorkers=1
  • git diff --check

What I checked:

PR surface

Source +469, Tests +394. Total +863 across 41 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 28 1200 731 +469
Tests 13 591 197 +394
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 41 1791 928 +863

Review metrics

Metric Value Why it matters
Production versus test growth Production/declarations +463 lines; tests/helpers +394 lines. Verified from the rename-aware introduced diff; the PR explains production growth as explicit Solid views and render descriptors.

Labels

Label changes:

  • add P2: The migration has a bounded header interaction regression and deterministic test failures requiring focused repairs.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: The migration has a bounded header interaction regression and deterministic test failures requiring focused repairs.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

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 October 15, 2026, 12:33 PM ET / 16:33 UTC.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 87379d2567

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

return (
<>
<LitContent value={props.header} />
{props.notice ? renderChatTopbarNotices(props.notice) : undefined}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the mounted topbar notice

When an error notice is visible, chat-pane-layout-render.ts creates a fresh notice object on every pane render, so this reactive ternary calls renderChatTopbarNotices again and supplies a newly created DOM subtree instead of updating the retained component used by the previous solidContent(...) path. Any unrelated pane update, such as a presence, board, sidebar, or Gateway-state refresh, can therefore replace the notice, collapsing an opened diagnostic <details>, dropping focus, and resetting CopyButton feedback. Mount the notice behind a stable component boundary and pass it live props so its view-owned presentation state survives.

AGENTS.md reference: ui/AGENTS.md:L17-L17

Useful? React with 👍 / 👎.

@steipete
steipete enabled auto-merge (squash) October 15, 2026 21:03
@steipete
steipete merged commit aee0ee2 into main Oct 15, 2026
98 of 100 checks passed
@steipete
steipete deleted the solid2/w-final-chat-pane branch October 15, 2026 21:15
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 16, 2026
* refactor(ui): port chat status and task suggestion renderers to Solid

* fix(ui): preserve forwarded attribution without an avatar

* refactor(ui): port retained chat pane support to Solid

* test(ui): exercise retained pane content through Solid harnesses

* test(ui): remove remaining Lit pane fixtures

* test(ui): use account section view props in pane harness

* test(ui): cover workspace rail inside pane Files panel

* test(ui): mount pane fixtures under a Solid event root

* test(ui): return void from pane fixture cleanup

* fix(ui): preserve chat pane DOM contracts after Solid port

* test(ui): surface search readiness failure diagnostics

* test(ui): restore state ownership in model picker fixture

* test(ui): publish picker catalogs through the live Gateway

* test(ui): diagnose final update report timeouts

* test(ui): use distinct warnings in update report fixture
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. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant