Repository navigation
refactor(ui): port board and system pages to Solid 2 - #168871
Conversation
# Conflicts: # ui/src/app/shell-layout-traits.ts # ui/src/pages/plugin/plugin-page.test.ts # ui/src/plugins/control-ui-view.runtime.ts
|
🦞👀 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 real behavior proof before merge. What this changesThis PR replaces Lit rendering for boards, dashboards, plugin views, Portals, and Systems with Solid 2. Example: Reorder two loaded dashboard widgets containing an unsent draft.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 5 items remain Keep this PR open: the maintainer-directed migration remains distinct work, but the prior board translation regression is unresolved. Priority: P2 Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherThe Control UI consumes Gateway state and plugin registrations, renders browser pages, and routes interactions through existing domain and SDK owners. flowchart TD
A[Gateway state] --> B[Domain owners]
B --> C[Reactive projections]
C --> D[Solid bridge and views]
D --> E[Browser DOM and frames]
E --> F[Scoped plugin host]
F --> A
Technical reviewBest possible solution: Complete the existing Solid cutover while restoring reactive board translations and preserving the established plugin retirement boundary. Do we have a high-confidence way to reproduce the issue? Source establishes the locale regression: mount a pending board widget in English, then change language; nonreactive translation expressions retain English labels despite the locale notification. Is this the best way to solve the issue? The bridge-based cutover follows the existing migration architecture, but the board renderers must consume the shared reactive translation adapter. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 072f977edd46. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: shipped entry point. SecurityNeeds attention: Native-plugin handle retirement needs final-effect validation; no concrete authorization bypass was established. EvidenceWhat I checked:
PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
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 (16 earlier review cycles; latest 8 shown)
Reviewed October 11, 2026, 4:53 PM ET / 20:53 UTC (Revision 17). |
|
Additional populated-state visual proof: 16 before/after pairs across desktop/mobile and light/dark, with zero changed or raster-noise pixels. The board capture verifies loaded widget content, reordered visual positions, stable iframe identity and retained draft text. Native plugin completion, the portal preview and selected-system details are also covered. All media is inspected synthetic data. Baseline: f2e649d. Candidate: 5347f37. The subsequent merge at 1c00334 changed only a dashboard test in this port's product scope. |




What Problem This Solves
Ports the board, dashboards, plugin host/pages, portals, and systems rendering from Lit to Solid 2 while preserving registered tags, routes, CSS classes, selectors, and the plugin SDK.
User Impact
The pages retain their appearance and interactions. Board reordering preserves DOM insertion order, iframe identity, and draft state. Removed MCP widgets remain connected until teardown completes. Retained portal and plugin views keep their state through presentation changes and reject work from retired owners.
Why This Change Was Made
Each ported tag has one Solid implementation registered through
defineSolidBridge; its Lit class is deleted. Domain owners remain plain TypeScript and consumers use existing projections. Solid icons/settings helpers replace touched equivalents. Remaining Lit render helpers serve actual unported callers and can be deleted with those callers.The shared bridge invokes setup through Solid's untracked component entry point, preventing provider memos from rebuilding a retained view on a property update. Native link/div rendering replaces a generic dynamic-tag helper, and the session summary subscribes directly to its fixed Gateway event owner; this avoids retaining unused generic code in the startup chunk. Dashboard pagination stays synchronous with the managed-list owner's completion notification. Plugin history retires its connection scope synchronously, including same-client reconnects. Shared custom-element types have one declaration owner. The current main Solid sparkline is retained, and its data/JSX contract remains in a plain type-only owner. Standalone chat fallbacks use the existing optional application-context helper. The frame uses its
.tsxmodule directly: a redundant same-name.tsre-export shadowed the implementation in type-aware lint and is removed.The port incorporates main's nested-bridge, lifecycle callback, Lit-content timing, and tooltip readiness fixes. The original plugin runtime path retains only a six-line stateless adapter for the unchanged SDK's opaque Lit templates. The Solid implementation lives in a separate module, so the adapter and renderer stay behind the plugin lazy boundary. A coupled terminal correction sets the native custom-element
activeproperty explicitly so the viewport becomes visible; its browser regression failed before the correction and passes afterward.Evidence
pnpm tsgo:uipassed under the updated post-Testbox worker rules; final JSX fix verified38173142445: all UI units, scheduled E2E, production/test types, and lint pass. Only an independently reproduced baseline Node inventory assertion fails; native inherited-failure landing evidence prepared.tsgo, Docker, or OrbStack. Local Bun could not collect with this Mac's runtime; pinned Linux CI owns Bun proof.The 24 route pairs compare baseline
04647ea6with the port. The 16 populated pairs comparef2e649dawith candidate5347f37f; later product changes retain board error feedback across unchanged recovery and restore terminal viewport activation; both have focused regression proof. Board capture checks actual loaded frames, reordered positions, iframe identity and retained input before taking the image. Iframe captures use explicit content/font/visibility/stable-bounds readiness because the general still-frame observer did not settle in the sandboxed frames. Every uploaded image is inspected and synthetic-only.The activity browser test independently failed all four cases on pristine CI baseline
ab6c07f5: it inspected a detached Retry button after the feedback branch replaced it. The live button was correctly disabled and the retry started. Main independently landed the same live-button repair, with direct completion promises; this PR takes main's exact test (4/4, 4.26s wall), retaining its loading/error/recovery checks. Baseline command:pnpm test ui/src/pages/activity/session-activity-view.browser.test.ts --maxWorkers=1, 3.76s wall (2.10s Vitest).Size and accepted tradeoff
Physical lines across changed files against integrated baseline
ed684fc7:Production remains larger than the replaced Lit code. Growth is explicit typed bridge properties, JSX bindings, and retained-view/async teardown handling previously hidden in element lifecycle methods. Simplification removed duplicate plugin rendering, redundant board maps and preload state, and every replaced Lit class. The existing board interaction class moved into a sibling file to meet the line cap. No dependency, new store, or plugin SDK change.
As on main, rapidly switching targets A → B → A on one connection may briefly show an earlier display-read result; that refreshable display case is accepted instead of adding more request generations. Gateway replacement and detached-view authority remain guarded.
Before / after
Populated-state comparison sheets show the loaded board, native plugin, portal iframe, and selected-system details. Route/default-state sheets follow.
Review disposition: the resolver-only frame finding was declined after the existing direct-element regression passed unchanged (1/1, 3.94s). Every bridge property observes the shared revision, so changing only the resolver wakes the frame update effect; the iframe is retained. No speculative dependency was added.
Final CI disposition: run
38173142445tested head337bea708f613301aaa9067c74978f4b4015e6e3in mergea9d6e044f6a55fc3e765dec5c4300e7ec928e8dbover baseline4b7b100b48210ed5bd751b6bf83d5e81b7375761. The sole root failure istest/scripts/ci-node-test-plan.test.ts/ “keeps host-owned database consumers in forks and out of their former projects”: its database-worker list still names deletedsrc/auto-reply/reply/get-reply.maintenance-conflict.test.ts. The exact case fails on that pristine baseline too (8.57s wall), and all eight relevant source inputs match the tested merge. No job was rerun. The CI aggregate fails only because of that root; all other jobs are terminal. Landing uses the native inherited-failure/admin route.CI cost evidence: UI unit shards 947 runner-seconds total; scheduled UI E2E shards 971 runner-seconds total. These run in parallel; wall time from CI creation to completion was 587 seconds.