Integrated terminal - fix stale OSC 8 link hover tooltip issues#309539
Merged
Conversation
3834b4f to
f980d5b
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses stale hover tooltip behavior for OSC 8 hyperlinks in the integrated terminal by ensuring delayed hovers are cancelled when the pointer leaves early, and by dismissing active tooltips when the viewport/content changes.
Changes:
- Add centralized cleanup for active OSC 8 hover state (hover disposable, delay scheduler, and event listeners).
- Dismiss OSC 8 hover/tooltips on terminal scroll and render events.
- Add unit tests covering “leave before delay” cancellation and scroll dismissal.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/vs/workbench/contrib/terminalContrib/links/browser/terminalLinkManager.ts |
Clears OSC 8 hover state on leave/scroll/render to prevent stale tooltips. |
src/vs/workbench/contrib/terminalContrib/links/test/browser/terminalLinkManager.test.ts |
Adds coverage for cancelling delayed tooltip on leave and dismissing tooltip on scroll. |
Member
Author
|
@anthonykim1 @meganrogge gentle ping on this one as well - azd uses OSC 8 links in several places and the stale tooltip can be pretty annoying for users
|
dmitrivMS
approved these changes
May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

fixes #228517
This PR fixes a couple of issues with stale OSC 8 hover tooltips:
workbench.hover.delayWithout fix:
Without.mp4
With fix:
With.mp4
cc: @anthonykim1 @meganrogge