Skip to content

refactor(ui): retire chat pane Lit template interop - #174068

Merged
steipete merged 15 commits into
mainfrom
solid2/w-end-content-a-layout
Oct 16, 2026
Merged

steipete merged 15 commits into
mainfrom
solid2/w-end-content-a-layout

Conversation

@steipete

@steipete steipete commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Retires the remaining Lit template interop in chat pane layouts, side panels, and their coupled fixtures. Against 1dbc6fb1f327fb861889c8abf8174fbf73052f24, scoped chat interop files fall 37 → 0, including production 18 → 0, completing the campaign's 132 total / 88 production → zero cutover.

User Impact

Chat keeps its existing tags, controls, keyboard/focus behavior, lazy loading, and retained panel identity. Selected Review content also retires correctly when its pane is hidden while the selection is cleared.

Why This Change Was Made

The pane snapshot carries plain layout and panel data. Retained Solid components own the header, conversation, background, panels, and overlays directly. Native header, Details, outbox recovery, tool-icon, plugin-panel, and Files lifecycle owners remain authoritative. Review presentation is captured beside selected content, so hiding a pane cannot reread a newer selection and leave old content connected.

Sidebar definitions use the canonical IconName contract, and conversation identity uses plain AgentIdentity data. Native SVG placement, namespace, filled-shape and gradient assertions remain. The final consumers were also the last users of solid-content.tsx; this PR removes that renderer, its obsolete dedicated tests, and orphaned chat adapters together. Dependencies and migration-policy retirement remain with their owners.

This is one complete renderer cutover: 46 files, 22 production, including coupled fixtures and shared owner deletion. Splitting the orphan removal would leave production Knip failing. Touched production LOC is 6,094 → 5,799 (−295; +376/−671); tests/support +453/−848 (−395). The integration preserves main's canonical icon and embedded-plugin owners.

Evidence

Final candidate: 80686b31abf24f4ad5eb8f308a9207400c5b1f5d; baseline: 1dbc6fb1f327fb861889c8abf8174fbf73052f24.

Check Result
UI typecheck pnpm tsgo:ui passed
Scoped lint / format / diff check Passed; warnings are limited to snapshot helpers, imperative islands, and fixture style props
Production Knip pnpm deadcode:knip passed on final integrated head; no ignores
Newly affected tests, once, one worker 37 passed across sidebar region, embedded panels, and native icon geometry
Retained focused proof Files panel 27, hosted tabs 11, toolbar 3, sidebar view 2, and history attachment Open → Files passed on unchanged input contracts before integration
Fresh isolated P2 autoreview Full production cutover and final five-file fixture repair each validated scoped-clean; no actionable findings
Exact baseline build / strict startup check Passed: 339,456 B gzip JS (7 requests), 38,786 B CSS (1 request), zero violations
Exact production head build / strict startup check Passed: 339,371 B gzip JS (7 requests), 85 B smaller; unchanged 38,786 B CSS (1 request), zero violations
Inspected synthetic before/after screenshots All four full PNG pairs are byte-identical: Conversation, interactive HTML Files preview, Layout menu, retained frame after Swap. All eight inspected and shown in chat
Repaired CI fixtures 45 unit + 19 paired Chromium tests passed; Files callback props, retained native detail content, and stateless shared pane mock; 19.23 s unit / 16.82 s browser wall time
Mock-export guard Passed after adding the documented rationale to both indirect isolated mocks; no baseline or ignore changes
Affected chat test types Passed, including the native Files callback and new generic fixture renderer
Full UI/browser/real-Gateway proof Final-head ci:full run 38895268310, attempt 1, completed: all UI units/types/lint, browser-extension bootstrap, eight E2E shards, both real-Gateway shards, security and performance passed. Only the two inherited jobs below failed

The native inherited-failure exception covers two failed jobs in the exact final-head run. Its tested merge is 73e1c13624e03d07985bad796d21c80183424122, with ordered parents main bc8b7ddb1b14cb1d4bcac3741316630f52b174bd and head 80686b31abf24f4ad5eb8f308a9207400c5b1f5d:

  • checks-ui-e2e (6/9): Models page keeps controls separate and publishes discovery into a passive picker, at 1440, 1100, 768, 640 and 390 px. Main already contains the unconditional seventh Utility Fallback Model row introduced by 6861671cda97642a02854d085bd04ecc6fd9bb98, while its E2E expectation lists six rows. The test, complete Models settings directory, helper and English catalog are byte-identical between the tested main base and PR merge.
  • checks-fast-baseline-ratchets: assertion-safety requires shrinking src/media/media-facts.ts from baseline 16 → 14. Main's 9b9933e290 removes unused media-reader exports and two type assertions without pruning that entry. The media source, baseline and checker are byte-identical between tested main and PR merge; every other subratchet passed.

