Part of the Infinite Canvas epic: #61
Phase 7 (deferred) — Native webview panels: Browser + App preview
Add in-canvas browser and running-app preview panels. Deferred because of a hard macOS platform constraint.
⚠️ Hard constraint
Native webviews (WKWebView) paint above the host DOM on macOS. So browser/app-preview panels:
- cannot be occluded by other (DOM) panels,
- cannot honor the global translucency slider,
- ignore canvas z-order and tldraw chrome.
This phase positions native webviews over their canvas rect and documents/handles these limitations rather than hiding them. (Reference the existing browser-pane approach + occlusion notes in the repo, e.g. TOOL_PILL_BAND_PX / content-host handling.)
Scope
- Browser panel — native webview keyed per panel (per-pane registry, label like
canvas-browser-{panel_id}), URL bar, basic nav/history. A connected conversation can navigate / screenshot it.
- App-preview panel — native webview pointed at the running dev app; connectable to a conversation.
- Move/resize repositions the native webview rect; entering/leaving canvas mode and switching workspaces correctly shows/hides/tears down webviews.
- Document the occlusion/translucency limitations in-app (subtle hint) and in the epic.
Optional follow-up
Spike screenshot-streaming / off-screen rendering so these panels become fully composable DOM panels (heavier/slower) — separate issue if pursued.
Acceptance
- Browser + app-preview panels render, navigate, move/resize, and tear down cleanly across mode/workspace switches.
- A connected conversation can drive/screenshot them.
- Limitations documented; lint/typecheck/test pass.
Part of the Infinite Canvas epic: #61
Phase 7 (deferred) — Native webview panels: Browser + App preview
Add in-canvas browser and running-app preview panels. Deferred because of a hard macOS platform constraint.
Native webviews (WKWebView) paint above the host DOM on macOS. So browser/app-preview panels:
This phase positions native webviews over their canvas rect and documents/handles these limitations rather than hiding them. (Reference the existing browser-pane approach + occlusion notes in the repo, e.g.
TOOL_PILL_BAND_PX/ content-host handling.)Scope
canvas-browser-{panel_id}), URL bar, basic nav/history. A connected conversation can navigate / screenshot it.Optional follow-up
Spike screenshot-streaming / off-screen rendering so these panels become fully composable DOM panels (heavier/slower) — separate issue if pursued.
Acceptance