close
Skip to content

Fix image carousel showing UUID on hover in modal editor title#320739

Merged
dmitrivMS merged 4 commits into
microsoft:mainfrom
arun-357:fix/image-carousel-uuid-hover
Jun 10, 2026
Merged

Fix image carousel showing UUID on hover in modal editor title#320739
dmitrivMS merged 4 commits into
microsoft:mainfrom
arun-357:fix/image-carousel-uuid-hover

Conversation

@arun-357

Copy link
Copy Markdown
Contributor

Fixes #301984

Problem

Hovering the image carousel title in the modal header shows a raw UUID, and the UUID changes every time the carousel is reopened.

Root cause:

  • Each carousel open generates a fresh collection id via generateUuid() (imageCarousel.contribution.ts), which ImageCarouselEditorInput turns into its resource URI: vscode-imagecarousel:///<uuid>.
  • The modal header label (updateLabel() in modalEditorPart.ts) calls ResourceLabel.setResource() without a title option.
  • With no title provided, ResourceLabelWidget.render() (labels.ts) falls back to labelService.getUriLabel(resource) for the tooltip — i.e. the UUID URI.

Fix

Pass title: activeEditor.getTitle(Verbosity.LONG) in the ResourceLabel options for the modal header, mirroring how editor tabs set their hover (multiEditorTabsControl.ts, editorTabsControl.ts#getHoverTitle).

This makes the modal header hover behave like existing non-file editor tabs — e.g. the Settings editor tab, whose hover shows "Settings" (its getTitle(Verbosity.LONG) falls back to getName()). The carousel hover now shows its stable title ("Image Carousel" / "Images Preview") instead of a per-open UUID.

The fix applies to all modal editor inputs (chat management, agent plugin, workspace trust, etc.), not just the image carousel. File editors opened modally (workbench.editor.useModal: "all") keep their useful full-path hover, since FileEditorInput.getTitle(Verbosity.LONG) returns the full path — no behavior change there.

Before / After

Before:
uuid2

After:
uuid1

Verification

  • Right-click an image in the Explorer → Open in Images Preview → hover the modal title: shows the title, not a UUID; stable across reopens.
  • Regression check with "workbench.editor.useModal": "all": a file opened in the modal still shows its full path on hover.
  • compile-check-ts-native and ESLint pass.

Copilot AI review requested due to automatic review settings June 10, 2026 09:54

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

Note

Copilot was unable to run its full agentic suite in this review.

Adds a (long) title string to the editor label model so consumers can display a richer title (e.g., tooltip/ARIA) for the active editor.

Changes:

  • Populate a new title field using activeEditor.getTitle(Verbosity.LONG) in the label data for the active editor.

Comment thread src/vs/workbench/browser/parts/editor/modalEditorPart.ts
@dmitrivMS

Copy link
Copy Markdown
Contributor

@arun-357 Thank you!

@dmitrivMS dmitrivMS enabled auto-merge (squash) June 10, 2026 18:41
@dmitrivMS dmitrivMS merged commit 233624a into microsoft:main Jun 10, 2026
25 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.125.0 milestone Jun 10, 2026
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.

Image carousel shows UUID on hover

5 participants