You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Solid work — intercepting OSC 8 through linkHandler (instead of letting xterm fall back to confirm() + window.open()), reusing normalizeExternalUrl across all three open paths, and hiding the native view while the dialog is up are all the right calls. Two items before merge:
Required: don't route unsafe URLs into the search fallback on the canvas-browser path. If an OSC 8 link carries credentials (https://user:secret@host) or a non-HTTP(S) scheme, the canvas-browser destination goes through openBrowser → BrowserService → policy.normalizeHumanInput, which turns a rejected URL into a https://duckduckgo.com/?q=<full original URL> search query — the credentials leak to the search engine and the UX is unexpected. Please validate the URL before showing the chooser (or reject with an explicit error on the canvas path) so only clean HTTP(S) URLs without credentials can reach either destination. The system-browser path already does this correctly via normalizeExternalUrl.
Process note, no action needed: this PR adds @xterm/addon-web-links. Repo policy requires explicit maintainer approval for new packages — confirmed and approved here; it's the official xterm addon with no peer conflicts.
Minor, non-blocking observations (fine as follow-ups):
Global capture-phase shortcuts (Home / Rename window) still fire while the chooser dialog is open.
On the system-browser failure path the user sees the raw Error invoking remote method … prefix — worth mapping to a localized message.
Since there are no CI checks on the branch, please confirm npm test, npm run typecheck, and npm run build pass locally on the head commit.
Fixed in b01c0fa. Terminal OSC 8 URLs now go through the shared normalizeExternalUrl validator before the destination chooser is shown, so credentialed, non-HTTP(S), malformed, and overlong URLs are rejected with an error and cannot reach either the canvas browser or system browser. I also added a regression assertion for the pre-chooser validation path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is the terminal-link-only half of #26. The project-path paste feature is intentionally excluded and is proposed separately in #27.
Verification
npm run typechecknpm test(537/537 passing)