Where should an agent's HTML page show?
-Same case for both: the "Left-side task context" agent asks ian to pick between mockups 3a and 3b, which live in mockups/left-layer.html (a 25 KB page whose sections are drawn by JavaScript and follow light/dark mode). Then it adds two more wireframes to the file and asks again.
1. Browser, as today
-The agent calls client_open. The browser comes forward on murky over byre's window. Each call copies the file into a new folder, so the second round opens a second tab; the first tab still shows the old page.
Attached Sheet Mockups
--
-
- Gets: nothing new to build or maintain; every page works exactly as written (JS, fonts, dark mode); full browser width and tools; the "no web view" rule stays. -
- Gives up: the page and the question are in two windows; ian switches back and forth to compare 3a/3b against the options; stale tabs pile up after each revision; it takes the screen on murky every time. -
2. Built-in page view in the left sheet
-The question carries the page as an attachment (or ian clicks left-layer.html in Files, or a preview link). The page opens in the attached sheet over the lead pane, the way 3b opens Changes or Files, with the question still on the right. When the agent edits the file, the sheet reloads in place. Needs a WKWebView.
Attached Sheet Mockups
--
-
- Gets: page and question side by side in one window; the page refreshes in place after each revision; nothing takes the screen; works the same on every Mac without copying files. -
- Gives up: reverses "no web view, under any circumstances" in
docs/macos.md; a WebKit view inside the app that runs agent-written JavaScript; half the window wide, so a 1240px-wide mockup page is cramped (a ↗ Browser button stays for that); a one-file page like left-layer.html loads through the existing worktree file endpoint, but a page with its own CSS or image files next to it needs those served too; one more view kind to keep working.
-