Repository navigation
refactor(ui): port shared pickers, dialogs, and toast to Solid 2 - #170387
Conversation
Preserve public tags, picker selection contracts, modal focus, and toast FIFO through the Solid bridge. Keep the existing lazy entry points and render notification content on first use.\n\nLocal migration checkpoint; integrate the approved native overlay prerequisite from main before publication.
Keep the new Settings language-select API on the owned picker and retain the model picker direct Solid path. Reveal the selected agent after the menu entry animation completes; preserve the overlay owner toast render-update coverage.
Follow the shared menu initial focus policy after its entry animation, including the enabled fallback when the stored selection is disabled. The long-menu regression is proven red before the change and passes in Chromium and WebKit.
Find the connected toast host through the existing modal-layer registry after reparenting moves it beyond document queries. Extend the existing shadow dialog regression with a second notice; preserve the service queue and dismissal owner.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
|
Codex review: needs changes before merge. What this changesThis PR moves shared Control UI pickers, dialogs, and toast rendering from Lit to Solid 2 while retaining their existing host tags and caller APIs. Example: Open the Research agent selector in command-palette settings.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 3 items remain Keep this PR open: the maintainer-directed migration is useful, but the previously reported ArrowUp selection regression remains. Priority: P2 Before merge
Findings
Provenance
Agent review detailsHow this fits togetherShared controls receive caller-owned choices, values, and callbacks, render browser interactions, and return selections or dialog outcomes to existing domain owners. flowchart LR
A[Control UI callers] --> B[Existing host tags]
B --> C[Solid bridge]
C --> D[Solid views]
D --> E[Menu and overlay owners]
D --> F[Caller callbacks]
G[Synchronous toast service] --> D
Technical reviewBest possible solution: Retain the Solid migration and restore enabled-selection priority when ArrowUp opens the shared picker. Do we have a high-confidence way to reproduce the issue? Source establishes the ArrowUp regression by tracing opening publication, selected-value initialization, and the subsequent last-row override; no target code was executed. Is this the best way to solve the issue? The existing bridge, menu, overlay, and synchronous domain owners are appropriate for this migration, with a focused selection-priority correction required. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a00fb480d3cf. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfacePR surface statistics unavailable: the file list is incomplete. 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 (7 earlier review cycles)
Reviewed October 12, 2026, 11:27 PM ET / October 13, 2026, 03:27 UTC (Revision 8). |
|
Merged via explicitly authorized admin squash with prior CI and scoped validation.
|
ToastView became lazy in ecdc40d (#170387), so bridge updateComplete alone no longer settles the rendered notification. Match the owning toast test by joining dynamic imports and flushing Solid before the original assertions. Preserve currentness, authority, navigation and toast content expectations.
…nclaw#170387) * refactor(ui): port shared pickers, dialogs, and toast to Solid Preserve public tags, picker selection contracts, modal focus, and toast FIFO through the Solid bridge. Keep the existing lazy entry points and render notification content on first use.\n\nLocal migration checkpoint; integrate the approved native overlay prerequisite from main before publication. * fix(ui): preserve picker layout and migrate language selection * refactor(ui): reconcile picker migration with current shared helpers * refactor(ui): preserve modal toast ownership during Solid migration * fix(ui): preserve parent settlement during nested Solid mounts * fix(ui): reveal the agent menu focus target Follow the shared menu initial focus policy after its entry animation, including the enabled fallback when the stored selection is disabled. The long-menu regression is proven red before the change and passes in Chromium and WebKit. * fix(ui): keep successive toasts visible in shadow root dialogs Find the connected toast host through the existing modal-layer registry after reparenting moves it beyond document queries. Extend the existing shadow dialog regression with a second notice; preserve the service queue and dismissal owner. * fix(ui): reconcile Solid picker and toast boundaries * fix(ui): preserve selected agent focus during keyboard opening * fix(ui): preserve keyboard ownership across picker boundaries * fix(ui): keep agent identity loading on native picker events * fix(ui): keep picker assertion rationale attached after formatting * fix(ui): align picker imports and tests with current overlay contracts * fix(ui): preserve drawer Escape ownership * chore(ui): prune retired picker assertion allowances * test(ui): yield recurring sidebar animation frames Keep ordinary JSDOM frame settlement in microtasks, but route frames requested inside a frame callback through MessageChannel. This prevents the recurring overlay anchor from starving Bun workers while preserving owner-to-DOM settlement and controlled frame tests. * test(ui): settle migrated picker and toast consumers Keep sidebar ownership assertions on the native picker menu, await lazy Solid toast DOM for archive outcomes, and let roster bootstrap join the held dashboard query before the cold-load fixture rejects it. Preserve existing behavior and assertions. * test(ui): trace native collaborator scroll policy * fix(ui): preserve picker ArrowUp opening fallback * refactor(ui): retain existing bridge type import * fix(ui): remove picker registration from ambient types * test(ui): drain mock responses during roster clock advances
ToastView became lazy in 5658968 (openclaw#170387), so bridge updateComplete alone no longer settles the rendered notification. Match the owning toast test by joining dynamic imports and flushing Solid before the original assertions. Preserve currentness, authority, navigation and toast content expectations.
What Problem This Solves
Shared pickers, dialogs, and toast still depend on Lit while the Control UI moves to Solid 2.
User Impact
These controls retain selection, keyboard navigation, dialog focus, and toast behavior through the existing tags and service APIs. The agent menu adopts the shared primitive’s spacing and focus ring.
Why This Change Was Made
Port the shared selection controls, confirmation/input dialogs, and toast renderer from Lit to Solid 2. Each registered tag has one implementation behind
defineSolidBridge; existing tags, classes, callbacks, routes, and selectors remain usable by Lit consumers. Agent registration and the toast view retain their lazy boundaries.The shared menu adapter owns navigation, selection, and dismissal. Pickers add listbox content and consume the menu’s lifecycle callbacks, including a six-line
onAfterShowinterface needed to reveal the accepted opening focus target after animation. Native overlays retain vetoable dismissal and modal focus restoration. Domain owners remain plain TypeScript. The toast service retains FIFO ordering, paused timeouts, modal reparenting, and dismissal reasons; a separate synchronous host registration keeps its renderer lazy.Coupled consumers use native menu events and observable readiness. Focus fixes cover keyboard reopening, selected-row visibility, nested Escape, and the sidebar focus trap’s delegated-event target. ArrowUp preserves an enabled stored selection, including the empty value, and falls back to the last enabled row only when that selection is missing or disabled; the native keyboard regression covers all four cases. Layout fixes preserve low-positioned menu height and command-palette alignment. Tests also preserve successive notices after the toast host moves into a shadow-root modal. The ambient JSX picker declaration uses its existing DOM tag contract to avoid a registration-module import cycle.
Evidence
All local files ran separately with one worker. Browser evidence includes Chromium and WebKit for every overlay. The latest integration adopts main’s Menu content-entry renderer and broader attributes unchanged, retaining only the required lifecycle callback.
06001d846eefe: 343,409 → 343,176 B gzip (-233 B); 8 JS / 1 CSS requests on both sides. Both strict checks pass the 374,285 B / one CSS ceiling. Base/head builds: 124.21/118.22s. CSS: 49,071 → 49,184 B.115449024965passes (138s), comparing tested merge8b80a4afwith base52665817. Candidate startup: 348,601 B gzip, 8 JS / 1 CSS requests; CSS 49,481 → 49,590 B (+109). Measured base startup JS is not printed, so no fresh startup-JS delta is claimed. Chat/New route boot JS grows by 28,381/30,600 B; request counts stay 30/27 and all enforced budgets pass.The startup comparison is the retained same-host measurement against main
06001d846eefe; fixed build metadata was identical on both sides. The subsequent main integration and test-only repairs are separately qualified below; these startup numbers are not a fresh measurement of the final head. Component markup/styles remain covered by the inspected visual evidence.Local WebKit has ten baseline-matched failures, retained without weakened assertions: two grouped-decision picker Tab cases (390/1280px), three native menu Tab/navigation cases, one vetoed-popover outside-focus case, and four sidebar filter Tab cases. The matching baseline replays and exact names remain in the native review evidence. Chromium’s relevant focus cases pass. These failures are reported as failures, not green proof.
Touched production LOC: 13,465 → 13,904 (+439) across 42 files. Tests/support: 38,505 → 38,773; UI config: 469 → 478. Four obsolete assertion allowances are removed. The separate coupled backend fixture removes 27 net test lines. Growth is concentrated in the shared menu’s listbox support, typed DOM bridges, and the temporary adapters required by remaining Lit callers.
Current CI
Fresh
ci:fullrun 38441350196 passed on22ffa2a006af3042ff14834db40bac14f3b3f3b8: 50 successful jobs, 22 skips, no failures or cancellations. All 14 UI jobs passed (3 unit, 9 mocked E2E, 2 real-Gateway); the exact API-key edit/remove case passed in 26.808s, and real-Gateway shard 1 passed 17 files / 22 tests. CI wall: 1,231s, aggregate jobs: 17,615s; UI wall: 1,130s, aggregate jobs: 10,196s. This follows merging main2e72813c450fb76402fbebe251c3a556347fc1c1to recover an interrupted job. UI types passed in 35.51s; the automatic shell integration received a clean independent P0–P2 review against both parents. No dependency change or new local E2E run was needed. Native review and GitHub-only preparation completed for this exact head. Landed through documented confirmed-cancellation admin recovery asecdc40dbcf9bfc4c083237fdfa69ea949088f27c, verified reachable fromorigin/main. A retry after GitHub reported MERGEABLE succeeded without changing the reviewed head or pushing. The native parent audit recorded that main advanced between admission and the actual merge parent; the completed receipt retains that fact. All selected-head CI passed; no failed-check exception was used.The previous full run 38437049358, on
1a6a812b, passed every test assertion, including the formerly failing API-key CLI logout case (31.076s). The real-Gateway shard reported 17 files / 22 tests passed, then GitHub cancelled the job at its 20-minute limit after all recorded steps succeeded. Final accounting: 48 successful jobs, one cancelled job, one failed aggregate, 22 skips; CI wall 1,323s and aggregate job time 17,641s. UI wall 1,202s and job time 10,246s. Its auto-merge request was explicitly cancelled through native recovery before this push. This is a job timeout, not a recurring logout assertion failure; no test budget or assertion was changed.Source inspection confirms that the CLI logout uses
--yes, skips confirmation, and directly removes credentials then requestsmodels.authRefresh; it never opens or awaits a browser dialog, picker, or toast. UI Remove key also dispatches directly; browser profile logout is a separate confirmation path. The earlier run 38429522467 emitted an unattributed post-handshake refresh warning while both scheduled main comparisons passed. The newer passing case does not establish a causal fix for that historical failure.Main independently landed the roster clock repair in #170927; this branch adopts that fixture byte-for-byte, so it is absent from the final diff. Earlier run 38372028878 was fully green (50 passed / 22 skipped, all 14 UI jobs), before subsequent main integrations. Historical and current-head evidence are kept distinct.
Visual proof
Before is on the left; after is on the right. All ten pairs were captured on base
2f328736and the migrated candidate, inspected in full, and contain only synthetic data. Later CI repairs and main integration changed lifecycle, focus handling, host registration, and test contracts; the pictured picker/dialog/toast markup and styles remain unchanged.Accepted visual differences: the agent menu uses the shared primitive’s spacing and focus ring. Confirmation text drops an incidental leading blank line from the Lit template; explicit message line breaks remain intact.
Supplemental command-palette settings proof preserves the same desktop and mobile alignment. All data is synthetic; before is baseline
2f328736and after includes the picker layout correction.