Skip to content

feat(app): show a native app window live in a split, with relink after it closes - #699

Merged
iamnbutler merged 2 commits into
mainfrom
live-view
Oct 27, 2026
Merged

iamnbutler merged 2 commits into
mainfrom
live-view

Conversation

@iamnbutler

Copy link
Copy Markdown
Contributor

Agents can open a live view of a native app window next to the chat with a new tab_live tool (target: the window's ID from desktop_windows). Ace captures it with ScreenCaptureKit and draws the frames natively over the pane at up to 60 fps. Clicks fall through to the page, and the window keeps updating while Ace covers it.

  • tab_live → host tab-live → the window's layout opens a live tab, split to the right of the chat. Running it again with the same name points that tab at a new window.
  • After the app quits or its window closes, the pane shows Relink, which finds that app's current window. Relaunches are never followed automatically.
  • The live view moves back on top after a resize, because Electrobun re-stacks the webview above it.
  • Status is also checked on a timer, because animation frames pause while Ace is covered.

Not included: forwarding clicks and keys to the app. That should go through Desktop Tools' Swift host once Ace uses it.

Checked by hand in a source build (Ace-dev) with the Beats demo app:

  • opening a live tab;
  • resizing and maximizing the window;
  • quitting and reopening Beats, then Relink;
  • Relink after restarting Ace.

Built in Ace

No. Built with Claude Code in a terminal, using the Desktop Tools MCP to drive Ace-dev and Beats, under time pressure for the Universe demo. Most of the work was rebuilding and relaunching Ace's own desktop shell, which an agent can't do from inside the Ace window it's replacing. Dogfooding gaps are tracked in #5.

…r it closes

Agents open it with tab_live. ScreenCaptureKit frames draw natively over the pane at up to 60 fps; a closed window shows a Relink button that finds its app's current window.

Why: apps/desktop/native/live.m#function ace_live_show | the live view must stay the content view's top subview; Electrobun re-stacks the webview above it on resize
Why: apps/desktop/native/live.m | a closed window's SCStream stops without calling didStopWithError, so existence is polled
Why: apps/app/src/panels/live.tsx#function Live | status is polled on a timer too; animation frames pause while Ace is covered
@iamnbutler
iamnbutler merged commit f2046e1 into main Oct 27, 2026
1 check passed
@iamnbutler
iamnbutler deleted the live-view branch October 27, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant