Skip to content

devtools: preview doesn't render the host surface background behind the iframe #841

Description

@harijoe

The devtools preview doesn't reproduce the background a real host (ChatGPT, Claude…) paints behind the view's iframe, so the rendered result doesn't match what ships. Two symptoms:

Fullscreen — the background shows as white regardless of the view's own background. E.g. a view with a lavender (light) background renders white in fullscreen.

Inline / PiP — the background is always effectively transparent. Switching the simulated theme to Dark updates the view's CSS, but the area behind stays transparent, so white text/buttons sit on the devtools' grey panel and become unreadable.

Impact: hard to iterate on UI and judge how a view will look inside the final host.

Likely area: the preview container in packages/devtools/src/components/layout/tool-panel/view/index.tsx — fullscreen forces bg-background (devtools chrome) behind the iframe, while inline/PiP applies no surface color at all. The container should paint the simulated host surface for the current theme behind the iframe in all display modes.

Metadata

Metadata

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions