Skip to content

Conversation

@simonklee
Copy link

Summary

  • Use <a href> element to generate OSC 8 terminal hyperlinks for the Link component
  • OSC 8 hyperlinks correctly span multiple wrapped lines in supporting terminals
  • Keep onMouseUp handler as fallback for terminals without OSC 8 support

Problem

When authorization URLs wrap across multiple lines in the dialog, clicking on the wrapped portion doesn't open the URL (issue #6639).

Solution

Wrap the link text in an <a href> element which generates OSC 8 terminal escape sequences. These hyperlinks are handled natively by the terminal and work correctly across line wraps. The onMouseUp handler is preserved as a fallback.

Test plan

  • Verified typecheck passes
  • OSC 8 hyperlinks are supported by most modern terminals (iTerm2, Ghostty, Kitty, Windows Terminal, etc.)

Fixes #6639

Use <a href> element to generate OSC 8 terminal hyperlinks which
correctly span multiple lines when text wraps. Keep onMouseUp as
fallback for terminals without OSC 8 support.

Fixes anomalyco#6639
@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

The following comment was made by an LLM, it may be inaccurate:

Duplicate Search Results

No duplicate PRs found.

The search returned only PR #6995 (the current PR) and one unrelated PR (#4791 about bash tool expansion). The specific focus on:

...appears to be unique to this PR. There are no other open PRs addressing the same terminal hyperlink functionality or the wrapped authorization URL problem.

Status: ✅ Safe to merge - no duplicates detected.

@simonklee simonklee closed this Jan 5, 2026
@simonklee simonklee deleted the fix/multiline-link-osc8 branch January 5, 2026 21:05
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] multiline file link does not work

1 participant