Repository navigation
refactor(ui): share presentation primitives across Solid and Lit - #168576
Conversation
Keep one implementation and registered host per migrated component, preserve caller content and imperative methods, and carry the existing application context into bridge roots. Add focused lifecycle, commit-order, event, context-handoff, and retention proof.
…ontrols Share renderer-neutral icon geometry and settings control behavior with retained Lit helpers. Add Solid settings, status, loading, copy, and keyboard components with synchronous shell layout publication. Preserve native fieldset disabling, direct activation, rejected-change rollback, and current event callbacks; migrate their consumer tests to native input semantics. Registered empty and skeleton tags await the integration bridge cutover.
Materialize the typed host from declared properties and methods, preserve reactive children, and use plain DOM for renderer-independent tests. Keep the path-exact bridge-test exception limited to Lit imports and templates; its reason requires removal with the bridge at cutover. Negative coverage keeps unlisted paths and other metrics gated.
Keep shadow-only keycap styling out of the shared light DOM, remove retired settings control selectors, and retain one touch-target style owner. Make the visual fixture activate the visible row title rather than its duplicate accessible label.
Merge coordinator-approved solid2/p2-interop at 81095b5. The merge has no conflicts and preserves the reviewed lane tree exactly.
Adopt the integration bridge and replace the two registered Lit panel states with Solid implementations. Preserve existing Lit callers, scoped styles under shadow-root parents, and accepted native-control state across external updates. Validation: focused components, retained consumers, Chromium presentation cases, WebKit native controls, Solid AST lint, styles, formatting, and the Lit ratchet pass. Remote types/build/consumer suites and full parity remain owed after Testbox and fallback source-sync failures. Release-note context: Control UI renderer migration with native settings controls.
|
Codex review: needs maintainer review before merge. What this changesThis PR adds shared Solid presentation components, native settings controls, and a temporary bridge for existing Lit callers. Example: Change Appearance → Color mode from Dark to Light.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-approved migration has useful, distinct work and no actionable introduced defect found; the required CI gate remains red. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Control UI presentation layer turns caller-owned settings and panel state into accessible DOM and forwards user actions to existing owners. flowchart TD
A[Existing Lit pages] --> B[Lit adapters]
B --> C[Solid custom element bridge]
C --> D[Solid panel components]
E[Solid views] --> D
A --> F[Shared settings handlers]
E --> F
Technical reviewBest possible solution: Land the shared presentation owners through the native workflow while retaining the documented temporary Lit adapters. Do we have a high-confidence way to reproduce the issue? This is an approved refactor rather than a reported bug; source inspection and supplied browser evidence cover its preservation contracts, and no target code was executed during review. Is this the best way to solve the issue? The shared state handlers and single registered Solid implementation fit the migration policy, with temporary adapters and their removal conditions explicitly documented. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f0a64d10805d. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfacePR surface statistics unavailable: the file list is incomplete. LabelsLabel 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 (6 earlier review cycles)
Reviewed October 10, 2026, 6:34 PM ET / 22:34 UTC (Revision 7). |
Keep existing stateless Lit icon templates on the startup path while Solid consumers use renderer-neutral geometry. Remove the unused Lit data adapter, retain the icon regression in the existing Lit suite, and simplify fixture lists without changing coverage. Relocate the six unchanged provider-label baseline entries.
Drop unused provider descriptor objects and duplicate fallback work while keeping shared identity policy and renderer output. Document verified DOM and bridge assertion boundaries and prune their moved-source baseline entries.
Use supported native Solid bindings and preserve generic Lit callbacks. Keep CSS with the browser stylesheet owner so Node and Bun imports remain valid. Follow TSX source boundaries and update consumer fixtures for native events, RTL, light DOM, and lazy readiness without weakening assertions.
## What Problem This Solves Removes dormant migration scaffolding that adds maintenance surface without serving a production caller. ## User Impact No user-visible behavior change. Active UI state owners and projections, native incognito expiry, public SDK/package exports, security checks, storage, and configuration remain intact. ## Why This Change Was Made Delete unadopted Solid projections and their event/lease infrastructure rather than retaining a parallel adapter layer for hypothetical future consumers. The introducing [projection PR](#168405) explicitly describes an internal foundation with no rendered UI change. Delete the inactive actor-specific incognito expiry sidecars and their exclusive tests. Their introducing work ([single-actor](#165454), [topology composition](#165901)) explicitly leaves production on the native sidecar. Its existing real deletion/shutdown tests stay unchanged. Net production reduction: **1,262 lines** (13 added, 1,275 deleted; tests, test support, docs, fixtures and generated code excluded). Every removed module/export was checked against repository-wide references, dynamic loaders, manifests and package exports. The active `projectSource` implementation is unchanged apart from making its unused exported input type private. Remove the stale whole-directory Knip entry exemption now that every retained reactive module has a production caller. Also drop four zero-caller Solid presentation helpers from the preparatory #168576 layer; their live Lit counterparts and all gallery-used helpers remain. ## Best-effort tradeoffs accepted - Unused event-projection replacement/disposal generations, duplicate-listener bookkeeping and async settlement: these only served the unadopted #168405 adapters and synthetic tests, not a human-reported runtime incident. Future event consumers subscribe to the existing owners and retain their ordering/completion contracts. - Unused board/provider lease counting and temporary palette subscriptions: #168405 introduced them for future migration consumers that never arrived. Existing provider/preference owners remain authoritative; a future port must add only the adapter it actually needs. - Unused generic locale-catalog replacement/listener bookkeeping: the wrapper had only its own test as a caller. Actual locale subscriptions and lazy English registration remain; a future replacement API must be integrated with the translation owner rather than kept as a test-only parallel path. - Inactive actor topology capture, incarnation fences, acquisition/retirement reconciliation and actor-only settling checks: #165454/#165901 label this prerequisite inactive, and production still calls the native sidecar. Future activation must implement its actual integration; no live deletion loses authority or shutdown checks. ## Evidence - Independent P0–P2 review: scoped clean; no accepted/actionable findings. - Retained reactive scope plus application-context lifecycle: **27 tests passed in 10 files**. - Retained Solid component scope: **49 tests passed in 10 files**, 83.22 s command wall time. - Changed-file cost run with `--maxWorkers=1`: **20 tests passed in 7 files**, 74.43 s command wall time; individual file test windows were 2–325 ms. No new tests, timers, retries, skips, or suppressions. - Real native incognito sidecar/deletion/shutdown suite: **9 tests passed**, unchanged. - Lint-suppression guard: **3 tests passed**; no new suppressions. - Production Knip: **passed** on the source-capsule-verified Testbox candidate. - Full-tree Knip: no unused files/exports reported; the broader pass reports pre-existing dependency/binary/path metadata outside this diff. Canonical export-only pass is clean. - Change-check proof: all 28 core/test type graphs plus production/UI types, ratchets, formatting, script lint, storage/loader/auth guards passed. The initial run caught README formatting and one unused test import; both are fixed. Completed results were reused while the corrected lint stripe and remaining commands were run through the same changed-scope owner. Final component-only UI types, lint, and style checks passed. - Runtime import cycles: **0**. Madge cycles: **0**. Final production and full-tree export scans both passed on the source-capsule-verified [Testbox run](https://github.com/openclaw/openclaw/actions/runs/38171748378). - [Exact-head CI](https://github.com/openclaw/openclaw/actions/runs/38175521266) passed on `6b35e73d5f9be9cf79ccc4692f0109ce7d2915b3`, including `openclaw/ci-gate`; no failed checks or CI reruns. Workflow wall time was 454 s. The three UI check jobs took 264/304/288 s wall time (including setup), and the UI E2E jobs passed. No live Gateway or real OpenClaw state was used. Every executable proof used isolated HOME, OpenClaw state/config and XDG directories.
Audit the exact Lit/Solid presentation modules selected by the fixture HTML, the documented codemod corpus generator and spawned runtime fixture, and the three forced-exit inputs passed to Oxlint by its boundary test. Register the migration lint plugin loaded through boundary-guards.json as an executable root and recognize its sole required default export in the script-only pass. These existing consumers come from openclaw#168576, openclaw#168720, and openclaw#168587; they are active tools and fixtures, not unused production code. Keep each entry until its named consumer is retired or becomes statically discoverable. The default export exception is limited to one file and category, matching the existing boundary plugin. No runtime code, tests, assertions, or lint rules change.
…168811) * refactor(ui): draft Solid channels and cron migration Work in progress for the channels and cron migration lane. Shared bridge and presentation primitives from PR openclaw#168576 are pending integration from main; runtime, visual, and final review gates remain before publication. * refactor(ui): simplify Solid page state and rendering Derive presentation from existing owners, reuse shared control renderers, and remove nested prop wrappers while preserving view identity and request lifetime guards. This trims the migration draft by roughly 830 production lines. Shared primitive integration and runtime proof are still pending. * fix(ui): preserve cron description spacing and valid control proof * fix(ui): keep channel controller reads outside reactive tracking * chore(ui): regenerate cron raw-copy baseline after renderer split * fix(ui): preserve Solid field types and cron suggestion nodes * refactor(ui): finish Solid rendering and shared element contracts * fix(ui): keep ambient element types independent of renderers * fix(ui): use the modal owner JSX declaration * refactor(ui): drop unused tab declarations
) ## What Problem This Solves Removes dormant migration scaffolding that adds maintenance surface without serving a production caller. ## User Impact No user-visible behavior change. Active UI state owners and projections, native incognito expiry, public SDK/package exports, security checks, storage, and configuration remain intact. ## Why This Change Was Made Delete unadopted Solid projections and their event/lease infrastructure rather than retaining a parallel adapter layer for hypothetical future consumers. The introducing [projection PR](openclaw#168405) explicitly describes an internal foundation with no rendered UI change. Delete the inactive actor-specific incognito expiry sidecars and their exclusive tests. Their introducing work ([single-actor](openclaw#165454), [topology composition](openclaw#165901)) explicitly leaves production on the native sidecar. Its existing real deletion/shutdown tests stay unchanged. Net production reduction: **1,262 lines** (13 added, 1,275 deleted; tests, test support, docs, fixtures and generated code excluded). Every removed module/export was checked against repository-wide references, dynamic loaders, manifests and package exports. The active `projectSource` implementation is unchanged apart from making its unused exported input type private. Remove the stale whole-directory Knip entry exemption now that every retained reactive module has a production caller. Also drop four zero-caller Solid presentation helpers from the preparatory openclaw#168576 layer; their live Lit counterparts and all gallery-used helpers remain. ## Best-effort tradeoffs accepted - Unused event-projection replacement/disposal generations, duplicate-listener bookkeeping and async settlement: these only served the unadopted openclaw#168405 adapters and synthetic tests, not a human-reported runtime incident. Future event consumers subscribe to the existing owners and retain their ordering/completion contracts. - Unused board/provider lease counting and temporary palette subscriptions: openclaw#168405 introduced them for future migration consumers that never arrived. Existing provider/preference owners remain authoritative; a future port must add only the adapter it actually needs. - Unused generic locale-catalog replacement/listener bookkeeping: the wrapper had only its own test as a caller. Actual locale subscriptions and lazy English registration remain; a future replacement API must be integrated with the translation owner rather than kept as a test-only parallel path. - Inactive actor topology capture, incarnation fences, acquisition/retirement reconciliation and actor-only settling checks: openclaw#165454/openclaw#165901 label this prerequisite inactive, and production still calls the native sidecar. Future activation must implement its actual integration; no live deletion loses authority or shutdown checks. ## Evidence - Independent P0–P2 review: scoped clean; no accepted/actionable findings. - Retained reactive scope plus application-context lifecycle: **27 tests passed in 10 files**. - Retained Solid component scope: **49 tests passed in 10 files**, 83.22 s command wall time. - Changed-file cost run with `--maxWorkers=1`: **20 tests passed in 7 files**, 74.43 s command wall time; individual file test windows were 2–325 ms. No new tests, timers, retries, skips, or suppressions. - Real native incognito sidecar/deletion/shutdown suite: **9 tests passed**, unchanged. - Lint-suppression guard: **3 tests passed**; no new suppressions. - Production Knip: **passed** on the source-capsule-verified Testbox candidate. - Full-tree Knip: no unused files/exports reported; the broader pass reports pre-existing dependency/binary/path metadata outside this diff. Canonical export-only pass is clean. - Change-check proof: all 28 core/test type graphs plus production/UI types, ratchets, formatting, script lint, storage/loader/auth guards passed. The initial run caught README formatting and one unused test import; both are fixed. Completed results were reused while the corrected lint stripe and remaining commands were run through the same changed-scope owner. Final component-only UI types, lint, and style checks passed. - Runtime import cycles: **0**. Madge cycles: **0**. Final production and full-tree export scans both passed on the source-capsule-verified [Testbox run](https://github.com/openclaw/openclaw/actions/runs/38171748378). - [Exact-head CI](https://github.com/openclaw/openclaw/actions/runs/38175521266) passed on `6b35e73d5f9be9cf79ccc4692f0109ce7d2915b3`, including `openclaw/ci-gate`; no failed checks or CI reruns. Workflow wall time was 454 s. The three UI check jobs took 264/304/288 s wall time (including setup), and the UI E2E jobs passed. No live Gateway or real OpenClaw state was used. Every executable proof used isolated HOME, OpenClaw state/config and XDG directories.
What Problem This Solves
The Control UI needs Solid presentation primitives while existing Lit pages continue to work. Registering both renderers for the same custom-element tag would let Lit overwrite Solid-owned content.
User Impact
Existing panel tags, classes, routes, and Lit callers keep working. Settings switches and segmented choices use native inputs, including disabled fieldsets, controlled rejection, keyboard navigation, and RTL. No configuration migration is required.
Why This Change Was Made
This lands the approved Lit-to-Solid bridge together with its first presentation consumers.
defineSolidBridgeregisters a small non-Lit element and mounts the same Solid implementation in light DOM. One implementation owns each registered tag: the Lit empty-state and loading-skeleton classes are removed. Caller children stay in one intact range; property/attribute updates, reconnects, context changes, and imperative completion are covered by bridge tests. Host-scoped styles also work beneath remaining shadow-root parents.Solid icons use renderer-neutral geometry. Existing Lit callers retain their original stateless SVG templates so the descriptor-to-template adapter stays off the startup path; that temporary duplication ends when the last Lit caller ports. Settings, copy/keyboard/icon buttons, empty/loading/skeleton/refresh/error states have Solid components. A shared layout owner publishes settings traits before descendants measure. Stateless Lit helpers remain only for unported callers; the bridge and adapters are removed after their last caller ports.
The Lit ratchet has one exact-path exception:
ui/src/lit/solid-bridge.test.tsxmay import Lit and use Lit templates to prove old callers still work. Other files and metrics remain gated. Remove this exception with the bridge. No dependency or budget was raised.Release-note context: internal Control UI renderer migration; native settings controls preserve the existing interaction contract.
Evidence
The current head
18aa8eb71bb7d60a0d015de05b74a9ba272d293dadds the shared test JSX configuration and standalone tooltip declaration to the reviewed merged candidate. CI run 38087874154 passed all three UI unit shards, all nine UI E2E shards, production types, lint, i18n, and baseline ratchets. Its three failing test-type shards exposed missing shared JSX options/declaration inclusion; this head fixes those owning configs without changing runtime code. The new exact-head CI run 38089322045 is pending.Landing is blocked by the absolute startup limit, inherited from main. Matched CI builds compare main
c8278d736d8eb3babe3ec963c79959ab1fcd59d6with this PR's synthetic merge. The lane shrinks startup, but both exceed the unchanged 374,861 B cap:Base evidence: main CI 38087928846, build job 114318316674. PR evidence: performance job 114318341783 and build job 114318086343. Both report-only jobs are green while printing the overage; they are not proof that the cap passes. No budget or baseline was raised. The explicit request to stay below the cap remains unmet.
The native-control repair preserves existing assertions while updating native-input selectors, attached-fixture clicks, RTL focus navigation, and bridge light-DOM assertions. Focused reruns passed: 102 tests in the first five consumer suites and 156 tests in nine further suites. Solid settings passed 6/6 (3.68 s). The stylesheet import now belongs to the browser stylesheet entry, preserving Bun's source-import contract without runtime CSS guards. A pinned Bun A/B probe failed before and passed after this repair.
The source-import boundary now follows TSX modules with JSX preserved during its source-only graph traversal. Its new regression failed before the repair; all 6 helper tests passed afterward, and the real UI import-boundary check passed (13.41 s wall). Cold i18n loading retains its actual module imports with a test-scoped custom-element registration spy; 3/3 passed (29.92 s on the saturated host). E2E selectors now inspect actual native controls and retain main's initial-roster readiness after reload.
The Lit ratchet is enforced again now that the bridge lands: a sibling-path Lit-growth probe exits 1, while the exact bridge-test exception remains narrow. Its 5 focused tests pass (21.42 s). Assertion safety passes against the merged main parent (2,849 files, 6,719 grandfathered assertions); only stale moved-source counts were pruned. The raw-copy baseline moves six unchanged provider labels to their new source path, with no strings or counts changed.
Earlier CI exposed and led to repairs for nested skeleton keyframes, raw-copy path drift, native-input types and fixtures, Bun CSS imports, and TSX source traversal. These failures are not waived as inherited. Codex autoreview of the complete current candidate reports no actionable P0–P2 findings.
Testbox attempt
tbx_01m4kf5rk0c5h0f9mbn6ctz034queued after source preparation and was stopped before execution; no passing result is claimed. No replacement lease or alternate provider was started under the updated work order. Every lease is stopped. The first completed UI CI run took 271–339 s per unit shard and 267–510 s per E2E shard, including runner/setup overhead. Final-head CI run 38089322045 remains pending; there is no active task lease.All 11 captured states were inspected across both themes and viewports. No missing content or clipping was found; native radio geometry makes the controls gallery 18 px shorter. Images contain synthetic data only. Each comparison is before Lit / after Lit bridge / after Solid, left to right.
Growth includes the temporary interop bridge, Solid primitives alongside the allowed Lit adapters, and native-control/bridge regression coverage. The original implementation window was 2h 56m. The full lane wall window through this handoff is 8h 56m (05:58–14:55 Pacific), including integration, remote queues, reviews and CI repairs.