Repository navigation
feat(browser): per-repo or per-workspace browser profile for new tabs - #32039
Merged
Merged
Conversation
AmoabaKelvin
marked this pull request as ready for review
October 22, 2026 21:38
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 5 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
AmoabaKelvin
force-pushed
the
browser-worktree-profile
branch
2 times, most recently
from
October 22, 2026 22:01
6a99e5f to
e4c1760
Compare
Shared stays the default so nobody loses logins on update. Fixes #31566
…rcad A deleted profile's session is retired for good, so a workspace recreated at the same path needs a new partition; the runtime reaches the deleter through a host port.
AmoabaKelvin
force-pushed
the
browser-worktree-profile
branch
from
October 22, 2026 22:17
e4c1760 to
322f6a4
Compare
1 task done
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.
What the user saw
Every new browser tab in every workspace opened on the one
Defaultprofile (persist:orca-browser). Cookies are keyed by host, not port, so everylocalhost:<port>dev server in every project got the same cookie jar. Sign into one local app and every other project's dev server receives its session cookies. Once the jar grows past ~15 KB, Vite module requests start failing with431 Request Header Fields Too Large.Root cause
The profile for a new tab is decided in one place:
createBrowserTabin the renderer, which every tab path goes through (new tab, panes, link-routed tabs, agent/CLItab create). It only knew one app-wide default, and nothing tied a profile to a repo or a workspace.The fix
Settings → Browser gets Profile for new tabs: Shared (default, today's behavior), Per repo, Per workspace.
createBrowserTabasks one resolver (resolveNewBrowserTabProfile). Under a repo or workspace scope, it returns that owner's managed profile. Otherwise it returns the existing default. This covers local and SSH workspaces, whose pages render on this desktop. Paired-server pages keep the server's own profiles.owner({ kind: 'repo' | 'worktree', id }) on the profile.orcadstays Electron-free. The renderer does the same for SSH and paired workspaces, which render on this desktop but are removed on their host.Left out on purpose:
orca tab createalready follow the setting. Browser-only CLI commands move from orca tab to orca browser page/profile #27619 is moving the profile commands.Linked Issue
Fixes #31566
Linear: STA-11586
How it was tested
http://localhost:41566that echoes theCookieheader andlocalStorage:session=ALPHA_SESSION. This matches main.orca tab create --worktree path:<repo-b>landed on repo B's profile.orca worktree create→orca tab createmadeWorkspace: bwp-feat.orca worktree rmdeleted it. Recreating the worktree at the same path got a new partition.browser.test.ts(the per-repo routing, placeholder hold, adopt and closed-tab cases fail without the fix),browser-session-registry.test.ts,browser-profile-scope.test.ts,browser-search.test.ts, plus the worktree, folder and project removal suites.pnpm run check:code-quality:changed,pnpm run check:react-doctor:changed,check-runtime-electron-ratchet.Visual Proof
BEFORE (main): no setting. Repo B's dev-server tab receives repo A's session.
AFTER: the setting, Shared (default) and Per repo, with the managed profiles under Session & Cookies.
AFTER, Shared: same as today, B gets A's session.
AFTER, Per repo: repo B's tab only has its own session, after repo A signed in as
BRAVO_SESSION.