Repository navigation
Conversation
|
Warning Review limit reachedNext included review available in 25 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (31)
📝 WalkthroughWalkthroughThe change moves terminal link actions from Browser settings to Terminal Interaction settings. It adds a setting for inverting terminal file-link modifiers, with localized copy, defaults, typing, telemetry, and search entries. Terminal file activation, popover actions, fallback routing, and hover hints now use the inversion setting. OSC file links use shared target resolution and file-specific hints. Settings navigation and related tests now target the terminal pane. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
src/renderer/src/components/settings/terminal-link-actions-copy.test.ts (1)
21-35: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd a test for the catalog entry's dual-spelling claim.
Add a case asserting that
getTerminalPaneInteractionSearchEntries()finds the Terminal Link Actions entry by'ctrl'as well as'cmd'. This would have caught the mismatch between the comment and the code flagged onterminal-pane-appearance-search.ts.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: e789387e-ff89-4f80-a462-de5902f60e69
📒 Files selected for processing (31)
src/renderer/src/components/settings/BrowserPane.tsxsrc/renderer/src/components/settings/BrowserTerminalLinkActionsSetting.tsxsrc/renderer/src/components/settings/TerminalFileLinkModifierSetting.tsxsrc/renderer/src/components/settings/TerminalInteractionSection.tsxsrc/renderer/src/components/settings/TerminalLinkActionsSetting.tsxsrc/renderer/src/components/settings/browser-link-routing-copy.tssrc/renderer/src/components/settings/browser-search.test.tssrc/renderer/src/components/settings/browser-search.tssrc/renderer/src/components/settings/terminal-file-link-modifier-copy.tssrc/renderer/src/components/settings/terminal-link-actions-copy.test.tssrc/renderer/src/components/settings/terminal-link-actions-copy.tssrc/renderer/src/components/settings/terminal-pane-appearance-search.tssrc/renderer/src/components/terminal-pane/TerminalLinkActionPopover.test.tsxsrc/renderer/src/components/terminal-pane/TerminalLinkActionPopover.tsxsrc/renderer/src/components/terminal-pane/issue-4631-terminal-hover-link-provider.repro.test.tssrc/renderer/src/components/terminal-pane/terminal-file-link-actions.test.tssrc/renderer/src/components/terminal-pane/terminal-file-link-actions.tssrc/renderer/src/components/terminal-pane/terminal-file-open-routing.tssrc/renderer/src/components/terminal-pane/terminal-link-handlers.tssrc/renderer/src/components/terminal-pane/terminal-link-open-hints.tssrc/renderer/src/components/terminal-pane/terminal-link-osc-url-routing.test.tssrc/renderer/src/components/terminal-pane/terminal-link-provider-buffer-fixtures.tssrc/renderer/src/components/terminal-pane/terminal-link-provider-link-detection.test.tssrc/renderer/src/components/terminal-pane/terminal-osc-link-hover-hint.test.tssrc/renderer/src/components/terminal-pane/terminal-osc-link-routing.tssrc/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/lib/settings-navigation-types.tssrc/shared/constants.tssrc/shared/global-settings-types.tssrc/shared/telemetry-events.ts
💤 Files with no reviewable changes (3)
- src/renderer/src/components/settings/BrowserTerminalLinkActionsSetting.tsx
- src/renderer/src/components/settings/browser-link-routing-copy.ts
- src/renderer/src/components/settings/browser-search.ts
a90ea0b to
7c72f37
Compare
|
@coderabbitai review again please |
|
|
7c72f37 to
f9b6970
Compare
|
The @coderabbitai summary is stale, and the documentation coverage check seems to go against the project AGENTS.md What’s the recommended approach here? |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '== Repository instruction files =='
fd -HI '^AGENTS\.md$|^\.coderabbit\.ya?ml$|^coderabbit\.ya?ml$' . -E .git -E node_modules
printf '%s\n' '== AGENTS.md content =='
while IFS= read -r file; do
printf '\n--- %s ---\n' "$file"
cat "$file"
done < <(fd -HI '^AGENTS\.md$' . -E .git -E node_modules)
printf '%s\n' '== Documentation coverage references =='
rg -n -i -C 3 'documentation.{0,20}(coverage|threshold)|doc(umentation)?[-_ ]?coverage|docstring.{0,20}(coverage|threshold)|typedoc|api extractor' \
-g '!node_modules/**' -g '!dist/**' -g '!build/**' .
printf '%s\n' '== CI workflow files and relevant lines =='
fd -HI .github . -t f -E .git -E node_modules 2>/dev/null | \
rg '(^|/)(workflows/.*\.(ya?ml)|.*(ci|test|check).*\.(ya?ml))$' | \
while IFS= read -r file; do
printf '\n--- %s ---\n' "$file"
rg -n -i -C 2 'doc|coverage|comment|lint|test' "$file" || true
doneLength of output: 1421 ⚙️ CodeRabbit configuration inspected Length of output: 5387
The active configuration enables both of these checks:
That policy conflicts with the Use this configuration: reviews:
finishing_touches:
docstrings:
enabled: false
pre_merge_checks:
docstrings:
mode: offKeep unit-test and normal review checks enabled. This change only stops generic docstring coverage warnings and docstring-generation suggestions. The PR summary is a separate problem. Regenerate it now so it reflects the current terminal-link settings, modifier inversion, and OSC 8 hover behavior. The current configuration has I used the repository 🧠 Learnings used✅ Action performedSummary regeneration triggered. |
f9b6970 to
3b2a0db
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. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/renderer/src/components/settings/terminal-link-actions-copy.test.ts (1)
28-34: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd coverage for the new terminal file-link modifier row.
This suite tests only
getTerminalLinkActions.... It does not testgetTerminalFileLinkModifierDescriptionor the corresponding Terminal Interaction search entry. Add Mac/non-Mac interpolation assertions and a search-entry assertion for the intendedcmdandctrlaliases. Otherwise, regressions in the new setting can pass the suite.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 257d8d21-ab5c-42a3-9bdf-dd40b7a4ac59
📥 Commits
Reviewing files that changed from the base of the PR and between 1be6a03 and 3b2a0db841978b77e2b8e62bc221e5c3a60039b4.
📒 Files selected for processing (31)
src/renderer/src/components/settings/BrowserPane.tsxsrc/renderer/src/components/settings/BrowserTerminalLinkActionsSetting.tsxsrc/renderer/src/components/settings/TerminalFileLinkModifierSetting.tsxsrc/renderer/src/components/settings/TerminalInteractionSection.tsxsrc/renderer/src/components/settings/TerminalLinkActionsSetting.tsxsrc/renderer/src/components/settings/browser-link-routing-copy.tssrc/renderer/src/components/settings/browser-search.test.tssrc/renderer/src/components/settings/browser-search.tssrc/renderer/src/components/settings/terminal-file-link-modifier-copy.tssrc/renderer/src/components/settings/terminal-link-actions-copy.test.tssrc/renderer/src/components/settings/terminal-link-actions-copy.tssrc/renderer/src/components/settings/terminal-pane-appearance-search.tssrc/renderer/src/components/terminal-pane/TerminalLinkActionPopover.test.tsxsrc/renderer/src/components/terminal-pane/TerminalLinkActionPopover.tsxsrc/renderer/src/components/terminal-pane/issue-4631-terminal-hover-link-provider.repro.test.tssrc/renderer/src/components/terminal-pane/terminal-file-link-actions.test.tssrc/renderer/src/components/terminal-pane/terminal-file-link-actions.tssrc/renderer/src/components/terminal-pane/terminal-file-open-routing.tssrc/renderer/src/components/terminal-pane/terminal-link-handlers.tssrc/renderer/src/components/terminal-pane/terminal-link-open-hints.tssrc/renderer/src/components/terminal-pane/terminal-link-osc-url-routing.test.tssrc/renderer/src/components/terminal-pane/terminal-link-provider-buffer-fixtures.tssrc/renderer/src/components/terminal-pane/terminal-link-provider-link-detection.test.tssrc/renderer/src/components/terminal-pane/terminal-osc-link-hover-hint.test.tssrc/renderer/src/components/terminal-pane/terminal-osc-link-routing.tssrc/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/lib/settings-navigation-types.tssrc/shared/constants.tssrc/shared/global-settings-types.tssrc/shared/telemetry-events.ts
💤 Files with no reviewable changes (3)
- src/renderer/src/components/settings/browser-search.ts
- src/renderer/src/components/settings/BrowserTerminalLinkActionsSetting.tsx
- src/renderer/src/components/settings/browser-link-routing-copy.ts
🚧 Files skipped from review as they are similar to previous changes (26)
- src/renderer/src/components/settings/TerminalInteractionSection.tsx
- src/shared/telemetry-events.ts
- src/shared/constants.ts
- src/renderer/src/components/terminal-pane/terminal-link-osc-url-routing.test.ts
- src/renderer/src/components/settings/terminal-pane-appearance-search.ts
- src/renderer/src/components/terminal-pane/TerminalLinkActionPopover.tsx
- src/renderer/src/components/terminal-pane/terminal-file-link-actions.ts
- src/renderer/src/i18n/locales/en.json
- src/renderer/src/components/settings/terminal-link-actions-copy.ts
- src/renderer/src/components/terminal-pane/terminal-link-provider-buffer-fixtures.ts
- src/renderer/src/components/settings/browser-search.test.ts
- src/renderer/src/lib/settings-navigation-types.ts
- src/renderer/src/components/terminal-pane/TerminalLinkActionPopover.test.tsx
- src/renderer/src/components/terminal-pane/terminal-file-open-routing.ts
- src/renderer/src/components/settings/TerminalFileLinkModifierSetting.tsx
- src/renderer/src/components/terminal-pane/issue-4631-terminal-hover-link-provider.repro.test.ts
- src/shared/global-settings-types.ts
- src/renderer/src/components/terminal-pane/terminal-osc-link-hover-hint.test.ts
- src/renderer/src/components/terminal-pane/terminal-file-link-actions.test.ts
- src/renderer/src/components/settings/TerminalLinkActionsSetting.tsx
- src/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.ts
- src/renderer/src/components/settings/BrowserPane.tsx
- src/renderer/src/components/terminal-pane/terminal-link-provider-link-detection.test.ts
- src/renderer/src/components/terminal-pane/terminal-link-handlers.ts
- src/renderer/src/components/terminal-pane/terminal-link-open-hints.ts
- src/renderer/src/components/terminal-pane/terminal-osc-link-routing.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
The "Show terminal link actions" row toggles terminalLinkActionPopoverEnabled, which has only ever governed terminal links, but it rendered in the Browser pane nested under Link Routing. Render it in Terminal -> Terminal Interaction instead. The copy moves out of browser-link-routing-copy.ts into a terminal-owned terminal-link-actions-copy.ts, the deep-link target id becomes terminal-link-actions, and the row leaves the Browser search index, which shifts the positional indices BrowserPane.tsx uses to gate later rows. Translation keys stay as they are so no catalog entry moves.
New setting terminalFileLinkModifierInverts, off by default. With it on, Cmd-click opens a terminal file link in the OS default app and Shift+Cmd-click opens it in Orca, the reverse of the current chords. Ctrl stands in for Cmd on Windows and Linux. The swap covers terminal file links only. http(s) links in the terminal keep following the Browser pane openLinksInAppModifierInverts setting, and the hover hints, the link-action popover, and the plain-click path all read the same preference so the chord they advertise matches what the click does. A remote path has no reachable OS default, so a system-default request there degrades to opening in Orca rather than doing nothing.
An OSC 8 hyperlink pointing at a file showed the URL hover hint — "⇧⌘+click for
system browser" — while clicking it routed through handleTerminalFileLink and
opened the file in Orca. Hover and click read the same target and disagreed,
because only the click parsed it: linkHandler.hover called getUrlOpenLinkHint
unconditionally.
Extract resolveOscLinkFileTarget from handleOscLink so both surfaces ask one
function whether a target names a file, in the order that matters: a Windows
absolute path first, since new URL("C:\path\file.ts") parses with protocol c:,
then non-URL text as a path, then a file: URI. The hover feeds the result to
getTerminalFileLinkHoverHint, the same selector the plain file-link provider
uses, and falls back to the URL hint for non-file targets.
Also fixes OSC 8 targets that are bare or Windows paths rather than file: URIs,
which had the same mismatch.
The settings-search catalog and the rendered row kept two hand-maintained keyword lists, so "invert"/"swap"/"finder" only matched the row and never the search index. Both now read one exported helper, and each link row indexes both platform chords so users find it by the modifier they actually type.
3b2a0db to
13ca8c6
Compare
Readiness report — rebased, gates green, validated on real Windows ElectronHead is now What changed since the last pushOne new commit on top of the three existing ones:
Gates (local, macOS)
Focused suites: Windows validation — real Electron, real clicksBuilt this branch on a Windows 11 x64 box, launched the Electron dev app there, and drove it over CDP with genuine held-modifier mouse input ( Hover copy — all Windows chords, no
That last row is the fix in Click behaviour — default (modifier not inverted):
Aside worth knowing: Click behaviour — modifier inverted. Toggled through the real Settings UI, then re-measured:
…and the clicks follow the copy: The search fix, in the app. Typing SSH boundary — partially verified, one gap I could not closeRegistered a real SSH target from the Windows app to a Linux host, connected ( I could not render the remote hover string, because that host cannot spawn remote PTYs at all:
The host has All Windows test state was reverted: invert toggled back off, SSH target and imported project removed, fixture files deleted. |
External CI status at time of writingWorkflows were approved for the fork and are now queued against
GitHub reports Windows test state on the validation host has been fully reverted: modifier-invert toggled back off, the SSH target and imported remote project removed, fixture files and driver scripts deleted, remote key access revoked, and the dev Electron instance shut down. |












ELI5
When you click a file link in the terminal, three things were off. The toggle that controls terminal link actions lived in the Browser settings even though it only ever affected the terminal. There was no way to flip which click does what — plain modifier-click vs. shift+modifier-click. And a file link written as an OSC 8 hyperlink
showed a hover hint about the "system browser" while the click actually opened the file in Orca. This PR moves the setting to where it belongs, adds an opt-in swap, and makes the hover text match what the click really does.
What Changed
Three commits, all on terminal file-link behavior:
refactor(settings): move terminal link actions row to Terminal settings—The "Show terminal link actions" row (toggles
terminalLinkActionPopoverEnabled) moves from the Browser pane's Link Routing section to Terminal → Terminal Interaction. Its copy moves frombrowser-link-routing-copy.tsinto a terminal-ownedterminal-link-actions-copy.ts, the deep-link target id becomesterminal-link-actions, and it leaves the Browser search index. Translation keys are unchanged, so no catalog entry moves.feat(terminal): add an opt-in file-link modifier swap— New settingterminalFileLinkModifierInverts, off by default. With it on, modifier-click (⌘ on Mac, Ctrl elsewhere) opens a terminal file link in the OS default app and shift+modifier-click opens it in Orca — the reverse of today's chords. Scope is terminal file links only; http(s) links still follow the Browser pane'sopenLinksInAppModifierInverts. Hover hints, the link-action popover, and the plain-click path all read the same preference, so the advertised chord matches the click. A remote path has no reachable OS default, so a system-default request there degrades to opening in Orca.fix(terminal): describe OSC 8 file targets with file hover copy— An OSC 8 hyperlink pointing at a file showed the URL hover hint ("⇧⌘+click for system browser") while the click routed throughhandleTerminalFileLinkand opened the file in Orca. ExtractsresolveOscLinkFileTargetfromhandleOscLinkso hover and click ask one function whether a target names a file, resolved in order: Windows absolute path first (new URL("C:\path")parses with protocolc:), then non-URL text as a path, then afile:URI. Hover feeds the result togetTerminalFileLinkHoverHint, the same selector the plain file-link provider uses, and falls back to the URL hint for non-file targets. Also covers bare and Windows-path OSC 8 targets, not justfile:URIs.Why
The link-actions toggle only ever governed terminal links, so surfacing it under Browser settings was misleading. The OSC 8 hover/click mismatch meant the terminal told users one thing and did another for the same link. The modifier swap gives users who prefer opening files in their OS default app a way to make that the primary chord without losing the Orca path.
Linked Issue
Fixes #14813
Visual Proof
Testing
AI Disclosure
Opus 4.8 1M high
Review
reorders
which existing open path a chord takes.
handles
Windows absolute paths explicitly. Verified by tests, not a live Linux/Windows
run.
degrades
to opening in Orca.
terminalFileLinkModifierInvertsis a new optionalsetting, off by default; translation keys unchanged.
resolveOscLinkFileTargetruns perhover/click.
Checklist
N/Awithreason
pnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI willcover; local preferred) —
pnpm build(incl. typecheck) passed locally;lint/testleft to CI