Both failures also reproduce in completed scheduled main run 38894297213 at 1dbc6fb1: the same five Models names and extra row, and the same media 14 < 16 signature. They have both exact-signature and unchanged-source attribution independent of shard names. No affected main owner or baseline is changed here, and this CI run is not claimed green.

Fresh paired build, strict startup, and four-state visual proof was captured on exact baseline 1dbc6fb1f327fb861889c8abf8174fbf73052f24 and head 80686b31abf24f4ad5eb8f308a9207400c5b1f5d on the same machine. Chat boot improves 31 → 30 requests, 1,654,035 → 1,644,751 B (−9,284). All four refreshed full PNG pairs are byte-identical; all eight also match the already-published screenshots below, which were individually inspected again. Both sides had no page errors and preserved the same iframe and interactive Count 1 through Swap. Lazy registration/import boundaries remain in their existing owners; no startup entry import was added.

The latest merge integrates 1dbc6fb1 only because native landing found real conflicts in two renderer files. It preserves main’s createChatProviderReview owner, readProviderReviewState, render(readProviderReview), and providerReviewSource while retaining direct PaneLayout JSX and its null empty layout. Current-head UI types, 53 focused pane/frame/geometry tests, scoped lint/format/diff checks pass; the complete current diff has a fresh validated P2 scoped-clean review. Paired startup and four-state visual proof passed against that exact baseline; current screenshots match all eight published images.

The two P2 inventory notes are assigned to final migration cleanup. Deleted boot-module paths occur only in grouping membership sets, never dynamic entry lists; grouping matches resolved modules and route preloads walk emitted chunks, so those stale entries are inert. Global capture refresh and the Lit ratchet, its allowance test, interop guidance, and dependency retirement stay with that final cleanup owner after the remaining lane PRs land. Existing lazy entry points remain unchanged.

Solid checklist, touched production files Before After
Controller / host update patterns 9 9
createEffect 6 5
createRenderEffect 0 0
untrack 4 2
addEventListener 6 6
querySelector(All) 9 9
Hand-built JSX class strings 1 0
Production flush 1 0
runWithOwner / getOwner 11 1

Retained host updates belong to synchronous pane/domain owners. Effects and listeners bind external presentation, hosted tabs, focus, and Files DOM settlement with existing cleanup. Queries cross retained panel/host islands. One untrack captures the stable runtime identity; the other restores a deliberate hosted-header mount under its captured owner.

Before: Conversation

After: Conversation

Before: Interactive HTML Files preview

After: Interactive HTML Files preview

Before: Layout menu

After: Layout menu

Before: Retained frame after Swap

After: Retained frame after Swap

Replace pane layout and sidebar template recipes with plain data consumed by retained Solid owners. Preserve sidebar roots, presentation gating, preview lifetime, and callback behavior. Dependency-owned header, composer, and hosted content adapters remain for the final integration cutover.
…a-layout

# Conflicts:
#	ui/src/pages/chat/components/chat-transcript-geometry-updates.browser.test.tsx
…a-layout

# Conflicts:
#	ui/src/pages/chat/chat-pane-embedded-panels.ts
#	ui/src/pages/chat/chat-pane-layout-render.ts
#	ui/src/pages/chat/components/chat-files-panel.tsx
#	ui/src/pages/chat/components/chat-sidebar-region-hosted-tabs.test.ts
…a-layout

# Conflicts:
#	ui/src/pages/chat/chat-pane-embedded-panels.test.ts
#	ui/src/pages/chat/chat-pane-embedded-view.tsx
#	ui/src/pages/chat/chat-pane-layout-render.ts
#	ui/src/pages/chat/chat-pane-layout-view.tsx
#	ui/src/pages/chat/components/chat-files-panel.tsx
@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 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 16, 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-16T11:44:01.623149Z 80686b3 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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR renders chat pane layouts and panels directly in Solid and deletes their unused Lit adapters.

Example: Open preview.html in Files with its interactive counter showing Count: 1.

  • Before: The preview renders through the mixed Lit and Solid boundary.
  • After: The native Solid path preserves the same visible preview and Count: 1.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent, smaller cutover with useful visual evidence and preserved behavioral tests; no actionable introduced defect was found.
