Skip to content

feat(ui): use native Solid overlays and tabs - #169128

Merged
steipete merged 59 commits into
mainfrom
solid2/p2-prim-b
Oct 12, 2026
Merged

steipete merged 59 commits into
mainfrom
solid2/p2-prim-b

Conversation

@steipete

@steipete steipete commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Ports the Control UI’s shared menus, popovers, tooltips, dialogs, and tabs to owned native browser surfaces and Solid, preserving existing callers, host tags, keyboard behavior, focus, cancellation, and appearance.

User Impact

Tooltip presentation and modal registration load on interaction; idle tooltip descriptions remain accessible. Pending tooltip loads cancel on Escape without intercepting dialog cancellation. Menu navigation reveals the highlighted item, including repeated End/Home. Programmatic transcript corrections preserve following after command retirement, while reader input still takes over. No configuration migration is required.

Release-note context: migrate shared Control UI overlays and tabs to native browser primitives while preserving keyboard, focus, cancellation, and appearance.

Implementation

One renderer-neutral lifecycle owner admits open/close changes before listeners, inertness, occlusion, or focus effects. It owns opening/open/closing/hidden phases and suppresses superseded completion. Vetoable surfaces use popover="manual" with lifecycle-owned light dismissal. Native dialogs restore focus synchronously when possible and defer only while inertness is pending; disconnect, removed targets, and newer focus cancel that deferral. Native-view occlusion retains its existing owner.

CSS anchors own placement, flip fallbacks, and the 420 px/available-height limits, including a measured caret anchor. The Zag binding preserves sibling switching, roving item focus, Back→Down navigation, and nested teardown. @zag-js/menu, @zag-js/vanilla, and @zag-js/rect-utils are pinned exactly to 2.0.0-next.3, published September 14, 2026 and cooldown-eligible. The maintained chakra-ui/zag upstream and these pins passed the requested 183-check qualification spike.

The eager tooltip tag retains timing, exclusivity, descriptions, and cancellation policy; its Solid view loads on first activation. First view creation follows the import Promise even when cached, so focus from a Solid effect cannot create a primitive in forbidden scope. Remaining Lit callers use one registered implementation per tag through the bridge. Plugin dialog updates preserve the native shell and policy.

Associated CI repairs preserve TSX import-graph analysis, native timer ownership, atomic mock-response cursors, and explicit storage selection in the isolated MCP evidence reader. The mock server reuses its Vite configuration and synthetic build identity and defers scenario-specific imports. The final scroll repair preserves an actual offset write’s receipt until native delivery; input cancellation and receipt matching remain with the existing owner. No assertion, timeout, performance budget, or gate was relaxed.

Size

Original touched production calibration: 13,262 → 17,213 LOC. Owned primitives replace behavior supplied by a dependency. Later panel-tab CSS consolidation removes 146 production lines; the keyboard-reveal repair adds three. The final offset receipt repair has no net production-line growth. The later Web Awesome exit removes the package and its 3,096-line patch. Remaining consumers still need its registration and theme.

Proof

Candidate: 8d0329c1e7e00163f571b49951db3d92ad9699a8, including merged main 7d81b85ccacdf37292cbb7c9c64a2e340cbbb305. Full-lane and subsequent scoped Codex P2 reviews are clean. The final three reviewed files match the committed source byte for byte.

Check Result
Same-machine startup JS 411,095 → 381,259 gzip B, 29,836 B smaller
Strict pnpm ui:build Base and candidate pass; 80.77 s /77.91 s wall; 8 startup JS requests
pnpm tsgo:ui Pass, 68.77 s; later relocation changes only tests excluded by this configuration
Final typed lint, formatting, review Four-file typed lint passes in 75.15 s; formatting/diff and final independent P2 review pass
Toast conflict resolution 17/17 pass; 43.99 s wall /26.09 s Vitest
Transcript receipt regression Fails before repair at follow lock; passes afterward with wheel takeover preserved; 110.80 s /78.53 s focused wall time
Full controller and ownership suites 33/33 and 50/50 pass; 85.48 s /87.19 s wall, 47.20 s /39.19 s Vitest; hosted test execution 1.508 s /0.656 s
Native modal exit fixture Chromium/WebKit pass; deleting the owner exit-wait block makes both fail. Full local suite: 72 pass and 2 previously reproduced main geometry failures; 26.67 s wall; hosted Chromium 9.407 s, WebKit 9.284 s summed test execution
Retained overlay/focus proof Frozen menu contracts pass Chromium/WebKit; 87 tooltip/modal/markdown cases pass, including synchronous focus; Workboard focus passes both engines
Original approved lane 855 browser, 486 Node, 180 E2E cases and 40 visual pairs
Hosted overlay proof Testbox 38133991953: 887 browser and 501 Node cases, types and build pass on its recorded earlier head
Retained visual parity 16/16 inspected pairs are pixel-identical; synthetic screenshots below

