Skip to content

refactor(ui): render retained chat panes with Solid - #169835

Merged
steipete merged 66 commits into
mainfrom
solid2/w-chat-7
Oct 14, 2026
Merged

steipete merged 66 commits into
mainfrom
solid2/w-chat-7

Conversation

@steipete

@steipete steipete commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Problem and solution

The retained chat page still used Lit page/pane implementations and transitional transcript, markdown, message and tool-card adapters. This cutover renders the landed Solid composer and chat components directly, deletes superseded implementations, and moves the two remaining test adapters out of the production surface.

Plain TypeScript owners retain session, request, presentation, route readiness, eviction and disposal authority. Host tags, CSS classes, routes, selectors, fixed slots, three retained panes and one startup RPC remain intact. Connected frame ranges preserve widget iframe ancestry through reordering and disposal. Chat and optional surfaces remain lazy. No dependency or version change is added.

The port preserves queued-panel recipients, Home/workbench custody, prefetch listeners, scroll ownership and sidebar context replacement. Provider notices retain their DOM node across unrelated pane publications. The MCP harness recognizes the current Gateway listener marker while retaining PID liveness and /readyz checks and durable client-error diagnostics. Current-main mobile details, hidden-conversation error notices and companion-focus ownership are carried into the Solid consumers.

The sidebar catalog suite runs in the existing isolated UI project: its shared Bun worker hit the 20-minute deadline without a failed assertion, while all 81 cases pass standalone in 6.8 seconds and in the isolated project in 9.1 seconds. Assertions, timeouts and runtime coverage remain intact.

Proof

Final head: d76a87bf997a7a03e930ef8398b41f4cff000941. Full run: 38496136885. ci:full runs every UI unit, browser, extension and real-Gateway shard.

Check Result
Final full UI CI All 14 shards passed: 3 unit, 9 browser, 2 real-Gateway
Build / types / security Passed in final CI; local pnpm tsgo:ui also passed
Docker / MCP Passed in final CI
Performance Final strict and differential checks passed
Independent review Cutover, integrations, provider-notice repair and final catalog isolation reviewed; no unresolved actionable finding
Focused regressions Provider notice 15/15, sidebar roster 11/11, approval integration 8/8, isolated Bun catalog 81/81 passed
Retention / WeakRef 22 WeakRef cases passed in earlier full UI CI; final full UI run covers the integrated owners. Earlier focused proof includes WebKit focus, retention, scrolling and coupled pane/history/panel cases
Production Knip Final head and exact main baseline both report the same single unused apps/linux/scripts/test-stage-package.mjs; no new ignores
Inherited CI exception One core job fails in two Plugin SDK surface-budget cases, reproduced on exact main baseline as detailed below

The only failed CI job is checks-node-compact-small-16. Both cases are in test/scripts/plugin-sdk-surface-report.test.ts: “joins the registered SDK command’s compiler before reporting success” and “does not let a lowered export budget authorize a shipped name removal.” The exact main baseline f183f386 reproduces the latter test failure and the former’s executed command, pnpm plugin-sdk:surface:check: public exports 3759 > 3758, callable exports 2194 > 2193. The Linux-only process-lifecycle test is skipped locally; its checker command was reproduced separately. The complete src, packages, extensions, checker and test inputs are identical in baseline and CI merge 7119fe3b. CI labels the job “unknown” because scheduled main uses different compact-job packing; direct baseline proof establishes inheritance.

Landing uses the documented native inherited-failure route after confirmed cancellation of the original auto request. The failed job remains recorded as failed. No local Docker, OrbStack, whole-repository suite or E2E battery was run. All task Testbox leases are stopped and settled.

Performance and size

Paired builds on the same Mac measured main 9f79 at 348,753 B startup JavaScript gzip / 8 requests and Solid b6e5 at 348,713 B / 8 requests; both had 49,590 B startup CSS gzip / one request. Both builds and strict/differential checks passed.

Final CI measures 348,776 B startup JavaScript gzip / 8 requests and 49,703 B startup CSS gzip / one request. Lazy boundaries remain intact and the restored startup budget passes.

UI production LOC: 24,483 → 25,629 (+1,146; 4.7%), 87 paths, against integrated main f183f386. The no-renames union includes deleted Lit duals and excludes tests/support. Growth comes from explicit JSX/bridge lifetimes, the owner/render-host split and connected custody of widget frames. The MCP diagnostic adds 22 net test/harness lines outside that count.

Before / after

Synthetic normal chat, 1440×960, light and dark. Main 0122 is left; Solid b245 is right. Both raw pairs are byte-identical: zero changed pixels across 2,764,800 compared pixels. All originals and complete sheets were inspected. Later changes preserve these rendering contracts.

Before main 0122 / after Solid b245: normal chat, light

Before main 0122 / after Solid b245: normal chat, dark

Preserve fixed pane slots, parked presentation, route readiness, and MCP retirement while moving page and pane rendering to Solid. Keep synchronous domain controllers and the existing lazy header, sidebar, and composer boundaries. Remove retired transcript adapters and render frames and tool cards natively.

Independent review: restored captureNavigationFace forwarding through the pane bridge and added a real-host navigation-face regression. Focused lifecycle, Chromium/WebKit cadence, page retention, and WeakRef proof passed; aggregate browser proof follows integration with current main.
Combine the current main retention and profile-directory changes with the pane port. Keep nested Solid roots parked under the shared interop owner and retain the existing avatar subscriptions.

Resolve final review finding by retaining horizontal split dividers across resize publications, preserving drag ownership and keyboard focus. The new regression failed before the fix and the page suite now passes.
Adopt current main and its Solid runtime and media retirement fixes. Preserve captured component owners for plugin defaults while retiring legacy ranges through their existing registry. Keep teardown outside disposed reactive owners.

Migrate the remaining pane/page fixtures to actual Solid lifecycles and both application-context protocols. All 23 focused files pass (245 tests), including prior failures and the three WeakRef suites; incremental independent review found no actionable P0-P2 findings.
@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 12, 2026
@clawsweeper

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

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui scripts Repository scripts size: XL labels Oct 12, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 12, 2026
@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR replaces retained chat-page, pane, and transcript rendering with Solid while preserving TypeScript state and lifecycle owners.

Example: Open a retained conversation containing “Review the release checklist.”

  • Before: Lit renders the page and pane.
  • After: Solid renders the page and pane using the existing conversation owners.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Approved migration work has useful earlier visual evidence, but a confirmed test cutover failure and two bounded UI regressions prevent readiness.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; inspected production-build screenshots establish earlier chat parity, while later native route integration is outside their demonstrated coverage.
Patch quality 🦪 silver shellfish (2/6) 3 actionable review findings remain.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Retained conversations, drafts, and embedded widgets must keep working during the Control UI's Solid migration.
Reason: Maintainer-authored direction and substantial prior ownership establish approval for this rendering cutover.

Merge readiness

⛔ Needs changes before merge - 5 items remain

Keep open: this maintainer-directed migration remains necessary, but a confirmed test cutover failure and two previously identified UI regressions need correction.

Priority: P2
Reviewed head: 5785eeddbfb0cfd1fc561adc29a4a2c0d83cfe02

Before merge

  • Migrate the boot render probe to the native pane boundary (P2) - The pane cutover removes performUpdate from the registered element's prototype, but installRenderProbe still discovers instances exclusively by wrapping that Lit method. Consequently the busy cold-load test records no openclaw-chat-pane entry and fails at this assertion before exercising menu opening and draft preservation. Current-head CI confirms undefined versus 1. Count the mounted native pane and observe its real render lifecycle while retaining the menu and draft assertions. This test arrived through the newly integrated base, so the failure is new review evidence.
  • Use reactive translations in the retained split renderer (P3) - Open split chat in English, change Appearance language to German, and return to the retained chat: translation-only divider labels and mounted unbound-pane copy can retain English because this translator creates no locale dependency and ChatPageState no longer inherits I18nController. Import the reactive translator from ../../lib/reactive/i18n.ts. This previously identified late finding remains on renderer code unchanged since the earlier reviewed head.
  • Calculate onboarding chrome after the page host is attached (P3) - At 390px, opening /chat/main?onboarding=1 constructs ChatPageView before its bridge host is inserted. This immediate connect calculates mergedChrome while closest('.shell--onboarding') is null, leaving mergedChrome=true after attachment. The header then offers navigation that the onboarding shell disables. Recalculate the chrome fact after attachment. This previously identified late finding remains unchanged from the preceding reviewed head.
  • Complete next step - Resolve GitHub's reported merge conflict and classify the remaining plugin-workspace, pasted-text geometry, and collaborator-scroll failures using matching base evidence or a specific repair.
  • Explain or restore the original intent of Live split-page localization - deb7faf: refactor(ui): harden Lit lifecycle boundaries #102745 explicitly requires language changes to propagate without remounting; the port omits the corresponding reactive dependency.

