opencode icon indicating copy to clipboard operation
opencode copied to clipboard

fix(tui): make auth URLs clickable regardless of line wrapping

Open brettheap opened this issue 3 weeks ago • 0 comments

Summary

  • Add new Link component that opens URLs in browser when clicked
  • Fix OAuth authorization URLs that wrap across multiple lines being only partially clickable
  • Works in all terminal emulators (not dependent on OSC 8 support)

Problem

When connecting to a provider (e.g., Anthropic Claude Pro/Max), the OAuth URL displayed in the dialog often wraps across multiple lines. Previously, only the first line was clickable, making it impossible to open the full URL.

Solution

Created a Link component that uses onMouseUp handler with the open package to open the URL in the default browser when any part of the link text is clicked.

Test plan

  • [x] Run bun run dev and use /connect → anthropic → Claude Pro/Max
  • [x] Verify clicking anywhere on the wrapped URL opens the complete URL in browser
  • [x] TypeScript compiles without errors
  • [x] Build succeeds

🤖 Generated with Claude Code

brettheap avatar Dec 28 '25 21:12 brettheap