Exact-head ci:full run 38314790101 is green: 98 completed jobs, 81 successful and 17 intentionally skipped. openclaw/ci-gate, all three UI shards, all nine mock-Gateway E2E shards, both real-Gateway shards, browser-extension coverage, build/types/lint, and security-fast pass. The actual collaborator-scroll flow passes in 38.728 s. No inherited CI exception is used.

Prior head b81710ee3d288 full CI 38310245282 completed 99 jobs. All three UI shards, all nine mock-Gateway E2E shards, extension, Docker, build/types, and real-Gateway shard 2/2 passed. The earlier avatar and archived-control failures are absent. Real-Gateway shard 1/2 failed the collaborator follow-scroll case (84 px and 224 px versus the 8 px bound), plus its aggregate. The final receipt regression proves the ownership defect through public command retirement and late native delivery; it does not independently establish the precise earlier browser sequence. No inherited exception is claimed.

The local real-Gateway replay stopped before tests or runtime preparation: the managed-artifact fence could not verify separation from managed Gateway outputs. The supported isolated runner requires Linux, and local containers are prohibited for this lane. The fence was preserved; the green current-head ci:full supplies that real-entry-point proof.

Main’s intentional toast-test deletions are retained alongside the native nested-modal regression. The new scroll regression lives in the existing ownership suite to honor the unchanged 1,000-line limit; no existing cases were removed. Main’s lockfile and dependency updates are retained; branch-specific additions are the approved Zag pins.

Historical local macOS WebKit native Tab-to-button/outside-focus failures and fractional geometry differences remain recorded; the latter reproduce on main at exactly 896.34375 versus 896 px. Hosted Linux counterparts pass on this exact head. Both task-owned Testbox leases are stopped.

All images contain inspected synthetic before/after fixtures.

Before and after native session modal

Before and after compact tabs

Before and after mobile rich tooltip

Keep one implementation and registered host per migrated component, preserve caller content and imperative methods, and carry the existing application context into bridge roots. Add focused lifecycle, commit-order, event, context-handoff, and retention proof.
Merge main at 7b12513, including TSX test discovery from #168337. No conflict resolutions or integration-only source changes.
Materialize the typed host from declared properties and methods, preserve reactive children, and use plain DOM for renderer-independent tests. Keep the path-exact bridge-test exception limited to Lit imports and templates; its reason requires removal with the bridge at cutover. Negative coverage keeps unlisted paths and other metrics gated.
Merge coordinator-approved solid2/p2-interop at 81095b5. The merge has no conflicts and preserves the reviewed lane tree exactly.
Move menus, popovers, modal dialogs, tooltips, and tabs onto native surfaces
with one lifecycle and anchor owner. Preserve the existing dialog and tooltip
tags through the Solid bridge, including focus, cancellation, nested teardown,
and native-view occlusion contracts.

Keep Web Awesome registered for unported consumers. Pin the qualified Zag
menu packages to 2.0.0-next.3 without release-age exceptions or overrides.

Release-note context: Control UI overlay and tab renderer migration with
existing public tags and interaction behavior preserved.
Merge main while retaining the Solid overlay primitives and newer synchronous, inert-aware modal focus return. Preserve original openers across reversed closes, refresh visible tooltip placement, retire replaced native surfaces, and route nested-modal toasts through the active owner.
Keep deferred return targets until restoration or cancellation so removing a closing dialog can hand focus back after background inertness clears. Consolidate the native tabs directive into the existing Lit tab owner, removing the new Lit adapter module.
Restore the legacy action weight through the native tab stylesheet. Canonical parity matches all sixteen desktop/mobile light/dark overlay scenes exactly, without changing comparison budgets.
@clawsweeper

clawsweeper Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Oct 11, 2026
@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Dependency graph changes

This maintainer PR changes the dependency graph.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 8d0329c1e7e00163f571b49951db3d92ad9699a8
  • Maintainer: @steipete
  • Repository role: admin

These dependency graph changes were made:

  • pnpm-lock.yaml
  • ui/package.json

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 11, 2026
@clawsweeper

clawsweeper Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR moves shared Control UI overlays and tabs to native browser surfaces and Solid while preserving existing interactions.

Example: Open the New group dialog.

  • Before: A Web Awesome dialog displays the focused name field and Create group and Cancel buttons.
  • After: A native dialog displays the same field, buttons, and appearance through the Solid implementation.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Strong visual evidence and successful broad validation support the migration, but the confirmed recovery defect still blocks merge.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected browser captures show the migrated modal, panel tabs, and mobile rich tooltip retaining their appearance; exact-head full CI separately supports keyboard, lifecycle, and consumer coverage.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Existing keyboard navigation, focus, cancellation, and appearance must survive the Control UI's Solid migration.
Reason: The recorded owner direction supports replacing renderer-specific primitives with shared native owners while preserving caller contracts.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this maintainer-directed migration open; the previously reported placement-dialog recovery defect remains a merge blocker.

Priority: P2
Reviewed head: 8d0329c1e7e00163f571b49951db3d92ad9699a8

