Repository navigation
Description
PR #281 made preview automation usable for background QA, but a recent desktop QA run still showed a timeout leaving later browser calls temporarily without an automation host. While gathering evidence for #284, screenshot and evaluate succeeded; preview_resize to 390×844 timed out after 15 seconds; the next evaluate/snapshot returned PreviewAutomationNoAvailableHostError. The host later reconnected and QA continued. This confirms a recovery gap, but not whether the resize, its response, or host registration caused it.
The follow-up has two related outcomes: a timed-out operation should not strand the next browser action, and a user should be able to keep a signed-in GitHub identity in an in-app browser profile that threads can use for routine QA and evidence work without switching to Safari or foreground computer use.
Existing behavior
- The broker expires an unanswered request and disconnects that host. It intentionally does not replay the operation because the browser may already have applied it. (broker timeout handling)
- The desktop host is mounted per connected environment, not per selected thread; the RPC client re-registers after the registration stream completes. (host scope, registration retry)
- Desktop browser profiles already persist cookies locally and isolate them by environment and profile. Agent-opened tabs use the configured default profile. (profile model, partition scope)
Desired behavior
- After a timeout or lost host, report the operation timeout separately from host unavailability. Make clear when the operation may have completed.
- Recover automatically so a later fresh request can use the host within a bounded interval, without switching threads or restarting the app. Never replay an operation that may already have run.
- Reassociate the requested tab when safe, or give a clear recovery step if its state cannot be established.
- Let the user sign into GitHub in a named in-app profile once, then let threads intentionally use that same profile for browsing, screenshots, and supported evidence uploads. Keep profiles isolated and make sign-out/data clearing clear to the user.
- If GitHub needs a new sign-in or an auth step the in-app browser cannot complete, surface an actionable in-app handoff. Do not silently switch to Safari/computer use, or expose cookies or tokens through agent arguments, logs, or evidence.
Questions to settle
- Should threads use the configured default profile, or can a user select which threads may use a named signed-in profile?
- Profiles are currently client-local and partitioned by environment/profile. Which sharing boundaries should apply across environments, remote connections, app restarts/updates, and parallel threads?
- Which GitHub sign-in steps (including MFA, passkeys, or bot checks) are supported in the embedded browser? What should the user see when a step needs their attention?
- Can the existing browser automation path complete the evidence-upload flows that currently trigger a switch to Safari, or is another narrow capability needed?
Related: #281 (background preview QA); #284 (the QA/evidence workflow where this surfaced).
Activity
fix(preview): let agents run background QA without interruptions (#281)
fix(browser): keep background QA usable and restore saved handoffs (#325