Agentic UI: Add preview appearance modes - #4588
Conversation
📊 Performance Test ResultsComparing eaba699 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
|
I am not sure if I was testing correcly but I do not see the color changes for the themes that my sites were using in the preview mode: Screen.Recording.2026-08-20.at.2.33.14.PM.movDo you know what might be the reason? or perhaps I am not testing correctly? |
You won't notice a different in wp-admin, as it doesn't natively support dark mode. And your theme has to support dark mode as well, and not just as a toggle, but it needs to listen to the browser/system setting often with a media query. Not many themes do so out of the box. |
Related issues
How AI was used in this PR
AI helped trace the preview webview emulation path, implement the UI and Electron IPC changes, and add focused test coverage. I manually reviewed the changes and verified the behavior in the running app.
Proposed Changes
Screenshots
Testing Instructions
prefers-color-schemeswitches to its dark presentation without changing Studio’s appearance.Automated verification:
npx eslint --fix apps/studio/src/ipc-handlers.ts apps/studio/src/preload.ts apps/ui/src/components/site-preview/index.tsx apps/ui/src/components/site-preview/index.test.tsxnpm run typechecknpm test -- apps/ui/src/components/site-preview/index.test.tsx(37 tests passed)Pre-merge Checklist