Findings

  • [P2] Migrate the boot render probe to the native pane boundary — ui/src/e2e/chat-boot-render-storm.e2e.test.ts:272
  • [P3] Use reactive translations in the retained split renderer — ui/src/pages/chat/chat-page-pane-render.tsx:7
  • [P3] Calculate onboarding chrome after the page host is attached — ui/src/pages/chat/chat-page.ts:39

Provenance

Tests

  • Low-value test ui/src/pages/chat/chat-page-draft-commit.test.ts: Replace the deferred Lit fixture with a native page-and-pane regression: delaying the mocked child's Lit scheduler does not exercise the shipped Solid pane commit fence.
  • Missing end-to-end proof: The supplied captures predate native route integration, and no native draft-before-cleanup, retained locale-switch, or mobile onboarding demonstration is supplied.
Agent review details

How this fits together

The Control UI combines route data and Gateway session state into retained panes containing transcripts, composers, and plugin surfaces.

flowchart LR
  A[Chat route] --> B[Page state owner]
  B --> C[Retained pane slots]
  C --> D[Solid pane renderer]
  E[Gateway session owners] --> D
  D --> F[Transcript and composer]
  D --> G[Plugin surfaces]
Loading

Technical review

Best possible solution:

Complete the native cutover with reactive translations, attachment-time chrome calculation, and tests observing native rendering boundaries.

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

Current-head CI confirms the obsolete boot probe fails, and source establishes the retained translation and detached-host chrome paths; no target code was executed during this review.

Is this the best way to solve the issue?

Keeping synchronous domain owners while replacing rendering follows the approved migration; the remaining repairs belong in the existing translation, attachment, and test boundaries.

Full review comments:

  • [P2] Migrate the boot render probe to the native pane boundary — ui/src/e2e/chat-boot-render-storm.e2e.test.ts:272
    The pane cutover removes performUpdate from the registered element's prototype, but installRenderProbe still discovers instances exclusively by wrapping that Lit method. Consequently the busy cold-load test records no openclaw-chat-pane entry and fails at this assertion before exercising menu opening and draft preservation. Current-head CI confirms undefined versus 1. Count the mounted native pane and observe its real render lifecycle while retaining the menu and draft assertions. This test arrived through the newly integrated base, so the failure is new review evidence.
    Confidence: 0.99
  • [P3] Use reactive translations in the retained split renderer — ui/src/pages/chat/chat-page-pane-render.tsx:7
    Open split chat in English, change Appearance language to German, and return to the retained chat: translation-only divider labels and mounted unbound-pane copy can retain English because this translator creates no locale dependency and ChatPageState no longer inherits I18nController. Import the reactive translator from ../../lib/reactive/i18n.ts. This previously identified late finding remains on renderer code unchanged since the earlier reviewed head.
    Confidence: 0.99
    Late finding: first raised on code an earlier review cycle already covered.
  • [P3] Calculate onboarding chrome after the page host is attached — ui/src/pages/chat/chat-page.ts:39
    At 390px, opening /chat/main?onboarding=1 constructs ChatPageView before its bridge host is inserted. This immediate connect calculates mergedChrome while closest('.shell--onboarding') is null, leaving mergedChrome=true after attachment. The header then offers navigation that the onboarding shell disables. Recalculate the chrome fact after attachment. This previously identified late finding remains unchanged from the preceding reviewed head.
    Confidence: 0.97
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.95

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Migration remains necessary: Fetched main still implements ChatPage with OpenClawLightDomElement; the native page cutover remains unique work. (ui/src/pages/chat/chat-page.ts:61, 0e0e87d465c9)
  • Confirmed boot-probe failure: Current-head CI reports undefined instead of one pane instance at the render-storm assertion; its probe only instruments performUpdate on registered custom-element prototypes. (ui/src/e2e/chat-boot-render-storm.e2e.test.ts:272, 5785eeddbfb0)
  • Retained translation dependency: The split renderer imports the nonreactive translator, while the replacement page state lacks the former locale controller; the relevant renderer is unchanged since the earlier reviewed head. (ui/src/pages/chat/chat-page-pane-render.tsx:7, 5785eeddbfb0)
  • Detached onboarding calculation: ChatPageView connects its state during bridge construction, before attachment; connect calculates mergedChrome from shell ancestry and only viewport changes recalculate it. (ui/src/pages/chat/chat-page.ts:39, 5785eeddbfb0)
  • Current merge and validation state: GitHub reports mergeable=false and dirty for the reviewed head. Current CI also reports plugin workspace, pasted-text geometry, and collaborator-scroll failures; their attribution remains unresolved rather than established as inherited. (5785eeddbfb0)
  • Visual evidence inspected: The downloaded light and dark comparisons show normal, empty, history-error, and long-transcript parity at the declared earlier rendering checkpoint; the additional shell images belong to the preceding shell migration. (65f0c7caba79)

