Skip to content

Play previews and iOS simulators with the pointer and keys, and restyle both panes - #7

Merged
bugthesystem merged 18 commits into
masterfrom
claude/project-thread-pvbd06
Oct 6, 2026
Merged

bugthesystem merged 18 commits into
masterfrom
claude/project-thread-pvbd06

Conversation

@bugthesystem

@bugthesystem bugthesystem commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Requested by Frogrammer

Description

Before: the preview pane could only be watched, and the hand button was disabled ("coming next"). Extra previews took up space beside the picture. The start pages and stage used a fixed dark palette. An iOS simulator could only be shown through its own window.

After:

  • Playing: press the hand to play the preview.
    • Clicks, left-drags and scrolls go to the app, page or simulator. Keys go to it while the pane has focus.
    • The badge reads Watching, Playing, or the agent's current step.
  • Layout: the controls sit in a row under the picture, so they never cover it. Extra previews pile up at the row's right end and fan out on hover.
  • Design: the preview start page, the browser's new tab page and the stage use Warp's theme tokens, so they follow any theme.
  • iOS simulators: booted and streamed headlessly with Baguette.
    • No Simulator window, no Screen Recording, no Accessibility, and they work from any desktop.
    • The start page lists simulators. Agents open one with preview_open device=<name>.
  • Agent input: agents get preview_click, preview_drag, preview_scroll, preview_type and preview_key, behind the same approval card as the other preview tools.

How:

  • App windows get events posted to the owning process. macOS asks for Accessibility the first time, and the window is activated as Playing starts.
  • Pages get CDP input.
  • Simulators get baguette input gestures.
  • Shared start-page components live in app/src/ui_components/start_page.rs.

Fixes found while testing Warped:

  • Approved agent calls failed while the approving pane's handler ran.
  • Cross-site page previews failed to start their screencast.
  • Closing the active, last browser tab crashed.
  • An agent clicking or typing in a page crashed Warp: WebKit called back into it mid-update. Native page input now runs after the update.
  • Headless Chrome outlived a crashed Warp; it is now cleaned up on the next launch.
  • Agents failed when Warp was not frontmost.
  • Windows on another desktop silently ignored input; they now say to move them.
  • Every launch wrote to the app bundle, which triggered macOS's "modify apps" prompt.
  • Warped gets its own bundle ID, and release_warped checks for free disk space first.

Known limits: right and middle buttons can't drag, and keys can't be held. Pause/Stop and an agent cursor over previews are follow-ups.

Linked Issue

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Testing

56 warp_preview tests (input mapping, DevTools and Baguette wire formats, multipart frames, tool parsing) and the app preview tests pass on macOS, and clippy is clean.

Warped 0.1.4 was built with script/macos/release_warped and driven end to end through the MCP tools. In the recording below, an agent opens an iPhone 17 Pro headlessly, taps through Settings, opens this PR in the browser pane and clicks "Files changed".

  • I have manually tested my changes locally with ./script/run

Screenshots / Videos

An agent opens an iPhone, taps through Settings, then opens this PR in the browser pane and clicks Files changed

Full demo, 56 s (MP4): the iPhone and PR above, then an agent shopping on Trendyol, then the user denying an agent a new site.

An agent searches a shop while the activity bar offers Pause and Stop The agent asks before a new site, and the user denies it
Agent drives the browser pane beside a live iPhone Page preview in front, iPhone piled in the corner
Headless iPhone in the preview pane After an agent's preview_click

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-NONE

🤖 Generated with Claude Code

bugthesystem and others added 5 commits October 6, 2026 11:47
The stack's thumbnail column took a strip of the pane beside the front preview. The previews behind
it now pile up over the picture's bottom-right corner, three deep with a count for the rest, and fan
out into a row of cards on hover. The picture-in-picture window shows a smaller pile instead of none.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Clippy disallows std::process::Command in the app.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The preview pane's Playing switch now works: clicks, left-button drags, scrolling and, while the
pane has focus, keys over the picture go to the preview's source. Pages get them as DevTools input
at the page's viewport; other apps' windows get them through computer_use, posted to the app's
process so the window stays behind Warp and the user's pointer stays put. Windows need the
Accessibility permission, asked for when Playing is turned on. WarpUI reports no right or middle
drags and no key releases, so those buttons click and keys are pressed and released at once.