Proof confidence 🐚 platinum hermit (4/6) This maintainer-authored PR is outside the ordinary contributor proof gate; inspected browser screenshots support Conversation and Files preview parity, while retained lifecycle assertions remain in the migrated tests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Chat still carries transitional rendering machinery that complicates retained controls and panel lifetimes.
Reason: The maintainer-authored direction matches prior merged migrations and removes obsolete owners without adding settings, dependencies, or public APIs.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this maintainer-directed cutover open: it removes the remaining chat template adapters, and review found no actionable introduced bug.

Priority: P3
Reviewed head: 37597154207514e54be59e652c8b439c4ef28b47

Before merge

  • Complete next step - Resolve the reported conflict while preserving main’s native icon and embedded plugin-panel contracts, then validate the affected integrated paths.

Findings

None.

Agent review details

How this fits together

The Control UI pane runtime publishes session and layout snapshots to retained views, which render conversation controls, side panels, previews, and overlays.

flowchart TD
  A[Session and pane owners] --> B[Pane layout snapshot]
  B --> C[Retained Solid layout]
  C --> D[Conversation and header]
  C --> E[Sidebar panel renderer]
  E --> F[Lazy panel hosts]
  C --> G[Presentation and cleanup]
Loading

Technical review

Best possible solution:

Complete the native Solid cutover while preserving current-main panel contracts and existing retained lifetimes.

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

This is primarily a behavior-preserving refactor; source and supplied screenshots were inspected without executing target code.

Is this the best way to solve the issue?

Direct Solid rendering fits the established migration direction and removes the superseded shared boundary with its final callers.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Pane layout and embedded panels keeps the original intent (aee0ee2: The earlier Solid port retained adapters around plain TypeScript domain owners while preserving lazy loading and retained panel contracts.)
  • Shared Lit and Solid content boundary keeps the original intent (4e3818b: The staged transcript migration needed one owner for legacy mounting, connection, and disposal until callers could render natively.)
  • Mutable props and composer retention keeps the original intent (ef3de8b: The shared adapter preserved nested publications, drafts, focus, and selection for remaining legacy consumers.)
  • Native header ownership keeps the original intent (a3944d5: Typed native header data replaced opaque templates while preserving session actions and dialog ownership.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 974a52f adds ui/src/pages/chat/chat-pane-layout-render.ts:51 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 974a52f64f53; files: ui/src/pages/chat/chat-pane-layout-render.ts)

PR surface

Source -293, Tests -419. Total -712 across 52 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 26 437 730 -293
Tests 26 430 849 -419
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 52 867 1579 -712

Review metrics

Metric Value Why it matters
Production versus test LOC Production +437/-730; tests and support +430/-849 Both surfaces shrink because the final consumers and obsolete interop owner are removed together.

Labels

Label changes:

  • add P3: This is renderer cleanup with preserved user-facing behavior and limited urgency.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: This is renderer cleanup with preserved user-facing behavior and limited urgency.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • 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 16, 2026, 5:50 AM ET / 09:50 UTC.

@openclaw-barnacle openclaw-barnacle Bot reopened this Oct 16, 2026

@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: e047b15d90

ℹ️ 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".


export { retireSessionWorkspaceCheckout } from "./chat-session-workspace-state.ts";
export { renderSessionWorkspaceRail } from "./chat-session-workspace-rail.ts";
export { SessionWorkspaceRail } from "./chat-session-workspace-rail-solid.tsx";

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 Regenerate the boot manifest after removing chat modules

This cutover deletes ui/src/lit/solid-content.tsx and chat-session-workspace-rail.ts, but ui/config/control-ui-boot-modules.json still lists both paths. Because chunk grouping and route preloads consume this generated capture, it no longer represents the reachable /chat module graph; run pnpm ui:boot-manifest:gen and commit the regenerated manifest before relying on the build result.

AGENTS.md reference: ui/AGENTS.md:L78-L81

Useful? React with 👍 / 👎.

@@ -1,324 +0,0 @@
import { insert, render as renderSolid, type JSX } from "@solidjs/web";

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 Remove the retired interop owner from the Lit ratchet

After deleting this owner, scripts/check-control-ui-lit-ratchet.mts still exempts the exact ui/src/lit/solid-content.tsx path, and its test still asserts that Lit imports there are allowed. If a later change recreates that file, the ratchet will silently accept the regression; remove the exception, its allowance test, and the stale interop documentation as part of this cutover.

AGENTS.md reference: AGENTS.md:L48-L53

Useful? React with 👍 / 👎.

