Repository navigation
refactor(ui): port cloud workers, worktrees, and logs to Solid - #168767
Conversation
|
🦞👀 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 replaces the Cloud workers, Worktrees, and Logs Lit pages with Solid components while preserving their routes and Gateway operations. Example: Open Build snapshot for linux-build and /synthetic/app on a 390×844 screen.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-owned migration remains distinct work, preserves the existing product contracts, and has no actionable code findings. The required CI gate remains failed. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherControl UI routes mount these pages through the Solid bridge; Gateway snapshots and configuration capabilities supply their data, and user actions invoke the existing RPC owners. flowchart LR
A[Control UI routes] --> B[Solid bridge]
B --> C[Solid pages]
D[Gateway lifecycle adapter] --> C
E[Configuration capability] --> C
C --> F[Existing Gateway RPC owners]
F --> D
Technical reviewBest possible solution: Land the single-owner Solid migration through the native workflow after the failed required CI gate is resolved or qualified. Do we have a high-confidence way to reproduce the issue? This is a renderer refactor; source and inspected browser captures establish the changed surface, and no target code was executed during this review. Is this the best way to solve the issue? The change follows the existing Solid bridge and Gateway lifecycle owners, deletes the replaced registrations, and preserves configuration and RPC contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against bbc5a0197030. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +633, Tests +160, Other -1. Total +792 across 44 files. Added test files: 1. View PR surface stats
Review metrics
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 (14 earlier review cycles; latest 8 shown)
Reviewed October 11, 2026, 9:34 AM ET / 13:34 UTC (Revision 15). |
…-pg-2b # Conflicts: # ui/src/pages/gateway-source-replacement.test.ts
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…law#168767) * refactor(ui): draft Solid cloud workers, worktrees, and logs port * test(ui): use shared Solid mount lifecycle for migrated pages * fix(ui): preserve native controls and live log timestamps * fix(ui): retain worktree drafts and log filter spacing * refactor(ui): render the worktrees header with Solid * fix(ui): keep worktree header translations reactive * chore(ui): shrink the migrated tab assertion baseline
What Problem This Solves
Cloud workers, Worktrees, and Logs still used Lit page implementations during the Control UI migration.
User Impact
The same routes and controls now render with Solid 2. No configuration or data migration is required; in-progress Worktrees input and localized headers stay current.
Why This Change Was Made
Replace seven registered Lit owners with Solid 2 through the landed bridge, retaining host tags, CSS classes, routes, controls, and Gateway behavior. Domain operations remain plain TypeScript; the pages consume the shared connection adapter on main for cancellation, stale-result rejection, and reconnect lifetimes. No configuration or data migration is required.
Worktrees also renders its header in Solid. Its narrow coupled interface change extracts the existing tab-focus handoff into a plain TypeScript owner shared by the old Lit tabs and the new Solid consumer. No Lit ratchet exception is added. The registered Lit originals are deleted.
Visual and unit proof caught and fixed three migration regressions: incoming log rows retained an old system timezone; an asynchronous Worktrees refresh could erase an in-progress repository draft; and missing JSX whitespace changed log-chip wrapping and joined pool-error sentences. Locale changes now update the mounted Worktrees header. Snapshot rows retain focus and DOM identity across refresh and busy-state updates.
Evidence
c772abea0702, run 38141042454:49 successful jobs,21 skipped, three qualified failures outside changed runtime paths plus the aggregate; all type jobs passThe final screenshot baseline is
d4e9d09e9422and the candidate runtime source was verified against6ae798c2bada. Fixtures use synthetic data only. The shared Solid settings helper omits empty section headers, removing 12 pixels of unused space in the Cloud workers pool/snapshot sections; content and controls are retained.Local final Worktrees tests took 23.78s; its draft regression failed before the fix in 20.71s and the earlier green run took 43.34s. Logs view took 91.21s including startup, and the old-formatter control failed in 100s. Shared tabs/focus took 4.01s/14.85s. Earlier exact-head CI built the production UI in 11.49s; its bundled E2E job took 87s, UI unit shards 249/318/221s, and production types 225s. Final CI timing follows the linked checks.
The first CI type/lint failures were PR-caused and corrected. A later run also exposed the remaining Lit header import, now removed. Its Doctor export collision and Bun table-focus failures came from the CI base; this branch integrates the main fixes
3f08ea94a337and2c6f9e076e11and will use fresh exact-head CI. A focused lint wrapper unexpectedly entered unrelated declaration preparation and timed out; direct focused lint passed. No local Docker or broad suite was run. Bounded local screenshot capture used the wave's documented fallback after Testbox admission failed.Size
Page production TypeScript: 3,767 → 4,396 LOC. Page tests/support: 4,086 → 4,267 LOC. The lane now consumes the Gateway lifetime helper landed by #168815; its only shared-helper change passes the existing lifecycle change to the initial-load callback (two changed lines). The shared focus owner moves existing logic between two consumers. Explicit lifetimes and JSX account for the page growth.
Visual proof
Synthetic fixtures only. Before:
d4e9d09e9422; after:6ae798c2badaruntime source. Later merge-conflict resolution changes no page rendering. Desktop 1440×960; mobile 390×844; light and dark.All 31 states, desktop/mobile, light/dark — paired comparison sheets
Latest main integration resolved one adjacent-deletion conflict in
gateway-source-replacement.test.ts, preserving the Solid Logs replacement and main’s consolidated diagnostics coverage. The resolved file passes all 14 tests (125s including startup). The merge resolution also passed P0–P2 review. No files in the three ported page directories changed after the inspected6ae798c2badacapture.The final follow-up removes the verified stale
hub-tabs.tsassertion allowance (1 → 0) after extracting the shared focus owner. The local assertion ratchet passes across 2,839 files; no allowance was added or increased.Previous-head CI attribution
Run
38127506443, attempt 1, tested merge56d767c98ab279bb3f23608d165fb5b3d2c61955from base3f495777d43fa81e13c80dc64969edcc8d7b6145and head53df6462aa1a7f443e8aac7c34d6524b3032a34e. The earlier stale assertion allowance is fixed; its ratchet now passes. The latest PR-context check passes.checks-ui (1/3)passes all 559 files / 7,530 tests, then fails on 12 unhandled MCP catalog/resources/context-strip errors from the newly landed base MCP port.checks-ui (2/3)fails the MCP reload browser case, the explicit-discard chat case, and reports 264 unhandled MCP context errors. The exact-base Bun MCP browser replay reproducesContextNotFoundError. The first Bun discard replay failed before collection due to a local jsdom worker-startup error, so it is not reproduction evidence. A standard Node-wrapper replay on that exact base then reaches the discard case and fails its missing-answer assertion after the same MCP context errors halt Solid reactivity (132.63s). CI expressed that missing update as a 60-second timeout; the local replay's assertion/serialization outcome is recorded distinctly.91fd61deb4a4, refactor(ui): render MCP apps and canvas widgets with Solid #168833), before any migrated Cloud workers/Worktrees/Logs renderer is used. The final aggregate gate fails only because those two UI jobs fail. No job was cancelled.Landing uses the native, explicitly authorized inherited-failure evidence route; failed CI is not represented as green. No failed job was rerun.
Main integration before landing
Native landing correctly refused the earlier head when #168815 landed a different
useGatewayPageinterface at the same path. The branch merges mainec5fe47d136band adopts that helper and its tests. Seven consumers now use itsgetGatewayoption. The only shared interface extension supplies the existing lifecycle-change argument toensureInitialData, which lets Logs preserve visible versus quiet reconnect refresh behavior without copying state. Presentation signals written from the helper's owned effects explicitly opt into those writes; the Cloud catalog handles the helper's initially absent snapshot. No rendered markup changed.Fresh single-file integration proof: Gateway helper 4/4 (3.65s), Logs lifecycle 18/18 (3.96s), Worktrees 23/23 (5.52s), Cloud profiles 7/7 (16.95s), pool 8/8 (4.15s), snapshots 7/7 (3.62s), snapshot builds 20/20 (3.74s). Focused lint completed with four existing Solid reactivity warnings in unchanged snapshot callback sites. Its wrapper unexpectedly prepared dependency declarations, as noted above. The initial unadapted helper correctly failed Logs with owned-write errors; the integrated consumer passes. Fresh P0–P2 review is clean. New published head
66d89ae4638a7a31b8d97bb6009fb9d66f4cf8adnow runs exact-head CI before landing.A final adjacent assertion-baseline conflict preserves both independent removals (the removed file-preview entry from main and the removed Lit hub-tab assertion from this lane). The ratchet passes across 2,826 files / 6,635 existing assertions, and fresh P0–P2 review is clean. No page code changed.
Shared JSX declaration follow-up
CI run
38134477854for66d89ae4638afound overlapping ambient JSX declarations introduced by parallel page ports. The production type job and five core test-type jobs all reported the same modal/tab declaration conflicts. The lane now consumes the canonical modal declaration and places Web Awesome tab group, tab, and panel types in the existing shared declaration owner. The two tab consumers remove their duplicate blocks. Concrete element types, manual/automatic activation, tabindex and existing markup are preserved. Focused lint and fresh P0–P2 review pass. Page production LOC falls to 4,396.That run's other failure is inherited: the dashboard route tests expect
rowMode: "compact", but the unchanged base route sends"dashboard". The exact CI base86f4a215920cb07a588659ba6546150a4e1b0932reproduces all three failures in the standard single-file Node run (3.78s Vitest, 6.69s wrapper). This lane changes neither that route nor its tests. No failing job was rerun.Current published head:
07907df0498e3ac4206c3ca5b394dc44c20d89f8; exact-head CI will verify the type consolidation.Final-head CI
Run
38135921057, attempt 1, is complete for head07907df0498e3ac4206c3ca5b394dc44c20d89f8. Production types and all five core test-type jobs now pass, as do the UI build/bundled E2E and all other selected checks. The only failed root ischecks-ui (1/3)(561 passing files, 7,485 passing tests): the same three dashboard route expectations described above. The aggregate gate fails downstream; no jobs were cancelled. The route, test and request-owner sources are identical between CI basef30bfc6ccb91d399c8de585ca27029caca1fcbcfand tested mergede85ab6b37646d0a4a5de401c4fa8d47c688f7ef. Native landing will retain this inherited failure explicitly.The latest CI base
f30bfc6ccb91d399c8de585ca27029caca1fcbcfwas also replayed directly: the same three dashboard assertions fail (1.76s Vitest, 3.26s wrapper, 4s shell). The final native evidence binds that log, source hashes, tested merge, the one failed UI job and the downstream aggregate.Head
c43a4c79e2d6ab40b6e742c5ccdf711cc80cc623resolves a later import-only conflict in the shared declaration file, preserving both main’s popover/mascot imports and the reviewed tab types. No page code changed; focused lint and P0–P2 review pass. Its own CI is the final proof.Current-head CI qualification
On
c43a4c79e2d6, the dashboard tests pass. The only failed root ischecks-ui (3/3):link-reader-hovercard-seeds.test.tsfails during collection with a duplicate custom-element registration, before any test body runs. All 7,603 executed tests in that shard pass. The other 51 jobs pass; 21 are skipped and none cancelled.Single-file replays on the exact CI base
568123918941b964e7dea81afeecc5517617a0a5both pass 11/11 (Node and Bun/forks, about 5s each). Those replays do not reproduce the shared-worker failure. Qualification instead uses the observed import boundary: its 75 relative static dependencies contain none of this PR’s changed runtime sources; those modules, the shared-worker runner, registry cleanup, configs and lockfile are unchanged between the base and tested merge (81 verified blobs). The failing file registers its tags before tests; the changed pages do not run in that path.Accepted uncertainty: the exact earlier registry occupant in CI’s non-isolated worker was not identified. Native inherited-failure admission uses the independently inspected failure before changed code is reached, preserves the failed CI conclusion, and does not represent the isolated passing replays as a fix.
Current head
c772abea07021761c1141f49233fc84707bafbbaresolves main’s Solid model-settings test import while keeping the retired Lit Logs import removed. The affected gateway replacement file passes13/13 tests (7.62s wrapper), and fresh P0–P2 review is clean. No production page source changed.Current landing evidence
Run
38141042454, attempt1, completed for headc772abea07021761c1141f49233fc84707bafbba; tested merge8dd9a2404b9fa1aac2ffb9f3f84d6899cc7dca0ehas ordered parents base7872bfbef116a9fc71890c2b9da36cd96179c3edand that head. There are49 successful jobs,21 skips,3 failed roots and the downstream aggregate; none cancelled.subagent-empty-completion-recoveryand QA4subagent-completion-direct-fallbackeach exhaust180s waiting for a forced config restart to become ready. The corresponding profiles otherwise pass5 and8 scenarios. Thirty-one scenario/harness/config/restart/readiness source blobs match base to tested merge./readyzis handled before Control UI routing; transport readiness pollschannels.status. Neither path executes browser pages. The precise restart/readiness cause remains unknown, and these QA cases were not replayed locally under the host limits.The native inherited-failure evidence uses these inspected execution boundaries and retains the limitations, instead of claiming an exact reproduction or green CI. All page-specific tests, production and core test types, UI build/bundled E2E, and the other selected checks pass.