Likely related people:

  • Peter Steinberger: Raw commit 750d0dc adds ui/src/pages/chat/chat-page-retained-sessions.ts:47 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 750d0dcd9e78; files: ui/src/pages/chat/chat-page-retained-sessions.ts)
  • Vincent Koc: Raw commit 674599e adds ui/src/pages/chat/chat-page-retained-sessions.ts:196 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 674599e0bc34; files: ui/src/pages/chat/chat-page-retained-sessions.ts)

PR surface

PR surface statistics unavailable: the file list is incomplete.

Labels

Label changes:

  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Label justifications:

  • P2: The confirmed validation defect and bounded localization/onboarding regressions warrant normal-priority repair.
  • 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.

History

Review history (25 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-12T22:59:42.166Z sha 2d8faed :: needs changes before merge. :: [P3] Use reactive translations in the retained split renderer
  • reviewed 2026-10-12T23:09:45.020Z sha 2d8faed :: needs changes before merge. :: [P3] Use reactive translations in the retained split renderer
  • reviewed 2026-10-12T23:41:43.431Z sha 21810b5 :: needs changes before merge. :: [P3] Use reactive translations in the retained split renderer
  • reviewed 2026-10-13T00:08:56.851Z sha 21810b5 :: needs changes before merge. :: [P3] Use reactive translations in the retained split renderer
  • reviewed 2026-10-13T00:55:17.686Z sha 65f0c7c :: needs changes before merge. :: [P3] Use reactive translations in the retained split renderer
  • reviewed 2026-10-13T01:13:55.047Z sha 6e5bccb :: needs changes before merge. :: [P3] Use reactive translations in the retained split renderer
  • reviewed 2026-10-13T02:15:45.206Z sha 4677fa5 :: needs changes before merge. :: [P2] Provide the shell layout scope before rendering the native chat page | [P2] Migrate the recorded-wait regression to the native renderer | [P2] Replace the deferred Lit draft fixture with native commit proof | [P3] Use reactive translations in the retained split renderer
  • reviewed 2026-10-13T02:54:24.543Z sha f712f37 :: needs changes before merge. :: [P2] Move the deferred draft regression onto the native commit fence | [P3] Use reactive translations in the retained split renderer | [P3] Calculate onboarding chrome after the page host is attached

Reviewed October 12, 2026, 11:25 PM ET / October 13, 2026, 03:25 UTC (Revision 26).

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Oct 12, 2026
@clawsweeper clawsweeper Bot added the rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. label Oct 12, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

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. docker Docker and sandbox tooling 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. scripts Repository scripts 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