Skip to content

fix(terminal): open hyperlinks in default browser#1218

Merged
arnestrickmann merged 1 commit intogeneralaction:mainfrom
jschwxrz:emdash/fix-opening-hyperlink-built-9ux
Mar 2, 2026
Merged

fix(terminal): open hyperlinks in default browser#1218
arnestrickmann merged 1 commit intogeneralaction:mainfrom
jschwxrz:emdash/fix-opening-hyperlink-built-9ux

Conversation

@jschwxrz
Copy link
Collaborator

@jschwxrz jschwxrz commented Mar 2, 2026

summary:

  • opening hyperlinks in the terminal would open them in electron window instead of the default browser

fix:

  • add linkHandler to terminal options

fixes #1135

@vercel
Copy link

vercel bot commented Mar 2, 2026

@jschwxrz is attempting to deploy a commit to the General Action Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 2, 2026

Greptile Summary

Adds linkHandler configuration to xterm.js Terminal options to properly handle OSC 8 hyperlinks (terminal escape sequence links), ensuring they open in the default browser instead of an Electron popup window.

  • Extracts link-opening logic into a shared openLink function to reduce code duplication
  • Respects custom options.onLinkClick handler when provided
  • Simplifies WebLinksAddon handler to use the same centralized logic

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • Focused bug fix that correctly implements the xterm.js linkHandler API to handle OSC 8 hyperlinks. The implementation reduces code duplication, includes proper error handling, and has no breaking changes or security concerns.
  • No files require special attention

Important Files Changed

Filename Overview
src/renderer/terminal/TerminalSessionManager.ts Adds linkHandler to terminal options to properly handle OSC 8 hyperlinks in default browser, refactors link-opening logic into shared function

Last reviewed commit: 9dae028

@arnestrickmann
Copy link
Contributor

LGTM, thanks! @jschwxrz

@arnestrickmann arnestrickmann merged commit 2925ad2 into generalaction:main Mar 2, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: Opening a hyperlink in the built in terminal opens in a webview popup instead of my default browser

2 participants