Skip to content

tui: long bare URLs wrap across lines and are not clickable #51727

Closed

Description

@WahahaYes

Description

Long bare URLs in assistant messages wrap across TUI lines and can't be clicked as a single link. Only the clicked-line segment opens, so the browser gets a truncated URL. Seen on vscode terminal (xterm-256color) with opencode 2.0.15.

Plugins

None found in config (~/.config/opencode/opencode.json contains only $schema).

OpenCode version

2.0.15

Steps to reproduce

  1. Have assistant output several long bare URLs (100+ chars, e.g. RockAuto / Jegs catalog URLs).
  2. View in TUI at normal width so a URL wraps onto 2 lines.
  3. Ctrl/Cmd+Click the wrapped URL.

Screenshot and/or share link

None — non-git workspace, no /share run.

Operating System

Linux 7.0.0-31-generic (linux x64)

Terminal

vscode, TERM=xterm-256color, COLORTERM=truecolor

Expected Behavior

Wrapped URL remains a single clickable link (OSC 8 hyperlink spanning the wrap), or renders so the full URL opens.

Actual Behavior

Only the clicked-line segment is captured; user must copy/paste pieces together.

Additional Context

Duplicate check before filing (empty searches for "link not clickable / markdown link / URL wrap / long URL / link break"):

Activity

  1. added
    needs:complianceThis means the issue will auto-close after 2 hours.
    and removed
    needs:complianceThis means the issue will auto-close after 2 hours.
    on Sep 27, 2026
  2. github-actions commented on Sep 27, 2026

    @github-actions
    Contributor

    Thanks for updating the issue with a description, reproduction steps, and system details!

  3. DEAD1nsane commented on Oct 7, 2026

    @DEAD1nsane

    Same symptom on another terminal: Termux app 0.119.0-beta.3 (Android 17, Pixel 10, ~80 cols) with terminal-onclick-url-open = true. Any 100+ char bare URL in TUI output wraps to 2 lines and tapping it opens only the first visual line, so the browser gets a truncated link. No ctrl+click here, it's tap-to-open, same truncation. Filed the terminal-side half as termux/termux-app#5368; the OSC 8 half belongs here.

  4. DEAD1nsane commented on Oct 13, 2026

    @DEAD1nsane

    Verified on v2.0.28 (Termux 0.119.0-beta.3, Android 17, Pixel 10, ~80 cols, terminal-onclick-url-open = false): tapping an explicit markdown link label opens the full URL across the wrap — #53903 works. But a bare URL in chat still does nothing on tap: it renders as plain text, not a link element, so there is nothing for click resolution to hit. With terminal-onclick-url-open = true the terminal instead intercepts the tap and opens the truncated first line. Remaining gap looks like bare-URL linkification (cf. the chunk.link root cause noted for #14966).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions