Skip to content

fix(core): a hovered link on the alternate screen keeps its colour (#163) - #165

Merged
Maxaubert merged 2 commits into
mainfrom
fix/163-link-ink
Oct 11, 2026
Merged

Maxaubert merged 2 commits into
mainfrom
fix/163-link-ink

Conversation

@Maxaubert

Copy link
Copy Markdown
Owner

Fixes #163.

The owner's recording (2026-10-10): in Claude Code's fullscreen view, a link that is hovered turns white and stays white after the pointer leaves, until a scroll.

Cause (measured): Prism Terminal, not Claude Code.

  • Driven in a bare pty with the same mouse moves, Claude draws a URL as plain text and writes nothing on hover or leave.
  • The blue is PT's own ink (termLinkPaint), which wraps the link text in a span each time xterm draws a row (onRender).
  • xterm's DOM renderer underlines a hovered link, and takes the underline off, by replacing the row's contents (_setCellUnderline, DomRenderer.ts:525). That fires no onRender, so the ink was wiped.

Fix: a MutationObserver on the rows inks any replaced row that holds no ink. Inking is itself a mutation, but the row then holds ink and is left alone, so it cannot loop. This is a core change, so Prism gets it too. Core 0.28.3, app 0.35.3.

Gates:

🤖 Generated with Claude Code

https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t

)

xterm's DOM renderer underlines a hovered link by replacing the row's
contents, with no onRender, so the ink was wiped until a scroll redrew the
rows. A MutationObserver inks any replaced row that holds no ink. The e2e
hovers and leaves a link on the alternate screen (failed before the fix).
Core 0.28.3, app 0.35.3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t
)

The MutationObserver re-inked every replaced alternate-screen row holding no
ink, so each row onRender had just scanned was scanned again, and it stayed
attached on the normal screen. It now re-inks only a row that held ink and
holds none (rowsToReink, unit tested), and disconnects when leaving the
alternate screen; the first onRender there attaches it again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t
@Maxaubert
Maxaubert merged commit 2d10e76 into main Oct 11, 2026
2 checks passed
@Maxaubert
Maxaubert deleted the fix/163-link-ink branch October 11, 2026 07:13
github-actions Bot pushed a commit that referenced this pull request Oct 11, 2026
) (#165)

* fix(core): a hovered link on the alternate screen keeps its colour (#163)

xterm's DOM renderer underlines a hovered link by replacing the row's
contents, with no onRender, so the ink was wiped until a scroll redrew the
rows. A MutationObserver inks any replaced row that holds no ink. The e2e
hovers and leaves a link on the alternate screen (failed before the fix).
Core 0.28.3, app 0.35.3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t

* perf(core): the link-ink row watch re-inks only rows that lost ink (#163)

The MutationObserver re-inked every replaced alternate-screen row holding no
ink, so each row onRender had just scanned was scanned again, and it stayed
attached on the normal screen. It now re-inks only a row that held ink and
holds none (rowsToReink, unit tested), and disconnects when leaving the
alternate screen; the first onRender there attaches it again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

Links in Claude Code's fullscreen view lose their blue after a hover until a scroll

1 participant