Repository navigation
refactor(ui): port chat rails and header views to Solid - #169442
Conversation
Preserve lazy registration and existing tags through the Solid bridge. Keep synchronous session and workspace owners, native event ordering, focused controls, open menus, and selected text across view refreshes.
|
🦞👀 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: needs changes before merge. What this changesThis PR replaces Lit chat headers, session rails, and related views with Solid renderers using the existing state owners and interoperability bridges. Example: Open the session menu for the “Visual parity” conversation.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep open: this PR advances the approved Solid migration while preserving existing chat owners and controls. No actionable patch defect was found; the earlier conflict and compact Sharing concerns are resolved. Priority: P2 Before merge
FindingsNone. Agent review detailsHow this fits togetherThe Control UI consumes Gateway session facts and synchronous pane owners, renders chat controls and rails, and forwards user actions to the existing controllers. flowchart LR
Gateway[Gateway session facts] --> Owners[Synchronous pane owners]
Owners --> Bridge[Shared rendering bridges]
Bridge --> Views[Solid chat views]
Views --> DOM[Browser controls and rails]
DOM --> Controllers[Existing action controllers]
Controllers --> Gateway
Technical reviewBest possible solution: Land the Solid renderers through the existing bridges after the current-head gates are satisfied. Do we have a high-confidence way to reproduce the issue? This is a renderer refactor; source comparisons and supplied browser evidence establish the preservation target, and no target code was executed during this read-only review. Is this the best way to solve the issue? The migration uses the repository’s established Solid bridges, preserves synchronous owners and lazy loading, and removes the replaced Lit implementations. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6a3b7067d5e9. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +495, Tests +222, Other -2. Total +715 across 59 files. Added test files: 0. View PR surface stats
LabelsLabel changes: No label 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 (14 earlier review cycles; latest 8 shown)
Reviewed October 12, 2026, 7:44 AM ET / 11:44 UTC (Revision 15). |
Related: #168887, #169439, #169441 ## What Problem This Solves Fixes missing nested chat activity and stale media resources after the Solid transcript migration, restoring 20 failing `checks-ui` cases inherited by unrelated PRs. ## User Impact Expanded activity shows its nested calls again. Parked image and video previews release their resources and reconnect through the existing scope-checked caches. No settings, protocol, storage, or migration changes. ## Why This Change Was Made Keep deferred tool-card children inside their existing Lit-owned range instead of creating nested Solid roots that are retired while parked. Bind image and video resource lifetimes to the existing Solid presentation context. Update lifecycle fixtures to await the documented deferred Solid disposal boundary without removing or weakening any assertions. Checked steipete's open UI PRs before editing. #169442 overlaps the activity headline, not these repairs. #169346 has green UI results on an older tree, but its head lacks the later bridge changes and does not repair these current-main failures. No overlap with Pash/Sarah changes. ## Evidence - Baseline `a9b40cf325e`: all **20 reported failures reproduced** across eight files (116 other cases passed). - Rebased onto current main, including #169439 and #169441: **190 tests passed across 10 files**, including all 20 failures plus media handoff and native media siblings. - `pnpm tsgo:ui`: passed. - `pnpm run tsgo:test:ui`: all UI shards passed. - Changed-file oxlint/oxfmt, line-cap ratchet against `origin/main`, and `git diff --check`: passed. - Independent P0–P2 review: no actionable findings. - Original failing CI: [shard 2](https://github.com/openclaw/openclaw/actions/runs/38184982892/job/114605449166), [shard 3](https://github.com/openclaw/openclaw/actions/runs/38184982892/job/114605449173), and [image admission run](https://github.com/openclaw/openclaw/actions/runs/38184424359). ### Expanded activity, before and after Captured from the same Chromium fixture and inspected. Before: the opened parent has no nested calls. After: the calls render and the original height/collapse assertions pass. | Before | After | | --- | --- | |  |  | |  |  | <details> <summary>Per-test disposition: all 20 fixed</summary> | Test file | Previously failing cases | Status | | --- | --- | --- | | `chat-activity-layout.browser.test.ts` | Expanded height and collapse, standalone | fixed | | `chat-activity-layout.browser.test.ts` | Expanded height and collapse, inline | fixed | | `chat-activity-layout.browser.test.ts` | Opened lone step with routine nested calls | fixed | | `chat-activity-disclosure.test.ts` | Settled completed step with routine nested calls | fixed | | `chat-position-rail.test.ts` | Focused previews, pointer exit, removal, and session reset | fixed | | `chat-message-attachment-admission.test.ts` | Stale admission after source replacement/disconnect | fixed | | `chat-message-text-chip-admission.test.ts` | Stale comment observations | fixed | | `chat-message-text-chip-admission.test.ts` | Stale paste observations | fixed | | `chat-transcript-invalidation.test.ts` | Hidden video preview, rendered parent | fixed | | `chat-transcript-invalidation.test.ts` | Hidden video preview, parked parent | fixed | | `chat-message-media-lifecycle.test.ts` | Guarded managed image reconnect | fixed | | `chat-message-image-admission.test.ts` | Loaded assistant image remount | fixed | | `chat-message-image-admission.test.ts` | Loaded assistant image reconnect | fixed | | `chat-message-image-admission.test.ts` | Detached image after authToken change | fixed | | `chat-message-image-admission.test.ts` | Detached image after sessionKey change | fixed | | `chat-message-image-admission.test.ts` | Detached image after agentId change | fixed | | `chat-message-image-admission.test.ts` | Detached image after connectionEpoch change | fixed | | `chat-message-image-admission.test.ts` | Detached image after resourceBasePath change | fixed | | `chat-message-image-admission.test.ts` | Detached image after policyKey change | fixed | | `chat-message-image-admission.test.ts` | Detached image after expiry | fixed | No reported case was already fixed on the captured main baseline. The managed-image remount sibling already passed and continues to pass. </details> Two-way door: reverting restores the prior rendering/resource behavior without changing persistent state. Blast radius is Control UI chat activity disclosure and image/video preview lifecycles. Co-authored-by: Ayaan Zaidi <[email protected]>
Preserve current main behavior for opt-in speech bubbles and readable activity headers while retaining the Solid renderers. Resolve lazy portal and companion imports without introducing an eager route dependency.
Related: openclaw#168887, openclaw#169439, openclaw#169441 ## What Problem This Solves Fixes missing nested chat activity and stale media resources after the Solid transcript migration, restoring 20 failing `checks-ui` cases inherited by unrelated PRs. ## User Impact Expanded activity shows its nested calls again. Parked image and video previews release their resources and reconnect through the existing scope-checked caches. No settings, protocol, storage, or migration changes. ## Why This Change Was Made Keep deferred tool-card children inside their existing Lit-owned range instead of creating nested Solid roots that are retired while parked. Bind image and video resource lifetimes to the existing Solid presentation context. Update lifecycle fixtures to await the documented deferred Solid disposal boundary without removing or weakening any assertions. Checked steipete's open UI PRs before editing. openclaw#169442 overlaps the activity headline, not these repairs. openclaw#169346 has green UI results on an older tree, but its head lacks the later bridge changes and does not repair these current-main failures. No overlap with Pash/Sarah changes. ## Evidence - Baseline `1bb91e30fd5`: all **20 reported failures reproduced** across eight files (116 other cases passed). - Rebased onto current main, including openclaw#169439 and openclaw#169441: **190 tests passed across 10 files**, including all 20 failures plus media handoff and native media siblings. - `pnpm tsgo:ui`: passed. - `pnpm run tsgo:test:ui`: all UI shards passed. - Changed-file oxlint/oxfmt, line-cap ratchet against `origin/main`, and `git diff --check`: passed. - Independent P0–P2 review: no actionable findings. - Original failing CI: [shard 2](https://github.com/openclaw/openclaw/actions/runs/38184982892/job/114605449166), [shard 3](https://github.com/openclaw/openclaw/actions/runs/38184982892/job/114605449173), and [image admission run](https://github.com/openclaw/openclaw/actions/runs/38184424359). ### Expanded activity, before and after Captured from the same Chromium fixture and inspected. Before: the opened parent has no nested calls. After: the calls render and the original height/collapse assertions pass. | Before | After | | --- | --- | |  |  | |  |  | <details> <summary>Per-test disposition: all 20 fixed</summary> | Test file | Previously failing cases | Status | | --- | --- | --- | | `chat-activity-layout.browser.test.ts` | Expanded height and collapse, standalone | fixed | | `chat-activity-layout.browser.test.ts` | Expanded height and collapse, inline | fixed | | `chat-activity-layout.browser.test.ts` | Opened lone step with routine nested calls | fixed | | `chat-activity-disclosure.test.ts` | Settled completed step with routine nested calls | fixed | | `chat-position-rail.test.ts` | Focused previews, pointer exit, removal, and session reset | fixed | | `chat-message-attachment-admission.test.ts` | Stale admission after source replacement/disconnect | fixed | | `chat-message-text-chip-admission.test.ts` | Stale comment observations | fixed | | `chat-message-text-chip-admission.test.ts` | Stale paste observations | fixed | | `chat-transcript-invalidation.test.ts` | Hidden video preview, rendered parent | fixed | | `chat-transcript-invalidation.test.ts` | Hidden video preview, parked parent | fixed | | `chat-message-media-lifecycle.test.ts` | Guarded managed image reconnect | fixed | | `chat-message-image-admission.test.ts` | Loaded assistant image remount | fixed | | `chat-message-image-admission.test.ts` | Loaded assistant image reconnect | fixed | | `chat-message-image-admission.test.ts` | Detached image after authToken change | fixed | | `chat-message-image-admission.test.ts` | Detached image after sessionKey change | fixed | | `chat-message-image-admission.test.ts` | Detached image after agentId change | fixed | | `chat-message-image-admission.test.ts` | Detached image after connectionEpoch change | fixed | | `chat-message-image-admission.test.ts` | Detached image after resourceBasePath change | fixed | | `chat-message-image-admission.test.ts` | Detached image after policyKey change | fixed | | `chat-message-image-admission.test.ts` | Detached image after expiry | fixed | No reported case was already fixed on the captured main baseline. The managed-image remount sibling already passed and continues to pass. </details> Two-way door: reverting restores the prior rendering/resource behavior without changing persistent state. Blast radius is Control UI chat activity disclosure and image/video preview lifecycles. Co-authored-by: Ayaan Zaidi <[email protected]>
Keep the visibility values dependency-free for UI consumers, preserve the existing schema export, and prune retired assertion allowances.
Retain the Solid header unmount before mounting the migrated sidebar editor menu. Chromium and WebKit header cases, 46 header tests, 19 rail tests, scoped header E2E, UI types and base/head performance comparison pass.
Allow local headline and hosted-tab presentation updates during retained Lit commits, keep custom element typing with its registered Solid owner, and update legacy tests to observe committed Solid behavior. Fixes the scoped UI and type failures found by PR CI.
|
Merged via squash auto-merge.
|
) * refactor(ui): migrate chat rails and header views to Solid Preserve lazy registration and existing tags through the Solid bridge. Keep synchronous session and workspace owners, native event ordering, focused controls, open menus, and selected text across view refreshes. * fix(ui): narrow sharing visibility through canonical values Keep the visibility values dependency-free for UI consumers, preserve the existing schema export, and prune retired assertion allowances. * fix(ui): remove the header menu import cycle * fix(ui): preserve nested Solid presentation updates Allow local headline and hosted-tab presentation updates during retained Lit commits, keep custom element typing with its registered Solid owner, and update legacy tests to observe committed Solid behavior. Fixes the scoped UI and type failures found by PR CI. * fix(ui): preserve migrated chat rail updates and header spacing
What Problem This Solves
Ports the chat session rails, header controls, placement, sharing, activity, suggestions, swarm progress, and workspace-conflict views from Lit to Solid. Each registered tag has one implementation, with existing Lit callers using the shared Solid bridge. Tags, classes, routes, selectors, and lazy boundaries are preserved; no dependency or startup import was added.
Synchronous session and workspace owners remain plain TypeScript. The pane publishes a shallow companion view so Solid observes owner mutations, and retained image reads query current attachment membership so Clear cannot resurrect an old image. Header menus retain focus and execute Layout actions after closing. Direct Solid composition fixes compact Sharing rendering only Back. Two native-header CSS descendant selectors preserve safe insets through the display-contents adapter. Existing legacy menu and attachment fragments stay at their owning migration seams.
Main's current Share/Layout/overflow header, Versions menu, running-subagent summary, and labelled Incognito control/limits notice are included. The Incognito conflict resolution keeps the Solid facade and adopts main's exact classes, copy, tooltip activation, and canonical-key fallback. The coupled Versions-menu interface re-exports its existing bridge factory; domain ownership is unchanged.
Evidence
ci:fullenabled for every UI shard; all78 exact-head CI jobs pass. Native auto-merge landed headcca2ad861619asb3d76a9a100e182b53cdcb5578daff3a6a6a44cawith no waived checksRenderer LOC for the changed migrated families against main
37064938ac97: 2,824 → 3,308 (+484). Growth comes from typed bridge contracts and stable Solid boundaries needed to preserve retained DOM. The coupled pane publication adds three production lines outside this count. No new domain abstraction or synchronized state owner is introduced.The retained-panel and compact Sharing failures were reproduced before their respective repairs. The native header regression expected 90px clearance and received 12px before the selector repair; all 26 header/native cases now pass. Import ordering and the menu import cycle were repaired. Main's help IDs and parked-overlay retirement remain with their existing owners.
Two wrapper-inventory failures reproduced identically on prior pinned base
8bfda3d9051; newer main includes the missing inventory entry. During the Incognito integration, UI type/lint preparation found main's missingisSteerConfirmationRewriteexport; main's subsequent one-file repair switches to its canonical admission-preservation helper. The first fresh baseline build needed existing per-package dependency links; this was a checkout-layout failure, with no dependency changes or borrowed-install reconciliation.Investigated uncertainty remains recorded: a historical Vitest worker exited after seven passing menu cases without an assertion failure; the complete file now passes 23/23, which does not explain the earlier exit. Prior CI's avatar fetch-count failure remains unattributed: selected cases pass on the pinned base under Node/Bun and the candidate's four-case file passes under Bun. All three current UI unit shards pass; the historical avatar failure cause remains unexplained. Scoped rail lint has one nonblocking advisory for an intentional getter that reads current props when invoked.
Local proof uses
--maxWorkers=1: original rail5.75s, activity5.86s, workspace rail3.34s, toolbar6.30s; full header-menu 48.03s; header browser Chromium 62.65s/WebKit 24.04s; three header E2E files 686.23s including setup/build; final Clear file 155.73s including build/setup (27.76s file tests); Incognito header 57.89s, before/after recovery 40.59s/14.56s. Focused Sharing keyboard probe: Chromium 4.14s and WebKit under Node 29.56s. The first WebKit/Bun attempt failed to connect before any tests ran (60.01s); its startup cause remains unexplained and is not claimed repaired by the Node replay. Hosted CI run 38243455391 passes all78 jobs on exact headcca2ad861619. UI job runner time: unit shards332/425/300s; nine E2E shards285–799s each; real-Gateway shards688/724s. Total selected UI runner time8040s (parallel jobs, not elapsed wall time). Testbox was tried once and stopped; no active lease, whole-repository local suite, or local container.Screenshots
Before/after captures use the same synthetic fixtures and desktop-light viewport. The baseline is
8bfda3d9051; the candidate contains its integrated header behavior.Earlier inspected mobile-rail comparison (its renderer is unchanged by the final header integration):
Inspected synthetic native Linux header, using the same fixture at 1280×900. The baseline uses the pinned base build; the candidate restores the same safe clearance.
Inspected synthetic Incognito fresh-session state (same existing recovery fixture, 1280×900). The baseline's incidental composer hover tooltip is outside the changed header; this pair is manual visual evidence, not a full-image byte-parity claim.