fix(terminal): scheme-less links + OSC-8 markdown links clickable (v0.194.0)#323
Merged
Conversation
….195.0) Two gaps from the v0.192.0 terminal rework: - Custom link matchers were too narrow — a bare domain needed a short-listed TLD and host/path with an unusual TLD didn't match. Rewrote them: broad common-TLD list for bare domains, and any multi-label host carrying a /path is treated as a URL (the slash is a strong signal), while still not linking Component.tsx / src/main.rs / version strings. Provider registered after the renderer + wrapped so a bad row can't break linkification. - tmux was stripping every OSC-8 hyperlink (claude's markdown links) before it reached the browser — the outer terminal wasn't advertised hyperlink-capable. Added `hyperlinks` to tmux terminal-features so they flow through and open via <Xterm>'s linkHandler. Test bed prints realistic link cases + `?strict=0` reproduces the prod single-run (no StrictMode). Verified 13/13 via Playwright against the mouse-reporting harness. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
d88d671 to
8fa1ca5
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What & why
Follow-up to the v0.192.0 terminal rework. You reported that plain-text links (bare domains) aren't auto-clickable — you had to ask agents for full URLs. Two real gaps, both now fixed and verified.
1. Link matchers were too narrow
host/pathwith an unusual TLD didn't match at all.example.com,my-shop.store), and any multi-label host that carries a/pathis treated as a URL (foo.bar/baz,docs.github.io/xterm) since the slash is a strong signal — while still not linkingComponent.tsx,src/main.rs, or version strings.2. tmux was silently stripping OSC-8 hyperlinks
_dataByLinkIdempty, cells had no link attr). That's why "full URLs work" was only true for the plain-text ones your agents typed.hyperlinksto tmux'sterminal-features; OSC-8 links now flow through and open on click via<Xterm>'slinkHandler.How it was verified
scripts/mouse-tui.mjswith realistic cases (trailing punctuation, in-sentence, parenthesised, uncommon TLD, an OSC-8 link, non-link tokens) and addedtermbed.html?strict=0to reproduce the production single-run (no React StrictMode — which had been masking the gaps in the dev harness).Component.tsxandsrc/main.rscorrectly do not.typecheck,web build, serverbuild,test:governance(68/68) green.Deploy note
The tmux
hyperlinkschange is server-side — it needs a service restart (not just a web build) to take effect, and applies to newly-spawned sessions.🤖 Generated with Claude Code