@steipete
steipete enabled auto-merge (squash) October 16, 2026 10:35
@steipete
steipete disabled auto-merge October 16, 2026 10:45
steipete added a commit that referenced this pull request Oct 16, 2026
The native-video change cd486ed removed the final production call to
readRuntimePromptImageOrder after runtime media facts began surviving
message copies directly. Delete the reader and retain the same image-order
and serialization assertions through readRuntimePromptMediaFacts.

Test consolidation 7982ee6 also removed the external callers of
resetCompactSessionStateMocks and createCompactHooksAuthStorage. Keep
both helpers private to their existing owners. No runtime algorithm,
test case, assertion, ignore, timeout, or dependency changes.

Proof: 233 tests across 11 files, including every transitive importer of
the changed compaction helpers, pass with pnpm test <files> --maxWorkers=1
(273.18s wall). Core, agents-other, and agents-sessions typechecks pass;
scoped lint, boundary lint, formatting, and isolated P2 review pass.

All three deadcode scripts were run before and after. Production and
script export scans and both unused-file scans pass after the repair.
The only remaining full-tree export is renderActivityGroup, already
removed by active non-draft PR #174068; its exact diff and body were
checked, so that peer-owned UI change is intentionally left alone.
…a-layout

# Conflicts:
#	ui/src/pages/chat/chat-pane-render.ts
#	ui/src/pages/chat/chat-pane-runtime-view.tsx
@steipete
steipete merged commit def9a18 into main Oct 16, 2026
114 of 119 checks passed
@steipete
steipete deleted the solid2/w-end-content-a-layout branch October 16, 2026 12:11
@steipete

Copy link
Copy Markdown
Contributor Author

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

steipete added a commit that referenced this pull request Oct 16, 2026
…ge harness

Main hourly 38902471699 failed check-dependencies on two exports that lost
their last consumers: the SessionWorkspaceRail re-export (callers import the
Solid module directly since #174068) and SynologyChatAccountRaw (only used
inside types.ts since #173734).

The package-openclaw-for-docker trusted-harness test copies a fixed file
closure; #174133 made src/infra/npm-command.ts import ../../cli-invocation.mjs,
so the harness failed with MODULE_NOT_FOUND. cli-invocation.mjs only imports
node builtins. Negative control on current main fails on macOS too; with the
file added the case passes.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
The native-video change 85b1761 removed the final production call to
readRuntimePromptImageOrder after runtime media facts began surviving
message copies directly. Delete the reader and retain the same image-order
and serialization assertions through readRuntimePromptMediaFacts.

Test consolidation 0ed455a also removed the external callers of
resetCompactSessionStateMocks and createCompactHooksAuthStorage. Keep
both helpers private to their existing owners. No runtime algorithm,
test case, assertion, ignore, timeout, or dependency changes.

Proof: 233 tests across 11 files, including every transitive importer of
the changed compaction helpers, pass with pnpm test <files> --maxWorkers=1
(273.18s wall). Core, agents-other, and agents-sessions typechecks pass;
scoped lint, boundary lint, formatting, and isolated P2 review pass.

All three deadcode scripts were run before and after. Production and
script export scans and both unused-file scans pass after the repair.
The only remaining full-tree export is renderActivityGroup, already
removed by active non-draft PR openclaw#174068; its exact diff and body were
checked, so that peer-owned UI change is intentionally left alone.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
* refactor(ui): render chat pane layout and panels natively

Replace pane layout and sidebar template recipes with plain data consumed by retained Solid owners. Preserve sidebar roots, presentation gating, preview lifetime, and callback behavior. Dependency-owned header, composer, and hosted content adapters remain for the final integration cutover.

* test(ui): tighten native pane fixture callbacks

* fix(ui): retain captured Review presentation during hide

* refactor(ui): simplify native panel markup

* test(ui): initialize attachment refresh before native mount

* refactor(ui): retire orphaned Lit template adapters

* test(ui): fix native chat pane fixtures

* test(ui): explain isolated pane renderer mocks
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
…ge harness

Main hourly 38902471699 failed check-dependencies on two exports that lost
their last consumers: the SessionWorkspaceRail re-export (callers import the
Solid module directly since openclaw#174068) and SynologyChatAccountRaw (only used
inside types.ts since openclaw#173734).

The package-openclaw-for-docker trusted-harness test copies a fixed file
closure; openclaw#174133 made src/infra/npm-command.ts import ../../cli-invocation.mjs,
so the harness failed with MODULE_NOT_FOUND. cli-invocation.mjs only imports
node builtins. Negative control on current main fails on macOS too; with the
file added the case passes.
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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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