Repository navigation
refactor(ui): add Solid projections for existing state owners - #168405
Conversation
Add lifecycle-scoped signal projections over existing application, domain, registry, and event owners. Keep mutable state synchronous and event delivery ordered, with source replacement and explicit disposal. Separate the application context type from its Lit token, add the Solid provider and reactive translator, and publish theme palette completion separately from preferences. This is migration groundwork; product rendering remains unchanged.
Restore the Lit translator and English registrars to their parent form. Solid-only registration adapters publish catalog revisions without changing existing locale ownership. Cover the remaining provider and session event adapters and sample callback-only owners through their public subscriptions.
|
🦞👀 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 maintainer review before merge. What this changesThis PR adds lifecycle-scoped Solid projections over existing Control UI state, event, translation, theme, and routing owners. Example: A future Solid view selects Tide dark while its stylesheet loads.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it provides useful Solid migration groundwork absent from current main, and source review found no actionable introduced defect. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe adapters sit between existing Control UI owners and future Solid views, translating admitted snapshots and events into reactive reads without taking over mutations or persistence. flowchart LR
G[Gateway facts] --> O[Existing UI owners]
O --> P[Scoped projections]
P --> S[Solid views]
O --> L[Existing Lit views]
S --> O
Technical reviewBest possible solution: Retain the adapters as migration foundations and keep authoritative state and mutations in their existing owners. Do we have a high-confidence way to reproduce the issue? This is migration infrastructure rather than a reported defect; the supplied tests exercise real owner publication and projection lifecycles, and no target code was executed during this review. Is this the best way to solve the issue? The approach follows the merged Solid playbook by adapting existing owners, preserving synchronous reads, and keeping event delivery separate from snapshot reactivity. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 325d7f33facb. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +1359, Tests +2470, Docs +74. Total +3903 across 35 files. Added test files: 15. 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 (1 earlier review cycle)
Reviewed October 10, 2026, 7:21 AM ET / 11:21 UTC (Revision 2). |
|
CI on exact head This comes from main commit Fail-fast cancelled Per the coordinator's scope decision, this PR leaves other owners' code unchanged. No rerun or extra workflow was dispatched, and the PR remains ready for coordinator review without a merge request. |
|
Attribution is complete for the final head Both instant-thread cases passed in CI 38046755733, E2E shard 3/4, with the identical projection patch (stable patch ID This paired CI evidence holds the projection implementation constant and attributes the layout regression to the merged main changes. ClawSweeper reviewed the final head with zero findings. The native inherited-failure record preserves the checkout, logs, source hashes, and all 13 fail-fast cancellations without claiming those cancelled jobs passed. The separate baseline replay did not reach the tests (Testbox admission timeout, then AWS temporary-file quota); it is not used as product proof. Other owners' code and all assertions/guards remain unchanged. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
check-dependencies (pnpm deadcode:full) has been red on hourly main since the Solid 2 groundwork landed: - #168305 added the ui/src/solid-smoke compiler/interop fixture and #168405 the ui/src/lib/reactive state-owner projections as internal foundation that only their tests import. Knip reported all 14 files as unused and @solidjs/signals (imported only by those projections) as an unused ui dependency. Register them as ui production entries with a removal condition: drop the entries with the first production importer. - src/cli/plugins-build-solid.ts resolves @solidjs/compiler with createRequire from the plugin author's package.json (docs/plugins/feature-plugins.md), so Knip's unlisted-dependency finding is a dynamic-require false positive; the host never ships it. Ignore it next to the existing createRequire entry. - The all-exports pass (masked while the first pass failed) reported two stubs in sessions-channel-fixture.test-support.ts as unused exports after #162316 moved their consumers; they are only used in-module, so drop the exports. Proof: both Knip passes from deadcode:full now report only the canvas a2ui-app and worker-deploy entry-root findings that the CI campaign's FIX3 lane is fixing separately; the fixture's two importing suites pass (67 tests); oxfmt, oxlint, and boundary-guard lint are clean on the changed files.
…aw#168405) * chore(ui): enable Solid 2 alongside Lit * feat(ui): add Solid owner projections Add lifecycle-scoped signal projections over existing application, domain, registry, and event owners. Keep mutable state synchronous and event delivery ordered, with source replacement and explicit disposal. Separate the application context type from its Lit token, add the Solid provider and reactive translator, and publish theme palette completion separately from preferences. This is migration groundwork; product rendering remains unchanged. * fix(ui): correct projection type contracts * refactor(ui): keep projection catalog wiring off startup Restore the Lit translator and English registrars to their parent form. Solid-only registration adapters publish catalog revisions without changing existing locale ownership. Cover the remaining provider and session event adapters and sample callback-only owners through their public subscriptions. * fix(ui): preserve synchronous projection event contracts * test(ui): update background fixture for applied palette * test(ui): complete session background theme fixture
check-dependencies (pnpm deadcode:full) has been red on hourly main since the Solid 2 groundwork landed: - openclaw#168305 added the ui/src/solid-smoke compiler/interop fixture and openclaw#168405 the ui/src/lib/reactive state-owner projections as internal foundation that only their tests import. Knip reported all 14 files as unused and @solidjs/signals (imported only by those projections) as an unused ui dependency. Register them as ui production entries with a removal condition: drop the entries with the first production importer. - src/cli/plugins-build-solid.ts resolves @solidjs/compiler with createRequire from the plugin author's package.json (docs/plugins/feature-plugins.md), so Knip's unlisted-dependency finding is a dynamic-require false positive; the host never ships it. Ignore it next to the existing createRequire entry. - The all-exports pass (masked while the first pass failed) reported two stubs in sessions-channel-fixture.test-support.ts as unused exports after openclaw#162316 moved their consumers; they are only used in-module, so drop the exports. Proof: both Knip passes from deadcode:full now report only the canvas a2ui-app and worker-deploy entry-root findings that the CI campaign's FIX3 lane is fixing separately; the fixture's two importing suites pass (67 tests); oxfmt, oxlint, and boundary-guard lint are clean on the changed files.
## 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.
) ## 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 Solid migration needs a reactive view of the existing Control UI owners without moving Gateway state, request admission, or mutations into the renderer.
User Impact
Internal foundation only; no user-facing change and no new rendered UI. Release-note context: internal Solid migration infrastructure.
Why This Change Was Made
Adds projections for the capability/facade/domain owners and registry/event channels, plus reactive translation, separate theme-preference and applied-palette signals, a router adapter, and a Solid application provider.
ApplicationContexttypes are separated from the retained Lit context token.The contract is one projection per owner and scope: initial owner reads, shared first/last-subscriber acquisition, source replacement with stale-callback fencing, and explicit idempotent disposal. Mutable snapshots invalidate through revision signals; event channels stay ordered events, with awaited channels preserving consumer completion. Domain owners remain authoritative. Solid catalog-registration wrappers keep translation invalidation off the Lit startup path.
Evidence
Blacksmith Testbox run 38044574164, task lease
tbx_01m4jn8jps09skhj5dm0srfhay(stopped):pnpm ui:build: passed in 11.21 s at747206a2fdf084c432d98564071da26ae996cace.pnpm test ui/src/lib/reactive ui/src/i18n/lib/english-catalog.test.ts ui/src/i18n/lib/translate.test.ts ui/src/app/bootstrap-theme.palette.test.ts ui/src/lib/native-overlay-occlusion.test.ts ui/src/pages/new-session/palette-identity-preferences.test.ts --maxWorkers=1: 96/96 passed, 18 files, 5.22 s Vitest wall time.pnpm test <file> --maxWorkers=1runs passed at70b6ef95e4ff7c09a0ed1f42aa218d948b34d9e8; timings below.pnpm check:changed --base dd036a4b1d855c366c7b3148a1814c83da765e50: all nine selected test type graphs, production UItsgo, formatting, i18n verification, and guard ratchets passed. It stopped at the inherited exports listed below.node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.jsonover all 34 changed source/test files: zero warnings or errors.5682c9e7dabc6f492bc321ecad1aa0905656712c).Bun is not installed on Testbox and was pending PR CI when this PR opened. CI run 38046755733, on exact head
f250267ba7a5a79c0e7097c557c738e39c7c3a25, records all 16 new/updated unit files passing under Bun. UI shards 1/3 and 3/3 completed successfully (259 s and 282 s job wall time); shard 2/3 was cancelled after its projection files had passed. This is per-file Bun proof, not a claim that the cancelled shard completed. No Bun installation or extra workflow dispatch was performed.The same run passed Control UI performance, i18n, all three selected mock-Gateway E2E jobs, all lint jobs, and source/architecture guards. Its overall conclusion is cancelled because fail-fast followed the inherited Gateway test type error documented below.
check-prod-typesandcheck-test-types-core-2were also cancelled; Testbox supplies the previously recorded scoped type proof.Landing-head evidence
The coordinator approved landing. Main fix
8420f82cbbf8bcorrected the inherited Gateway test type error and was merged into final head4e19fa6f327832de52e8fc6ea86810f64ea2e5d8. ClawSweeper reviewed that exact head with zero findings.Fresh CI run 38047758072 passed performance, i18n, lint, and two E2E shards, then failed two instant-thread position assertions by exactly 50 px. This is separately attributable to the main-only Details margin: those same cases passed in the previous E2E shard with the identical projection patch, and the only intervening UI changes are
chat-view.tsandstyles/chat/details.cssfrom main. The test, harness, and affected sources match main8420f82byte-for-byte. Attribution details record this comparison.The native inherited-failure landing evidence retains the failed CI run, tested merge, source hashes, paired CI logs, and the 13 fail-fast cancellations. Cancelled jobs remain incomplete coverage. A separate replay was attempted but produced no product result because Testbox admission timed out and AWS exhausted temporary-file quota; neither attempt is claimed as test proof. No unrelated owner code, assertion, budget, or guard was changed.
Startup attribution
The original-parent comparison is from Testbox run 38041094095; its lease is also stopped.
Paired builds used identical fixed build metadata and the same toolchain. Source maps show no new startup modules and no
@solidjs/*orlib/reactive/*on the startup path. Onlybootstrap-theme.tsand the type extraction incontext.tschanged source contents; the other byte differences are generated references/hash churn.62b14a6, before main integrationdd036a4, measured candidate747206aThe delta passes the coordinator's 64 B variance allowance. The absolute startup-budget overage is inherited; all other measured performance gates pass. The later commits only complete two theme test fixtures, and the final main merge leaves the projection patch unchanged.
Inherited gate failures
A clean archive of merged main
dd036a4b1d855c366c7b3148a1814c83da765e50, with the same dependencies andnode --import ./scripts/tsx.mjs scripts/check-deadcode-exports.mts, reproduced all four findings in the same Testbox run. None of their source files or Knip configuration differs in this PR.Current main fixes
PUBLIC_SESSION_ENTRY_SCRIPTin06c6e83f4351f; that fix is included in this branch. The remaining inherited findings are:src/agents/tools/sessions-channel-fixture.test-support.ts:resolveSessionConversationStubsrc/agents/tools/sessions-channel-fixture.test-support.ts:resolveSessionTargetStubsrc/gateway/live-agent-probes.ts:isClaudeLikeLiveAgentThe coordinator authorized opening this ready PR with that baseline evidence. No guard was skipped or weakened, and no unrelated owner code was changed.
The first PR CI attempt additionally failed in
src/gateway/control-ui-public-session-refresh.test.ts:51(TS2345:string | undefinedpassed torunInNewContext). This is the test added by the merged main fix06c6e83f4351f. Its blob is identical on merged main123d5a1331a8307969767b34e8f8808461ea205band this PR (390882647e188cfcb07c9fa25d7e5865d617e322); the regex match guard does not narrow indexed capture[1]. The renderer and Gateway typecheck configuration also have no PR diff. CI attribution and cancellation evidence is posted in the review thread. This remains with its owner.Per-file test cost
Each row is an actual
pnpm test <file> --maxWorkers=1run on Testbox. All passed; combined command wall time was 34.34 s. Bun CI module time is the recorded module start-to-completion interval in the exact-head job; all listed modules passed, including the six in the subsequently cancelled shard 2/3.ui/src/app/bootstrap-theme.palette.test.tsui/src/components/session-background.test.tsui/src/i18n/lib/english-catalog.test.tsui/src/lib/reactive/application-capabilities.test.tsui/src/lib/reactive/application-native.test.tsui/src/lib/reactive/application.test.tsui/src/lib/reactive/context.test.tsui/src/lib/reactive/domain-board.test.tsui/src/lib/reactive/domain-capabilities.test.tsui/src/lib/reactive/domain-keyed.test.tsui/src/lib/reactive/events-browser.test.tsui/src/lib/reactive/events.test.tsui/src/lib/reactive/i18n.test.tsui/src/lib/reactive/projection.test.tsui/src/lib/reactive/registries.test.tsui/src/lib/reactive/router.test.ts