Skip to content

Integrated terminal - fix stale OSC 8 link hover tooltip issues#309539

Merged
meganrogge merged 5 commits into
microsoft:mainfrom
JeffreyCA:osc8-stale-tooltip
May 6, 2026
Merged

Integrated terminal - fix stale OSC 8 link hover tooltip issues#309539
meganrogge merged 5 commits into
microsoft:mainfrom
JeffreyCA:osc8-stale-tooltip

Conversation

@JeffreyCA

@JeffreyCA JeffreyCA commented Apr 13, 2026

Copy link
Copy Markdown
Member

fixes #228517

This PR fixes a couple of issues with stale OSC 8 hover tooltips:

  • A delayed tooltip would appear if the mouse cursor hovered over an OSC 8 link but moved away before workbench.hover.delay
  • Tooltip would remain visible after viewport changes without moving mouse cursor

Without fix:

Without.mp4

With fix:

With.mp4

cc: @anthonykim1 @meganrogge

Copilot AI review requested due to automatic review settings April 13, 2026 17:00
@JeffreyCA JeffreyCA force-pushed the osc8-stale-tooltip branch from 3834b4f to f980d5b Compare April 13, 2026 17:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/vs/workbench/contrib/terminalContrib/links/browser/terminalLinkManager.ts Outdated
Comment thread src/vs/workbench/contrib/terminalContrib/links/browser/terminalLinkManager.ts Outdated
@JeffreyCA

Copy link
Copy Markdown
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

image

@meganrogge meganrogge left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@meganrogge meganrogge enabled auto-merge (squash) May 6, 2026 20:55
@meganrogge meganrogge added this to the 1.120.0 milestone May 6, 2026
@meganrogge meganrogge merged commit 28704d8 into microsoft:main May 6, 2026
26 checks passed
@JeffreyCA JeffreyCA deleted the osc8-stale-tooltip branch May 7, 2026 18:48
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Jun 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken hover and tooltip behavior for OSC 8 hyperlinks

5 participants