Repository navigation
fix(web): restore terminal link hover styles - #5382
Merged
juliusmarminge merged 4 commits intoAug 5, 2026
Merged
juliusmarminge merged 4 commits into
juliusmarminge merged 4 commits into
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Ghostty canvas migration preserved terminal link hit-testing and activation, but did not carry over xterm's hover decorations. URLs and file paths still opened with Ctrl/Cmd-click, yet there was no underline or pointer feedback to show that they were interactive.
Fix
Verification
../../node_modules/.bin/vp test run --project unit src/terminal/ghostty/surface.test.ts src/terminal/ghostty/renderer.test.ts(40 tests)vp run --filter @t3tools/web typecheckvp lintandvp fmt --checkGenerated with GPT-5.6-Sol in T3 Code (Codex harness).
Note
Low Risk
Terminal UI and pointer/render paths only; behavior is covered by unit tests and does not change link activation or PTY I/O semantics.
Overview
Brings back xterm-style link hover feedback on the Ghostty canvas terminal: pointer cursor and underlines on implicit URLs/paths and OSC 8 links, without requiring Ctrl/Cmd until click.
Link resolution now returns a full cell range (
terminalLinkAtPositionWithRange, plus range expansion for explicit hyperlinks across soft wraps). Hit-testing usesterminalGridCellAtso pointers outside the padded grid do not clamp to edge cells.Rendering passes
hoveredLinkRangeintorenderGhosttySnapshot, which underlines every cell in the range (including multi-row wraps). The surface tracks hover on move, clears on leave/selection drags, and suppresses hover during mouse-tracking unless the link modifier is held (shouldShowTerminalLinkHover); modifier key state updates on keydown/keyup and blur.Activation is unchanged:
onLinkActivatestill receives link text only on Ctrl/Cmd-click.Reviewed by Cursor Bugbot for commit b8e5747. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Restore terminal link hover styles with underline rendering and cursor feedback
hoveredLinkRangetracking toGhosttyTerminalSurfaceso that when a user hovers over a link, the full cell range (including wrapped lines) is underlined during rendering.terminalGridCellAt,terminalLinkAtPositionWithRange, andshouldShowTerminalLinkHoverutilities in surface.ts to map pointer coordinates to grid cells and determine when hover feedback is appropriate.renderGhosttySnapshotin renderer.ts to accept an optionalhoveredLinkRangeand underline all cells within that range, including across row wraps.Macroscope summarized b8e5747.