Repository navigation
refactor(ui): migrate chat leaf elements to Solid - #168762
Conversation
Replace 24 Lit element owners with Solid bridges while preserving existing tags, class names, callers, and domain owners. Keep stateless Lit helpers for the remaining rendering consumers and use the shared Solid commit lifecycle for editor and MCP retirement.\n\nWork in progress: depends on the shared Solid bridge/icon prerequisite landing; runtime and visual proof remain pending. Focused lint, stylesheet lint, and independent review completed.
Use keyed request scopes, explicit imperative snapshots, direct Solid bridge components, and shared application-context fixtures. Keep media recovery state across presentation updates and dispose replaced player nodes and observers with their rendering scope. Question and audio suites pass. The final Details fixture awaits CI after a local worker exit before assertions. Independent review and focused lint pass.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. What this changesThis PR migrates 24 chat leaf elements from Lit to Solid while retaining their tags, controls, and domain owners. Example: Open a chat and its Ask OpenClaw side chat.
Review scores
ProductKind: Refactor · Worth it: Yes Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open: it advances the approved Solid migration, preserves existing component ownership, and resolves the previously identified repairs; no additional concrete code defect was found. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherChat leaves consume pane properties and application capabilities, render browser DOM, and send actions back to existing controllers and Gateway owners. flowchart TD
A[Chat pane properties] --> B[Shared element bridge]
C[Application capabilities] --> B
B --> D[Solid chat leaves]
D --> E[Browser DOM]
D --> F[Existing action owners]
Technical reviewBest possible solution: Finish the shared-bridge migration while preserving existing chat interactions, resource lifetimes, and domain authority. Do we have a high-confidence way to reproduce the issue? This is a renderer migration rather than a new bug report; review used source comparisons and supplied browser evidence without executing target code. Is this the best way to solve the issue? The existing bridge provides a coherent migration path: replaced Lit classes are removed, remaining callers share the Solid implementation, and plain TypeScript owners retain their responsibilities. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8089addd7dc5. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfacePR surface statistics unavailable: the file list is incomplete. LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 (12 earlier review cycles; latest 8 shown)
Reviewed October 11, 2026, 8:36 AM ET / 12:36 UTC (Revision 13). |
|
Inspected synthetic chat captures: before at merge base Hosted browser flows passed for both captures: before, after. The remaining component and retention proof is running in the PR's UI CI shards. |
Migrate 24 registered chat leaf elements from Lit to Solid while preserving custom-element tags, classes, selectors, and the existing question, media, comment, and panel behavior. Keep domain state owners unchanged and retain stateless Lit helpers behind the shared adapter. Preserve nested Solid ownership in the custom-element bridge, initialize file editors after retained Lit content commits, retain inactive file identity and input focus, and render MCP previews through the Solid component entry point. Keep custom-element types with their owners and preserve in-place child adoption from main. Validation: focused boundary regressions and independent review pass; all three UI unit shards, all selected UI E2E shards, production/test types, lint, architecture checks, and baseline ratchets pass on c7c674c. Inspected synthetic before/after screenshots are embedded in the PR. The duplicate-scan coverage failure reproduces on CI's exact base because worker-heap-flag.mjs is missing from its scan targets; landed under the authorized inherited-failure exception.
First-parent upstream 5ed6a30..cb1b6cd (21 commits, including openclaw#168999 state query reduction and worker moves, openclaw#169075, af03aa0 ACP owner settlement, openclaw#168837 plugin metadata/reload ownership, openclaw#168776, openclaw#168951, openclaw#169039 runtime-only server builds, openclaw#169092 test batch d050, openclaw#168860 memory index publication writes into workers, openclaw#168991 session read lifetimes and reconciliation scheduling, openclaw#169091 tool/replay prompt prefixes, openclaw#168762 Solid chat leaf elements, openclaw#168941). Conflicts: - test/vitest/vitest.unit-fast-paths.mjs: upstream stopped forcing the two ACP translator files into the fast lane; kept that and our reply-turn-admission module-identity entry. - worker-access inventory: regenerated (634 files, 2429 calls). openclaw-state-worker-contract.ts auto-merged: upstream's GitHub publication-source operations next to our continuation custody operations. Refs #1475 Co-Authored-By: Claude Opus 5.5 <[email protected]>


What Problem This Solves
Chat leaf elements still use Lit rendering and lifecycle hooks during the Control UI's Solid 2 migration. This ports 24 registered leaves to Solid while preserving custom-element tags, CSS classes, selectors, media controls, questions, comments, and embedded panels. Remaining Lit callers use the shared bridge; stateless Lit helpers remain for their unported callers. Domain owners stay plain TypeScript.
The bridge mounts Solid-owned children without a nested top-level render/flush, preserving inherited contexts. Teardown releases resources without publishing into retiring views. File selection and runtime facts are prepared together before rendering; editor initialization follows the retained Lit DOM commit. Question resource previews use the lazy Solid component entry point so they inherit the application provider.
Regression repairs preserve typed-input focus, inactive file identity, scoped media requests, comment editor lifetime, and progress-menu clicks inside the retained Lit summary. Tests now exercise public bridge properties and observable DOM instead of removed Lit methods. Custom-element declarations live with their element owners so core test-type stripes see them without pulling chat renderers into the shared SDK type entry point.
Evidence
c7c674c8c9e485b0bc72472f199157a528ef5f45: production/test types, lint, baseline ratchets, all 3 UI unit shards and all selected UI E2E shards. Aggregate gate is red only for the inherited duplicate-scan coverage failure below.a17bd679979e1dc69bba795222c5dce5da750815and rendered candidate3970de999f9120c824f6a73fbfce515bd1aa1e10passed; the final type/callback and adapter-option merges preserve the captured appearancePrevious CI exposed assertion allowances, direct Lit imports, type-only import cycles, JSX contracts, lifecycle errors, and obsolete fixtures. Those failures were repaired. The latest repair also addresses all four concrete findings in the existing ClawSweeper review. Local Vite runs exposed cold dependency discovery reloads in the testing library and editor language packages. Explicit pre-optimization removes those reloads; the resulting five Details and twenty editor tests pass. The MCP context regression preloads the real view module before the timed interaction so it measures context forwarding, independently of cold dev transforms.
One Testbox attempt admitted but failed before parity rendering because its temporary baseline checkout lacked the Workboard dependency link. Lease
tbx_01m4kw59c09mk3876q4mf03hveis stopped. No local Docker, whole-suite, typecheck, build, or E2E run was used; hosted CI supplies the heavier checks. The per-PRci:no-fail-fastlabel collects all selected results without relaxing any check.Prior CI on
3970de999f9120c824f6a73fbfce515bd1aa1e10passed production types, baseline ratchets, and both selected UI E2E shards. Its remaining lane-owned failures were the detail-panel host declaration and unbound invalidation callback; both are fixed. The dashboard route mismatch reproduced on the exact merge base under Node and Bun (expectedcompact, owner useddashboard) and is fixed by the newly integrated main commit11a1569887f43. Four unhandledwa-tooltippopup errors occurred after all 7,084 assertions in UI shard 2 passed. The unchanged tooltip test/helper/owner pass 8/8 alone on base and branch under Node/Bun, so that earlier failure is recorded as unreproduced, not claimed fixed or inherited. Current exact-head UI/type/lint CI is green, with no repeat of those tooltip errors.The sole current source-check failure is inherited from CI's actual merge base
0690a2ef175fc73d69d73105638b69a90af35fe6. CI checked merge commit31721ce6(that base plus this PR):check-guardsreportsworker-heap-flag.mjsoutside duplicate-scan coverage. The file exists on that base, and the scanner is byte-identical to this branch. Running the owning failure path,node scripts/check-duplicates.mjs --coverage, on the exact base reproduces the identical failure in 0.32s. No scan baseline, threshold, or ignore was weakened. Aggressive landing per Peter uses the inherited-failure exception forcheck-guardsand its aggregate gate.Screenshots
Visual proof: baseline
a17bd679979e1dc69bba795222c5dce5da750815→ candidate3970de999f9120c824f6a73fbfce515bd1aa1e10.Both hosted runs passed; all captures were inspected and contain only synthetic data. The later host-type declaration and bound callback preserve this appearance. Details, welcome controls, side-chat placement, and composer geometry remain intact. Spinner wording and caret timing vary between captures.
Hosted runs: https://github.com/openclaw/openclaw/actions/runs/38135560665 and https://github.com/openclaw/openclaw/actions/runs/38136249346.
Size
Production files in this diff: 17,701 → 18,580 LOC (+879). Tests/support: 17,471 → 17,782 LOC (+311). Counts include both sides of renamed files. Growth is primarily explicit bridge property contracts and render/disposal boundaries. The port removes 24 Lit registrations, 154 templates, 115 property decorators, and four leaf shadow-style templates, with no pending-conversion markers.