fix(preview): prefer visible browser for new agent leases - #767
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
Deployment failed for project pylon-marketing with the following error: Learn More: https://vercel.com/pylon-code?upgradeToPro=build-rate-limit |
|
Adversarial review found that an existing live provider lease could route an explicit tab ID owned by another host back to its pinned host. This head rejects that mismatch without moving or dropping the lease; a regression verifies the rejection and subsequent pinned operation. Synced onto current pylon after #852; 43 focused broker/web-host tests and server, web, contracts typechecks pass. New exact-head CI is running. |
When several Pylon windows can automate a preview, a new agent session can attach to a window that does not own the visible browser tab, losing its current cookies and DOM. Hosts now report local live tabs and visibility; a fresh unbound lease prefers the visible owner of the target thread/tab. Existing live leases stay pinned, and explicit tab IDs with a known owner fail closed if that owner cannot perform the requested operation. Hosts without ownership reports retain legacy selection. This adapts upstream 894d33419dceb366eecda8e5e27c6fc043c3959e (#13064) while preserving Pylon's capability-rich host preference for multi-operation sessions.
The web host reports only tabs with local web contents, clears ownership when contents close, and retries failed focus reports on the next focus/visibility change. A server snapshot alone no longer claims an automation runtime is available.
Validation: 43 focused broker/web-host tests, scoped lint (one pre-existing React refs warning in an unchanged line), and server, web, and contracts typechecks passed. Independent review passed on the frozen diff. No live browser interaction was performed.
Refs #736.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.