feat(desktop): browser pages as resource tabs, agent works in a background tab - #7745
Merged
Merged
Conversation
…kground Each live desktop browser page is now its own resource tab in the Chat panel, derived from the desktop app's tab list instead of a persisted singleton "Browser" resource with a second tab strip inside it. The inner browser tab strip, tab pinning, duplicate, reorder, the native tab context menu, and the auto-replacement of a closed last tab are removed. The agent drives its own tab (the desktop's automation cursor) without moving the user's visible page: the renderer no longer force-activates the browser on every tool call nor auto-switches the panel to the agent's tab. The agent's tab is announced as resource activity, so the existing view policy shows it or badges it depending on whether the user has taken over selection. Mentions and attachments point at exact tabs; the chat row never stores browser resources, and legacy rows are dropped on read.
…th cap Review and in-app verification of the resource-tab browser model found five problems, all fixed here with tests: - The strip's switch and follow effects could trade `switch-tab` calls forever after a native switch; the switch effect is now keyed on the selection alone and ignores the switch it requested itself. - Migrating a pending chat onto its durable id briefly removed and re-added every browser tab; a missing store bucket is no longer read as closed. - Chat hydration could replace the resource list underneath a fresh add, dropping restored tabs on return; a tab stays projected until its resource is seen. Hydration also falls back to the last server-held resource instead of whichever tab happened to land first. - Strip-driven `switch-tab` no longer claims the page for the user (`claim: false`), so the agent can still close or adopt it; a user closing the agent's tab leaves the agent cursor unset rather than announcing the neighbour as agent activity. - The driver marked every restored scope as material, refusing pending chat migration after an empty restore; only a restore that yields pages does now, matching the session layer. The bridge snapshot is regenerated with the documented `'new-tab'` fallback. Resource tab titles ellipsize at 200px for one or two tabs, 180px for three, and 160px from four on, one small step at a time.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
…itles Reordering a browser tab in the resource strip now reorders the desktop's native tab list too, so restore and the agent's tab list keep the strip's order (`reorderTab` returns as an optional bridge method). Dragging a tab into the chat carries the strip's live title rather than the title captured when the tab was added. The fork route test follows the new policy that stored browser rows are dropped.
Collaborator
Author
Collaborator
Author
|
@cubic-dev-ai review this PR |
Contributor
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
…f an inline style
Collaborator
Author
Collaborator
Author
|
@cubic-dev-ai review this PR |
Contributor
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
This was referenced Sep 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
switch-tabno longer claims the page for the user, and a user closing the agent's tab leaves the agent cursor unset.browser_open_tab/switch_tab/close_tab/list_tabsstill map to native tabs, which are now the resource tabs.claimonswitch-tab;new-tabkept only as the fallback for shells withoutopenTab).MIN_DESKTOP_VERSIONunchanged.Type of Change
Testing
use-browser-tab-resourcestests (projection, in-flight close, pending-to-durable migration, selection/follow without ping-pong, agent announce, chat links), plus updated desktop session/driver/ipc/store tests.apps/simhome + browser suites and the fullapps/desktopsuite pass.+ Browser, navigating, titles and favicons, switching, closing, the width cap at 1/3/4 tabs, tabs surviving a chat switch, and tabs restored after quitting and relaunching the app.check:audits,check:desktop-bridge, and type-check pass.Checklist