Repository navigation
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:
📝 WalkthroughWalkthroughAdded shared classification for HTTP(S), custom application, denied, and invalid URLs. Updated shell IPC and web shell handling to confirm custom schemes before opening them. Extended terminal link detection to recognize custom application schemes and route them through the shell API. Added tests for classification, URL matching, IPC confirmation, cancellation, direct opening, and denied schemes. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 8c2c0281-c6f6-47f8-a33a-f0773a14f00a
📒 Files selected for processing (7)
src/main/ipc/shell.test.tssrc/main/ipc/shell.tssrc/renderer/src/components/dashboard-popout/preview-terminal-links.tssrc/renderer/src/components/terminal-pane/terminal-web-link-click.tssrc/renderer/src/lib/pane-manager/pane-dom-creation.tssrc/shared/external-app-url.test.tssrc/shared/external-app-url.ts
Review follow-up for stablyai#13237: hover hints for app schemes describe registered-app open (not Orca/browser), and the terminal URL regex skips denied schemes and uppercase false positives like Error://.
Review follow-up (batch 4)Addressed confirmed medium findings:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
src/shared/external-app-url.test.ts (1)
72-78: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd a regression test for uppercase false positives.
The terminal matcher must reject
Error://...while it accepts lowercase custom schemes. Add an uppercase-scheme case to this input and keep thetoBeNull()assertion. This prevents a future case-insensitive regex from linkifying log text as an application URL.Based on the PR objectives, terminal matching must reject uppercase custom-scheme false positives.
src/renderer/src/lib/pane-manager/pane-dom-creation.ts (1)
22-25: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCentralize the custom-scheme tooltip hint.
pane-dom-creation.tsduplicates the platform check and label text already provided bygetTerminalCustomAppSchemeOpenHint()insrc/renderer/src/components/terminal-pane/terminal-link-open-hints.ts, Line 69 through Line 73. Move this logic to a dependency-neutral helper or reuse the existing helper while preserving the runtime guard. This prevents the two tooltip paths from drifting.Based on the provided cross-file context, the same custom-scheme hint helper already exists in
src/renderer/src/components/terminal-pane/terminal-link-open-hints.ts.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: e2d78bd4-138e-49e1-bc75-4e54ee76db71
📒 Files selected for processing (7)
src/renderer/src/components/terminal-pane/terminal-link-open-hints.tssrc/renderer/src/components/terminal-pane/terminal-osc-link-routing.tssrc/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.tssrc/renderer/src/lib/pane-manager/pane-dom-creation.tssrc/renderer/src/web/web-preload-api.tssrc/shared/external-app-url.test.tssrc/shared/external-app-url.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/shared/external-app-url.ts
|
Backlog note (cleanup pass): auto-rebase onto current |
d294c1f to
9ccec55
Compare
Review follow-up for stablyai#13237: hover hints for app schemes describe registered-app open (not Orca/browser), and the terminal URL regex skips denied schemes and uppercase false positives like Error://.
|
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/shared/external-app-url.test.ts (1)
29-58: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winAdd regression cases for the remaining scheme boundaries.
Add a classifier assertion that
vbscript:returnsreason: 'denied'. Add terminal matching coverage that rejects bothvbscript:and uppercaseError://text. These cases protect the explicit denial and lowercase-only policies from future matcher changes.Proposed test additions
it('denies dangerous schemes', () => { + expect(classifyExternalAppUrl('vbscript:msgbox(1)')).toEqual({ + ok: false, + reason: 'denied' + }) expect(classifyExternalAppUrl('javascript:alert(1)')).toEqual({ ok: false, reason: 'denied' @@ it('does not linkify denied schemes', () => { const text = - 'file:///etc/passwd javascript:alert(1) chrome://settings data:text/html,hi smb://host/share jnlp://x/app.jnlp' + 'file:///etc/passwd javascript:alert(1) vbscript:msgbox(1) Error://report chrome://settings data:text/html,hi smb://host/share jnlp://x/app.jnlp'As per PR objectives,
vbscript:must be denied andError://must not qualify as a custom link.Also applies to: 73-78
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: a8f0c1d0-31e6-4519-9170-6c33b31d0426
📒 Files selected for processing (11)
src/main/ipc/shell.test.tssrc/main/ipc/shell.tssrc/renderer/src/components/dashboard-popout/preview-terminal-links.tssrc/renderer/src/components/terminal-pane/terminal-link-open-hints.tssrc/renderer/src/components/terminal-pane/terminal-osc-link-routing.tssrc/renderer/src/components/terminal-pane/terminal-web-link-click.tssrc/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.tssrc/renderer/src/lib/pane-manager/pane-dom-creation.tssrc/renderer/src/web/web-preload-api.tssrc/shared/external-app-url.test.tssrc/shared/external-app-url.ts
🚧 Files skipped from review as they are similar to previous changes (9)
- src/renderer/src/components/terminal-pane/terminal-link-open-hints.ts
- src/renderer/src/components/terminal-pane/terminal-osc-link-routing.ts
- src/main/ipc/shell.ts
- src/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.ts
- src/renderer/src/components/dashboard-popout/preview-terminal-links.ts
- src/main/ipc/shell.test.ts
- src/renderer/src/web/web-preload-api.ts
- src/renderer/src/components/terminal-pane/terminal-web-link-click.ts
- src/renderer/src/lib/pane-manager/pane-dom-creation.ts
cd30edf to
89e063f
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/shared/external-app-url.test.ts (1)
29-58: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winCover the documented denied-scheme and lowercase-scheme rules.
The suite does not test
vbscript:. The terminal matcher also does not test thatError://is not linkified. Add both cases to prevent policy regressions.Proposed test additions
it('denies dangerous schemes', () => { + expect(classifyExternalAppUrl('vbscript:msgbox(1)')).toEqual({ + ok: false, + reason: 'denied' + }) expect(classifyExternalAppUrl('javascript:alert(1)')).toEqual({ ok: false, reason: 'denied' })const text = - 'file:///etc/passwd javascript:alert(1) chrome://settings data:text/html,hi smb://host/share jnlp://x/app.jnlp' + 'file:///etc/passwd javascript:alert(1) vbscript:msgbox(1) chrome://settings data:text/html,hi smb://host/share jnlp://x/app.jnlp Error://open'Also applies to: 73-78
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: f86aeafd-21e2-449d-89a5-5659171b937d
📥 Commits
Reviewing files that changed from the base of the PR and between 1928ca5 and 89e063f82b124e2fc8394bd497341c58127c7f3e.
📒 Files selected for processing (11)
src/main/ipc/shell.test.tssrc/main/ipc/shell.tssrc/renderer/src/components/dashboard-popout/preview-terminal-links.tssrc/renderer/src/components/terminal-pane/terminal-link-open-hints.tssrc/renderer/src/components/terminal-pane/terminal-osc-link-routing.tssrc/renderer/src/components/terminal-pane/terminal-web-link-click.tssrc/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.tssrc/renderer/src/lib/pane-manager/pane-dom-creation.tssrc/renderer/src/web/web-preload-api.tssrc/shared/external-app-url.test.tssrc/shared/external-app-url.ts
🚧 Files skipped from review as they are similar to previous changes (10)
- src/renderer/src/components/dashboard-popout/preview-terminal-links.ts
- src/renderer/src/components/terminal-pane/terminal-link-open-hints.ts
- src/renderer/src/web/web-preload-api.ts
- src/shared/external-app-url.ts
- src/renderer/src/lib/pane-manager/pane-dom-creation.ts
- src/main/ipc/shell.test.ts
- src/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.ts
- src/renderer/src/components/terminal-pane/terminal-web-link-click.ts
- src/main/ipc/shell.ts
- src/renderer/src/components/terminal-pane/terminal-osc-link-routing.ts
|
Ready for review (contributor priority pack)
Part of a short priority list for maintainers: P0 |
Review follow-up for stablyai#13237: hover hints for app schemes describe registered-app open (not Orca/browser), and the terminal URL regex skips denied schemes and uppercase false positives like Error://.
89e063f to
e4b91a3
Compare
e4b91a3 to
c06c82a
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.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 8c0b1e34-db79-485c-a103-b65ed82436a0
📥 Commits
Reviewing files that changed from the base of the PR and between ef8eea5 and c06c82a8d9ffcd3507d3b16a7fa724c5e69d62bc.
📒 Files selected for processing (11)
src/main/ipc/shell.test.tssrc/main/ipc/shell.tssrc/renderer/src/components/dashboard-popout/preview-terminal-links.tssrc/renderer/src/components/terminal-pane/terminal-link-open-hints.tssrc/renderer/src/components/terminal-pane/terminal-osc-link-routing.tssrc/renderer/src/components/terminal-pane/terminal-web-link-click.tssrc/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.tssrc/renderer/src/lib/pane-manager/pane-dom-creation.tssrc/renderer/src/web/web-preload-api.tssrc/shared/external-app-url.test.tssrc/shared/external-app-url.ts
🚧 Files skipped from review as they are similar to previous changes (10)
- src/main/ipc/shell.test.ts
- src/main/ipc/shell.ts
- src/renderer/src/components/terminal-pane/terminal-web-link-click.ts
- src/renderer/src/components/terminal-pane/terminal-osc-link-routing.ts
- src/renderer/src/lib/pane-manager/pane-dom-creation.ts
- src/renderer/src/web/web-preload-api.ts
- src/renderer/src/components/terminal-pane/terminal-link-open-hints.ts
- src/renderer/src/components/dashboard-popout/preview-terminal-links.ts
- src/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.ts
- src/shared/external-app-url.ts
|
Relationship note — paired with #13240; they share a module. Both PRs add
They should be reviewed together and only one of them should carry |
e41fc44 to
ba57c32
Compare
Co-authored-by: Cursor <cursoragent@cursor.com>
Plain clicks were treated as owned gestures and opened the confirm dialog. Keep HTTP action menus; custom openExternal stays on platform-correct direct activation. Co-authored-by: Cursor <cursoragent@cursor.com>
ba57c32 to
0fd7515
Compare
|
Thanks for this, it fixes exactly the case from #13225 that we keep hitting: agents print OSC 8 links to a local app with its own URL scheme, and today those links are dead in Orca, while the same links open fine from iTerm2 or Terminal.app. Is anything blocking a maintainer review? The PR has been open since 2026-08-08. It is mergeable now, but fork CI has not run (workflows need approval). @bbingz, happy to help test on macOS (Apple Silicon) with a real registered scheme if that's useful. |
|
👍 |
|
Thanks @DemiAsh and @michalkechner-impact, and sorry for the silence. The browser half of this landed in #30490, which asks before a page opens another app. I'd like to route terminal OSC 8 custom-scheme links through that same main-process prompt instead of keeping this PR's own deny list, but that needs one choice from the maintainers first:
I lean toward 1. Once that's settled I'll re-port this onto current main and post the new head here. DemiAsh, your offer to test on Apple Silicon would help at that point. |
|
@bbingz, I'd like this to land too: my agents print Branch: What moved and how I resolved it
I added one commit of my own on top. Since this PR was written, Testing
Still open
The ratchet points toward option 1, which matches your preference. One smaller point: Maintainers, could you pick 1 or 2? @bbingz, you're welcome to reset your branch to mine and force-push, or I can open a replacement PR with your commits and authorship intact, whichever you prefer. I can also do the option 1 rework once it's decided. Written by Claude, intent from @aspiers. |
|
Thanks for rebasing the three commits and for the prose-boundary fix. I checked the branch rather than force-pushing it.
I am leaving this PR at Your branch is the right base once a maintainer picks the dedicated IPC. I did not re-run |
|
Small note in case it helps with the option 1 vs 2 choice: #42845 landed on 15.11 and added "Always allow" to the #30490 prompt. From its description it remembers per site and scheme, browser tabs only. If option 1 reuses that prompt, terminal links might get a remembered choice too, maybe per scheme. Fine to leave that for later though, a prompt on every click already fixes the dead links for me. |
|
Thanks — I read #42845. It adds an unchecked "Always allow {site} to open {scheme} links" choice on the #30490 browser prompt, saved per site and scheme. That remembered choice stays out of this PR. The first terminal fix is still a prompt on every click, and it still waits on a maintainer picking the dedicated IPC (option 1) rather than widening shell:openUrl. |
Summary
Desktop terminal links such as
obsidian://andvscode://now support an explicit OS handoff. Cmd-click on macOS or Ctrl-click on other platforms opens a main-process Open/Cancel dialog with the full URL; Cancel is the default. Ordinary clicks, missing mouse events and the wrong platform modifier cannot launch the custom-scheme confirmation path.The gesture applies to detected text links, OSC 8 links and popout previews. Main classifies every request, rejects denied schemes and serializes confirmation dialogs. Existing HTTP(S) link actions and file-link routing remain intact. Web clients retain HTTP(S)-only opening because they have no equivalent native confirmation surface.
Partially addresses #13225. Remembered permissions and a Settings revocation list remain outside this change. Related: #13240 carries the embedded-browser surface. Both currently include the shared classifier and opening helper independently; reconcile those shared files when either lands.
Validation
At
ba57c32610baa33963285c68b95995d156296ed2:--composite false; changed-file lint, formatting, diff whitespace and native-runtime preflight passed.Full repository tests, packaged builds and a manual registered-app launch were not run. Unit tests mock the native confirmation dialog. No new RPC or stream opcode; terminal gestures and the desktop main-process gate also apply to SSH and folder workspaces.
AI disclosure
Cursor ported and reviewed this change; Codex independently checked the code and validation results before updating the PR.