fix(#3165): OSC 8 hyperlinks not opening in the terminal#3384
fix(#3165): OSC 8 hyperlinks not opening in the terminal#3384nino-robotfutures-co wants to merge 1 commit into
Conversation
OSC 8 escape-sequence hyperlinks are handled by xterm's internal OSC link provider, which uses the Terminal `linkHandler` option. We never set one, so it fell back to xterm's built-in default handler that calls `window.open()` with no URL and then assigns `location.href`. Under Electron the resulting `about:blank` open is denied by the window-open handler (it only forwards http/https/file URLs to shell.openExternal), so the link silently never opened — the confirm dialog appeared but nothing happened. Provide a `linkHandler` that routes OSC 8 links through the same `openLink` path already used for URLs detected by the WebLinksAddon. The activate/hover/ leave behavior is factored into shared closures so both link types behave identically (including hover, which enables the "Open in External Browser" context menu on OSC 8 links). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
OSC 8 escape-sequence hyperlinks are handled by xterm's internal OSC link provider, which uses the Terminal
linkHandleroption. We never set one, so it fell back to xterm's built-in default handler that callswindow.open()with no URL and then assignslocation.href. Under Electron the resultingabout:blankopen is denied by the window-open handler (it only forwards http/https/file URLs to shell.openExternal), so the link silently never opened — the confirm dialog appeared but nothing happened.Provide a
linkHandlerthat routes OSC 8 links through the sameopenLinkpath already used for URLs detected by the WebLinksAddon. The activate/hover/ leave behavior is factored into shared closures so both link types behave identically (including hover, which enables the "Open in External Browser" context menu on OSC 8 links).Closes #3165