[PR #6317] fix(tui): make auth URLs clickable regardless of line wrapping #11835

Closed
opened 2026-02-16 18:16:46 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/6317

State: closed
Merged: Yes


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

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

🤖 Generated with Claude Code

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6317 **State:** closed **Merged:** Yes --- ## 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](https://claude.com/claude-code)
yindo added the pull-request label 2026-02-16 18:16:46 -05:00
yindo closed this issue 2026-02-16 18:16:46 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11835