Agents get preview_click, preview_drag, preview_scroll, preview_type and preview_key. They take
pixels in the picture preview_look returns, are approved like looking, and reply with a picture of
the result.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…Warp's theme

Both panes' start pages share new start_page components: a heading, a framed URL field, and
sections whose rows sit together on a card, with an icon tile that takes the accent on hover and an
Open hint. The preview stage's floating controls, badges and pile take their colors from the theme
instead of a fixed dark palette: the switch lights in the accent, Watching is muted, Playing is the
accent and agents' steps use the warning color.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A release-lto build from scratch needs about 25 GB, and running out fails half an hour in. Stop
up front with a clear message instead; WARPED_REQUIRED_GB overrides the estimate.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Warped shared dev.warp.WarpOss with Warp OSS dev builds, so macOS tied Screen Recording and
Accessibility grants to whichever copy it saw first and relaunched the wrong one after a grant.
dev.bugthesystem.Warped also gives it its own preferences and state directory.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
bugthesystem and others added 9 commits October 6, 2026 13:36
Browser and preview tools looked only at the active window, so an agent running outside Warp, or
while the user was in another app, got "No Warp window is open". They now fall back to the window
the user used last.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Input reaches a window only on the current desktop, while capture works anywhere, so a preview of
a window on another Space looked playable but ignored every click. Playing and the agent input
tools now say to move the window to this desktop instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A Simulator source boots the device with Baguette and streams its screen as MJPEG, so it needs
no Simulator window, no Screen Recording and no Accessibility, and plays from any desktop. Pointer
input becomes touches (drags as touch moves, other buttons as taps, scrolling as swipes) and keys
go to the device's keyboard. The start page lists iOS simulators, and agents open one with
preview_open device=<name or UDID>; simulators are approved as the Simulator app.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The badge, the control capsule and the pile floated over the picture and covered what was under
them, such as a phone's home indicator. They now sit in a row under the picture, aligned on one
line: the badge on the left, the capsule in the middle and a smaller pile on the right, which
still fans out upward over the picture while hovered.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Background input reaches a window only after it is activated, which spends the first event it
gets, so the user's first click on a freshly played window did nothing. Turning Playing on now
sends a pointer move to the window's center first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every launch reset the Finder icon by writing to the app bundle, even when no custom icon was
ever set. macOS asks whether an app may modify apps when it does that, so a build it hadn't seen
before (any ad-hoc Warped) stopped at that prompt on startup.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Approving an agent's request ran the waiting call from inside the pane's own action handler, while
that pane can't be reached, so the first approved preview_open always failed with "The preview pane
closed". Approvals in both the preview and browser agents now apply on the next turn.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A cross-site navigation moves the page to another process, and starting the screencast right
after it failed with "Not attached to an active page". The screencast now starts on the blank
page and survives the move, and a rate change retries once if the page is briefly detached.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Closing a tab removed it before the active index moved, and handing focus back from the page then
read the active tab one past the end. Focus now returns before the tab is removed, and reading the
focused page tolerates a stale index.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@bugthesystem bugthesystem changed the title Play previews with the pointer and keys, pile extra previews, restyle the start pages Play previews and iOS simulators with the pointer and keys, and restyle both panes Oct 6, 2026
bugthesystem and others added 3 commits October 6, 2026 14:55
Native clicks and key presses into a page made WebKit change the first responder, which calls
back into Warp's window. Sent while Warp was handling the agent's request, that re-entry found
the app already borrowed and crashed. They now run on the main queue once the turn ends.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Headless Chromium outlives a crashed Warp, so its processes kept running and its profile stayed
in the temp directory. On startup Warp now ends the Chromium of preview profiles whose Warp is no
longer running and removes those profiles.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Current Homebrew refuses casks from a tap that hasn't been added.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@bugthesystem
bugthesystem marked this pull request as ready for review October 6, 2026 13:24
@bugthesystem
bugthesystem merged commit f0515b7 into master Oct 6, 2026
24 checks passed
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