fix(web): restore terminal link hover styles - #5382
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Approved b8e5747 Self-contained UI fix that restores terminal link hover underlines. Changes are well-tested and limited to the terminal rendering subsystem with no security or schema implications. Author is the primary contributor to these files. You can customize Macroscope's approvability policy. Learn more. |
Dismissing prior approval to re-evaluate f2e6b6e
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f2e6b6e. Configure here.
## What's Changed * fix(mcp): unblock Kimi models in OpenCode with preview tools by @hwanseoc in pingdotgg/t3code#5128 * fix(web): clear main branch lint warnings by @t3dotgg in pingdotgg/t3code#5384 * fix(mobile): preserve grouped project workspaces by @shivamhwp in pingdotgg/t3code#4642 * fix(mobile): prevent Android thread search crash by @shivamhwp in pingdotgg/t3code#5386 * fix(web): truncate long project switcher names by @FllipEis in pingdotgg/t3code#5348 * fix(mobile): avoid double dividers between thread sections by @shivamhwp in pingdotgg/t3code#5391 * fix(web): keep the composer command menu anchored to the composer by @StiensWout in pingdotgg/t3code#5336 * fix(web): restore terminal link hover styles by @StiensWout in pingdotgg/t3code#5382 * fix(ci): isolate releases from shared API rate limits by @t3dotgg in pingdotgg/t3code#5394 **Full Changelog**: pingdotgg/t3code@v0.0.32-nightly.20260805.1002...v0.0.32-nightly.20260805.1005 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.32-nightly.20260805.1005

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.