Skip to content

refactor(ui): use native session catalog menus - #170907

Merged
steipete merged 7 commits into
mainfrom
solid2/w-wa-exit-3-catalog
Oct 13, 2026
Merged

steipete merged 7 commits into
mainfrom
solid2/w-wa-exit-3-catalog

Conversation

@steipete

@steipete steipete commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The session catalog context menu still uses Web Awesome for its actions.

User Impact

Catalog actions use the owned native menu while retaining labels, disabled reasons, anchor position, action ordering, dismissal, and return focus.

Why This Change Was Made

Replace the catalog dropdown and items with the existing Solid Menu. Item descriptors are memoized by the catalog component so queued selections reuse JSX created under its owner. The action runs before close clears the caller’s catalog snapshot, including when an action synchronously removes the host. The bridge tag, CSS classes, and lazy registration boundary remain unchanged.

Production LOC: renderer 127 → 131; shared stylesheet 247 → 262; total 374 → 393 (+19, for native panel styling and explicit lifecycle ownership). Test/fixture LOC: 2,020 → 2,079. The real PR diff is nine files, 179 additions/101 deletions.

The shared sidebar fixture dismisses upgraded native menus before asynchronous teardown and preserves intentionally unregistered lazy sidebar tags. Main’s landed picker migration (#170387) supplies the recursive-frame scheduler correction: ordinary frames settle in microtasks while recursive frames yield through a MessageChannel. Both changes are retained after merging origin/main at ecdc40dbcf9b.

Evidence

Proof Result
Codemod dry run Expected lifecycle diagnostic resolved by native menu ownership; no remaining TODO markers
Pre-integration catalog menu unit file 5/5 pass, 21.76 s Vitest / 59.51 s shell; action ordering, disabled reason, removal, focus return
Integrated catalog deletion case Inconclusive locally: the original run was interrupted after 60 s without output; a bounded mount-stage diagnostic reached 120 s without a setup/test-entry marker. All probes were removed. No timer-deadlock or successful repair is claimed; exact-head full CI must resolve this gap.
Integrated pnpm tsgo:ui Pass at integrated head 1aa0280d9a6d, before the final two-line test-wait correction
Independent scoped review Full integrated review found one test-wait issue, now corrected; the focused correction review is scoped-clean through P2. No production finding remains.
Targeted lint/style/format Original cutover passes; integrated diff check passes. The later targeted lint wrapper timed out generating unrelated plugin SDK declarations before lint; exact-head CI supplies the final gate.
Visual proof Inspected synthetic 1100×720 dark-mode before/after below; catalog renderer and stylesheet are unchanged by main integration
Startup performance Exact-head CI 38451276658, job 115483267129, passed: 348,764 B gzip startup JS in eight requests; startup CSS 49,644 B in one request. Paired same-machine base/head build at base cae016bcc1240 reports CSS 49,590 → 49,644 B (+54 B). The checker prints head JS against the original 374,285 B budget but does not emit the paired base startup-JS number. Historical pre-integration head: 348,821 B JS / 49,298 B CSS. No lazy boundary changed.
Exact-head UI unit proof All three UI unit shards passed on 6c04b2b176814f in run 38451276658; the previous UI 2/3 cancellations are superseded by successful execution.
Broad proof Prior head passed all nine mocked E2E shards, both real-Gateway shards, UI shard 1, types, and performance. UI shards 2/3 were cancelled after stalls; neither is passing proof. Fresh ci:full covers the integrated head: all UI unit shards and mocked E2E1–8 pass; real-Gateway1/2,2/2 and mockedE2E9/9 stop at the inherited build error detailed below.

No local full suite, local E2E battery, Testbox, or other lease was used. Existing bounded synthetic captures are reused because the catalog rendering/style source is unchanged by integration.

Before: synthetic catalog menu

After: owned native catalog menu

The integrated source review also found one removal regression still awaiting the bridge render promise rather than native queued selection; it now waits for the observed action-and-close order. Earlier CI exposed a missing bridge fixture type, a leftover terminal-row selector in two adopted-session E2E cases, and an open native menu left during asynchronous sidebar cleanup. Those were corrected. Before integration, the remaining in-test stall was isolated to AppSidebar catalog deletion > confirms catalog deletion and refreshes rows (open: true): recursive animation frames ran as microtasks and starved vi.advanceTimersByTimeAsync(0) before cleanup could run. This PR integrates the landed scheduler owner fix without caller-specific flushing or changed assertions. The integrated local attempt did not reach the diagnostic setup marker, so it cannot establish whether that prior stall remains. UI shard 2’s prior cancellation remains unattributed; the complete fresh run must establish its result.

A prior sidebar-roster E2E failure (expecting two activity reads after 5,001 virtual milliseconds and receiving one) was reproduced on baseline 89a3addb0de4 with byte-identical test/owner inputs; this is historical evidence, not a waiver for a different test or an integrated-head failure. Current CI failures will be attributed by exact test name against scheduled main.

Current full run 38451276658 on 6c04b2b176814f has three proven inherited pre-test build failures: both real-Gateway shards and mocked E2E 9/9. All stop in tsdown with [INEFFECTIVE_DYNAMIC_IMPORT]: src/infra/sqlite-file-generation-worker.ts is dynamically imported by src/state/openclaw-state-db-cache.ts and statically imported by src/infra/sqlite-terminal-open-latch.ts / src/state/openclaw-quarantine-store.ts. The latest scheduled main run 38448821812 at abc6c4bb7cda57ef5f49bcc9ddc1aff920f6104b fails those same three jobs with the identical build diagnostic. No test ran in these jobs. The run is complete: every other selected job passed, including all three UI unit shards and mocked E2E shards 1–8; openclaw/ci-gate failed downstream. The three failed jobs did not run their tests. Landing uses the documented inherited-failure exception; this CI run is not described as green.

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 13, 2026
@clawsweeper

clawsweeper Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T19:05:32.209644Z 6c04b2b New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@steipete
steipete merged commit 1e6a5af into main Oct 13, 2026
112 of 117 checks passed
@steipete
steipete deleted the solid2/w-wa-exit-3-catalog branch October 13, 2026 19:26
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 14, 2026
* refactor(ui): use native session catalog menus

* test(ui): type the catalog bridge removal fixture

* test(ui): settle native catalog menu fixtures

* test(ui): dismiss sidebar menus before async cleanup

* test(ui): preserve lazy sidebar tags during cleanup

* test(ui): await queued catalog menu selection
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. size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant