When a seat changes how a desktop app looks, it should show you the screen, not tell you it looks right. The app_screenshot tool lets a seat on the Mac photograph the Electron app in the workspace, the one it is working on, and put the pictures on its reply with show_image.
What it does
It starts a hidden, throwaway copy of the app: the workspace's own Electron, with a new, empty profile in the temp folder. It waits for the first window to load, saves a PNG under artifacts/, and closes the copy. The seat can:
- pick light or dark, and the window's size;
- run a short script in the window first, to open a pane or click a tab, and wait for something to appear;
- load one HTML page of the app on its own, with a stand-in for the app's bridge, when starting the whole app is not practical;
- photograph a git ref instead of the working tree, such as HEAD or the branch it started from. That ref is checked out into a temporary worktree, using the dependencies already installed, and removed afterwards. That is how a seat gets the before picture.
What keeps it safe
- Your apps and data. The copy's profile, settings and storage live in a new temp folder that is deleted afterwards, and the copy cannot move them anywhere else. It never opens anything in /Applications or an installed app's profile.
- Asking. It runs code from the workspace, so you are asked the first time in each workspace. In Auto and Smart your yes is remembered for that workspace; Manual and Accept edits ask every time; Bypass does not ask.
- The sandbox. When the sandbox is on, the copy runs inside it like any command, allowed only what drawing a window needs.
- The network. Nothing beyond this Mac, unless the sandbox's network guard is on and its rules allow a host.
- Limits. The copy is stopped after 45 seconds by default (at most two minutes), or when it uses more than 1.5 GB of memory, and always once the picture is taken.
Where to find it. Mac only: Settings → This Mac → General → Workspace & Tools → Let seats screenshot the workspace's desktop app. On by default. Off, the tool is not offered.