Repository navigation
feat(browser): add option to open in-app browser links in the background - #31536
PatrykMilewski wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
df747dd1-eb43-43de-8903-9bb28d6d07f5
📒 Files selected for processing: 17
src/renderer/src/components/settings/BrowserLinkRoutingBackgroundSetting.tsxsrc/renderer/src/components/settings/BrowserPane.search-catalog.test.tsxsrc/renderer/src/components/settings/BrowserPane.tsxsrc/renderer/src/components/settings/browser-link-routing-background-search.tssrc/renderer/src/components/settings/browser-search.test.tssrc/renderer/src/components/settings/browser-search.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/http-link-routing.test.tssrc/renderer/src/lib/http-link-routing.tssrc/shared/default-global-settings.tssrc/shared/global-settings-types.tssrc/shared/telemetry-property-schemas.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
…s-in-background # Conflicts: # src/renderer/src/components/settings/BrowserPane.tsx # src/renderer/src/components/settings/browser-search.test.ts # src/renderer/src/components/settings/browser-search.ts
ELI5
Clicking a link that opens in Orca's browser always switches you to the new tab. This adds a switch that opens the tab quietly in the background, so you can keep working in the terminal and look at the links later.
What Changed
openHttpLinkalways created the in-app tab withactivate: true, so every link routed to Orca's browser stole focus from the terminal.activate: falseand the terminal keeps focus.focusOnCreate: falseto the workspace browser opener.openWorkspaceBrowserTabalready honours this flag in both the client-hosted and runtime-hosted branches.openLinksInAppInBackgroundis off. With it off, requests are byte-identical to today's.browser-search.tsstays under the max-lines ratchet.SETTINGS_CHANGED_WHITELIST, like the neighbouring link-routing toggles.Why
When you queue several links (PRs, CI runs, localhost pages) while an agent keeps running, being pulled into each tab breaks the flow.
createBrowserTabalready supportsactivate: false; the browser's "Open link in new tab" context-menu item uses it. So this only threads a setting through link routing.A modifier key was considered instead. Cmd/Ctrl+click is already the open gesture and Shift is already the routing escape hatch, so an opt-in setting is the least surprising option.
Linked Issue
Fixes #31530
Visual Proof
TODO: before/after recording to be attached.
Testing
New tests in
http-link-routing.test.tscover:activate:false;activate:false;focusOnCreate:false;The existing
activate:trueassertions still cover the setting-off case. The search-catalog tests are updated for the new entry.Checks run locally on macOS, all passing:
pnpm tcpnpm lint(full chain, including ratchets and localization verifies)pnpm run check:code-quality:changedpnpm test: http-link-routing, workspace-browser-tab-open, settings, i18n, locale scripts,src/sharedAI Disclosure
Implemented with Claude Code (Claude Opus 5.5) and reviewed by the author. The zh/ja/fr/ko/es strings are machine translations and need a native-speaker check.
Review
focusOnCreateto the existing opener.Agent skill upstream boundary
Notes
Other callers affected when the setting is on:
openHttpLink, so they also open in the background.openWorkspaceBrowserTabactions (ports panel, jump palette) are unchanged.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)Generated with Claude Code Agent.