Skip to content

Agentic UI: Let menus follow the theme scope they open from - #4766

Open
shaunandrews wants to merge 2 commits into
trunkfrom
fix-menu-theme-scope
Open

Agentic UI: Let menus follow the theme scope they open from#4766
shaunandrews wants to merge 2 commits into
trunkfrom
fix-menu-theme-scope

Conversation

@shaunandrews

@shaunandrews shaunandrews commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Related issues

How AI was used in this PR

Claude traced the regression through git history and wrote the fix. Reviewed by the author.

Proposed Changes

  • Since build(deps): bump the wordpress group with 30 updates #4320, every menu in the agentic UI renders on a fixed dark surface, including menus opened from the light content area (composer, Open in, session actions, usage panel). Only the sidebar's menus are meant to be dark, because the sidebar chrome itself is fixed dark.
  • Menus portal into document.body, outside the ThemeProvider their trigger lives in. Before build(deps): bump the wordpress group with 30 updates #4320 a nested ThemeProvider inside the portal (kept for the old compact density) also re-emitted the trigger's color scope. The upgrade dropped that wrapper and compensated by hardcoding a dark surface in the menu CSS.
  • This restores the nested ThemeProvider (now the public export) and removes the hardcoded colors, so a menu matches wherever it opens: dark in the sidebar, the app's light/dark scheme elsewhere. The drop shadow stays literal: theme 1.x ships no elevation tokens, and its build plugin rejects unknown --wpds-* names.

Screenshots

Light color scheme, studio ui in the browser.

Composer model menu (content area) — should follow the app's light/dark scheme.

Before (trunk) After
Before: dark menu over the light composer After: light menu matching the light composer

Site context menu (sidebar) — stays dark, inherited from the sidebar's fixed-dark chrome.

Before (trunk) After
Before: dark sidebar menu After: still dark, now from the sidebar's theme scope

Testing Instructions

  • npm run cli:build:ui && node apps/cli/dist/cli/main.mjs ui --no-open, open http://localhost:8081.
  • In light mode, open the composer's model/mode menu, the "Open in" menu, and a session's actions menu: they should be light.
  • Right-click a site in the sidebar and open the beta menu in the footer: both should still be dark.
  • Switch to dark mode and repeat; content-area menus should now be dark too.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

…f forcing dark

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@shaunandrews
shaunandrews requested review from a team and wojtekn September 3, 2026 17:33
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 6974ba3 vs trunk

app-size

Metric trunk 6974ba3 Diff Change
App Size (Mac) 1435.61 MB 1435.25 MB 0.36 MB ⚪ 0.0%

site-editor

Metric trunk 6974ba3 Diff Change
load 1166 ms 1206 ms +40 ms ⚪ 0.0%

site-startup

Metric trunk 6974ba3 Diff Change
siteCreation 7502 ms 7521 ms +19 ms ⚪ 0.0%
siteStartup 3372 ms 3373 ms +1 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants