-
Notifications
You must be signed in to change notification settings - Fork 494
[Bug] OSC 8 hyperlink labels are not clickable #869
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
When markdown concealment is enabled, a markdown link like:
[opentui#866](https://github.com/anomalyco/opentui/pull/866)
renders visually as:
opentui#866 (https://github.com/anomalyco/opentui/pull/866)
But in Windows Terminal with PowerShell, only the visible URL suffix is clickable. The visible label text opentui#866 is not clickable.
Expected behavior
With concealment enabled, the visible label text should carry the same OSC 8 hyperlink metadata as the link target, so the user can Ctrl+Click the label itself. The clickable region should include the rendered link label, not only the visible URL suffix.
Actual behavior
Only the rendered URL portion is clickable:
- Not clickable:
opentui#866 - Clickable:
(https://github.com/anomalyco/opentui/pull/866)
Environment
- OpenCode:
1.3.0 @opentui/core:0.1.90- OS: Windows 11
- Terminal: Windows Terminal
- Shell: PowerShell
7.6.0
Reproduction
Render a markdown link in a concealed markdown block, for example:
[opentui#866](https://github.com/anomalyco/opentui/pull/866)
Observe that:
- the label is shown
- the URL suffix is shown
- Ctrl+Click works on the URL suffix
- Ctrl+Click does not work on the label
Analysis
This appears to be specific to the concealed markdown rendering path:
opentui#607addedlink: { url }metadata in the markdown token/chunk path- normal markdown paragraphs are now rendered through
CodeRenderable(filetype="markdown") - with
conceal=true, the visible label is produced by the tree-sitter conceal/render path - the visible URL suffix is linkified separately
- result: the URL cells get OSC 8 metadata, but the concealed label cells do not
Related
- feat(core): add OSC 8 hyperlink metadata to markdown links #607 - add OSC 8 hyperlink metadata to markdown links
- fix(renderer): add OSC 8 hyperlink id parameter and onChunks hook for link detection #736 - add OSC 8 hyperlink id parameter
- fix(markdown): hide URL suffix for concealed links #866 - hide URL suffix for concealed links
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.