Repository navigation
feat(browser): open clicked links in the pane to the side - #13392
dcieslak19973 wants to merge 5 commits into
Conversation
|
Important Review skippedWe couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting You can disable this status message by setting the Use the checkbox below for a quick retry:
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 991a3fe and c323fe65727ef95208e185d92f8b89afdc5f7519. 📒 Files selected for processing (12)
🚧 Files skipped from review as they are similar to previous changes (12)
📝 WalkthroughWalkthroughAdds the optional 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: f77fe1d2-a6da-4a45-9426-303bdaa37ef7
📥 Commits
Reviewing files that changed from the base of the PR and between a1f61ef and d577651125b7a688696f456a43a938e829139106.
📒 Files selected for processing (11)
src/renderer/src/components/settings/BrowserLinkSidePaneSetting.tsxsrc/renderer/src/components/settings/BrowserPane.tsxsrc/renderer/src/components/settings/browser-search.tssrc/renderer/src/hooks/useIpcEvents.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/lib/file-preview.tssrc/renderer/src/lib/link-target-group.test.tssrc/renderer/src/lib/link-target-group.tssrc/renderer/src/lib/side-group-placement.test.tssrc/renderer/src/lib/side-group-placement.tssrc/shared/types.ts
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/renderer/src/i18n/locales/en.json (1)
5746-5746: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winPreserve the
Kagibrand capitalization.
"kagi"is a user-facing provider label. Use"Kagi"to match the product name.Proposed fix
- "4af9a17947": "kagi" + "4af9a17947": "Kagi"
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 9bfa5368-e119-4acf-a471-5196666f35c3
📥 Commits
Reviewing files that changed from the base of the PR and between d577651125b7a688696f456a43a938e829139106 and e1a04bb5921c0cc9e1ee26b4c51ad2c6d6c06a27.
📒 Files selected for processing (3)
src/renderer/src/components/settings/BrowserLinkSidePaneSetting.tsxsrc/renderer/src/components/settings/browser-search.test.tssrc/renderer/src/i18n/locales/en.json
e1a04bb to
862e0ab
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
f69a9d3 to
c323fe6
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
c323fe6 to
b48bc88
Compare
b48bc88 to
63ead44
Compare
63ead44 to
32036bc
Compare
32036bc to
be9473f
Compare
be9473f to
5a1345c
Compare
5a1345c to
168def1
Compare
464d014 to
c271e61
Compare
2e4249a to
d9e7bc6
Compare
Squashed for rebase onto main's modularized ipc-events.
88f6228 to
20c3289
Compare
Summary
Closes #13390.
Clicking an in-app link always opened another tab in the worktree's active group, even with a browser pane sitting right beside the source — the handler passed no group at all:
This adds an opt-in setting (Settings → Browser → Open Links Beside, nested under Link Routing) that instead reuses the source pane's layout sibling, or splits right when there is no sibling yet. That is the behavior Open Preview to the Side already provides for previews; this PR makes it available for links and has both paths share one implementation.
Default is off, so nobody's current behavior changes silently.
Shape
src/renderer/src/lib/side-group-placement.ts— the placement primitive, lifted out offile-preview.tsnow that it has two callers: resolve the source group (requested → active → first), then reuse the layout sibling or ask for a right split. Pure, so the rules are testable without a store.src/renderer/src/lib/link-target-group.ts— link-specific policy: a pure planner plus a thin store adapter that performs the split.file-preview.tsnow delegates to the shared helper;openFilePreviewToSidebehavior is unchanged.Two decisions worth calling out, both pinned by tests:
createEmptySplitGroupreturning null all fall back to a new tab in the active group.The existing remote/SSH early return (
getRuntimeEnvironmentIdForWorktree) is untouched.Screenshots
No new UI surface beyond one settings switch; the behavior change is where an existing tab appears. With
Agent | Browsersplit and a link clicked in the left pane, the page now opens in the right pane instead of as another left-pane tab. With a single pane, a right split is created and the link opens there.Testing
pnpm lint— oxlint, type-aware audit, react-doctor, max-lines ratchet, reliability gates, and all three localization gates (catalog / extraction / coverage) pass individually for these changes. New user-facing strings were added viapnpm run sync:localization-catalog. The full chain'sverify:skill-bundle-manifeststep fails identically on an untouchedmaincheckout (stale generated skill artifacts — pre-existing, unrelated).pnpm typecheck— clean (all three projects)pnpm test— 3,839 passed / 1 skipped across the fullsrc/renderer/src/libsuite, which includes the existingfile-previewtests exercising the refactor. 16 of those are new.pnpm build— not run.Not manually verified in a running app. The logic is unit-tested and the store calls are the same ones
openFilePreviewToSidealready uses in production, but I have not watched a click land in the right pane. Worth a manual check before merge.AI Review Report
Reviewed with Claude (Opus 5), TDD throughout — each test watched fail before implementation.
Risks checked:
findSiblingGroupId; tested with(a | (b | c))for both the nearest-sibling and subtree cases. This is deliberate but is not always the visually rightmost pane.BrowserPaneselects search entries positionally, so the new entry is appended rather than inserted, with a comment recording why. Inserting would have silently mis-mapped every later setting's visibility.Cross-platform (macOS / Linux / Windows): checked. No shortcuts, accelerators, shortcut labels, path handling, or shell invocation are touched. The change is layout-state logic plus one settings switch; nothing platform-conditional. Developed and tested on Windows.
Forge/provider and remote considerations: no source-control provider surface touched. No wire-format change — the placement decision is made entirely in the renderer from local layout state, so there is no client/host contract impact per
docs/reference/remote-wire-compatibility.md. Remote/SSH worktrees keep their existing early return and are unaffected.Security Audit
browser:open-link-in-orca-tabpayload is unchanged.GlobalSettingspath.🤖 Generated with Claude Code