App: open a chat, the terminal or a diff in a new window

"Open in new window" sits beside Float: the chat pane and chat list row
menus, a floating chat window's title bar, the terminal options menu and
the diff bar, plus Alt+Shift+Y for the chat with the keyboard (listed in
the shortcut help). Once the window opens the item leaves the main window
as Float takes a pane out of the tiling.

The window is its own app instance at /window/chat/<id>,
/window/terminal?tab=<key> or /window/diff/<token>: only that item, named
after it, with "Bring back to main window". It has its own connection and
writes no shared layout (no open-chat workspace, window store or terminal
layout) and posts no notifications, so they stay the main window's.

Web opens a popup window (a blocked popup offers a tab); Linux and macOS
start a second process with --detached (Flutter's multi-window API is still
experimental); Android and iOS hide the action. The capture kit gains a
follow step for windows a page opens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 12:47:42 +00:00
parent c4de1de27b
commit 61c7eee2b0
46 changed files with 3223 additions and 72 deletions
+10 -1
View File
@@ -28,7 +28,7 @@ options: --script <steps.json> --size WxH (880x1000)
steps: open=<route>[@WxH] wait=<ms> shot=<name> click=<target> waitfor=<target>
type=<text> press=<Enter|Escape|Tab|...> scroll=<dy> size=WxH
files=<path>[,<path>] (answers the next file chooser)
film=<target> labels=<name> tabs=<name> eval=<js> expect=<js> hover=<target>
film=<target> labels=<name> tabs=<name> follow=<url part|main> eval=<js> expect=<js> hover=<target>
keys=<json events> grant=clipboard
clipboard=read|write:<text> (the browser's clipboard, from a scratch
page on the loopback origin, so it works for an --insecure page)
@@ -246,6 +246,15 @@ try {
break;
}
case 'tabs': await save(file(value || 'tabs', 'json'), JSON.stringify(await browser.targets(), null, 2)); break;
case 'follow': {
// follow=<url part>: the steps after it act on that window (one the
// page opened); follow=main returns to the page the kit opened.
const url = await browser.follow(String(value), step.timeout);
log(` now on ${url}`);
if (value !== 'main') await page.adopt();
await delay(step.wait ?? settle);
break;
}
case 'labels': await save(file(value || 'labels', 'json'), JSON.stringify(await page.labels(), null, 2)); break;
case 'film': {
const what = String(value).startsWith('press:') ? String(value) : describe(parseTarget(value));