Before merge

  • Reset placement-dialog reentrancy when modal loading rejects (P2) - If the first modal-dialog import rejects before registration, this failure path rejects without calling the placement caller's finish callback. showSessionPlacementTargetDialog sets its module-level active flag before calling the helper and clears it only inside finish, so every subsequent move, dispatch, or restart attempt silently resolves null until reload. This previously reported finding remains unchanged at the reviewed head. Clear the caller-owned flag in finally while preserving rejection, and cover failed loading followed by another attempt.

Findings

  • [P2] Reset placement-dialog reentrancy when modal loading rejects — ui/src/components/promise-modal-host.ts:63-69

Tests

  • Missing end-to-end proof: Existing loading coverage does not exercise a rejected first modal import followed by a successful second placement-dialog attempt.
Agent review details

How this fits together

Control UI callers pass content and presentation state into shared overlay and tab owners, which manage browser surfaces, keyboard interaction, focus, and native-view occlusion.

flowchart TD
  A[Control UI callers] --> B[Registered component bridges]
  B --> C[Solid views]
  C --> D[Shared overlay lifecycle]
  C --> E[Shared tab controller]
  D --> F[Native browser surfaces]
  D --> G[Focus and native occlusion]
Loading

Technical review

Best possible solution:

Retain the shared native migration and release placement-dialog reentrancy on every promise settlement, including loading failure.

Do we have a high-confidence way to reproduce the issue?

Pinned-head source establishes the rejected-import-to-latched-active path; no target code or tests were executed during this read-only review.

Is this the best way to solve the issue?

The shared native owners follow the recorded migration direction; fixing cleanup in the placement caller preserves that ownership without expanding the modal-host API.

Full review comments:

  • [P2] Reset placement-dialog reentrancy when modal loading rejects — ui/src/components/promise-modal-host.ts:63-69
    If the first modal-dialog import rejects before registration, this failure path rejects without calling the placement caller's finish callback. showSessionPlacementTargetDialog sets its module-level active flag before calling the helper and clears it only inside finish, so every subsequent move, dispatch, or restart attempt silently resolves null until reload. This previously reported finding remains unchanged at the reviewed head. Clear the caller-owned flag in finally while preserving rejection, and cover failed loading followed by another attempt.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 006e965aa47d.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test ui/src/components/session-placement-move-dialog.test.ts ui/src/components/promise-modal-host-loading.test.ts --maxWorkers=1
  • pnpm tsgo:ui
  • node scripts/check-changed.mjs -- ui/src/components/session-placement-move-dialog.tsx ui/src/components/session-placement-move-dialog.test.ts ui/src/components/promise-modal-host-loading.test.ts

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 292b304 adds ui/src/components/promise-modal-host.ts:13 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 292b304fd3de; files: ui/src/components/promise-modal-host.ts)
  • Vyctor H. Brzezowski: Raw commit 434fd0c adds ui/src/components/portaled-hovercard.ts:14 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 434fd0c10690; files: ui/src/components/portaled-hovercard.ts)
  • Vincent Koc: Raw commit dd04310 adds ui/src/components/portaled-hovercard.ts:24 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: dd043102149c; files: ui/src/components/portaled-hovercard.ts)

PR surface

PR surface statistics unavailable: the file list is incomplete.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a normal-priority UI migration with a confirmed, limited recovery defect affecting session placement actions.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦞 diamond lobster and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (37 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-12T19:01:45.186Z sha 728b0a5 :: needs changes before merge. :: [P2] Release caller-owned resources when lazy modal loading rejects | [P2] Keep keyboard-highlighted menu items visible in WebKit
  • reviewed 2026-10-12T19:26:27.554Z sha 0cd7711 :: needs changes before merge. :: [P2] Release caller-owned resources when lazy modal loading rejects
  • reviewed 2026-10-12T19:48:20.618Z sha 8760835 :: needs changes before merge. :: [P2] Reset placement-dialog reentrancy when lazy loading rejects
  • reviewed 2026-10-12T20:05:20.930Z sha 8760835 :: needs changes before merge. :: [P2] Reset placement-dialog reentrancy when lazy loading rejects
  • reviewed 2026-10-12T20:18:27.331Z sha 8760835 :: needs changes before merge. :: [P2] Reset placement-dialog reentrancy when lazy loading rejects
  • reviewed 2026-10-12T21:10:00.602Z sha ab58c08 :: needs changes before merge. :: [P2] Reset placement-dialog reentrancy when lazy loading rejects
  • reviewed 2026-10-12T21:31:37.941Z sha b81710e :: needs changes before merge. :: [P2] Reset placement-dialog reentrancy when lazy loading rejects
  • reviewed 2026-10-12T22:26:25.605Z sha 8d0329c :: needs changes before merge. :: [P2] Reset placement-dialog reentrancy when modal loading rejects

Reviewed October 12, 2026, 6:46 PM ET / 22:46 UTC (Revision 38).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui ci:full Keep ordinary native-locale CI selection on the next PR run. dependencies-changed PR changes dependency-related files P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant