Skip to content

chat customizations: fix clipping#304281

Merged
joshspicer merged 3 commits intomainfrom
josh/mcp-browse-layout
Mar 23, 2026
Merged

chat customizations: fix clipping#304281
joshspicer merged 3 commits intomainfrom
josh/mcp-browse-layout

Conversation

@joshspicer
Copy link
Member

fix #304139

Also add more examples to fixtures

When toggling browse mode, the back link appears/disappears but
layout() was never re-called, causing the list height to not
account for the changed chrome. This clipped the last entry.

Cache the last layout dimensions and re-call layout() after
toggling browse mode.

Fixes #304139
The AICustomizationListWidget recently added a dependency on
IProductService but the component fixtures were not updated,
causing all AI customization fixtures to fail with
'depends on UNKNOWN service productService'.
Copilot AI review requested due to automatic review settings March 23, 2026 21:58
@joshspicer joshspicer changed the title Josh/mcp browse layout chat customizations: fix clipping Mar 23, 2026
@vs-code-engineering vs-code-engineering bot added this to the 1.114.0 milestone Mar 23, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a layout issue in the AI Customizations UI where, after switching to “Browse Marketplace” in the MCP Servers tab, the last marketplace entry could be partially clipped (missing a re-layout when the back-link appears). Also expands component-explorer fixtures to provide more realistic, scrollable datasets and adds guidance for screenshot fixtures.

Changes:

  • Trigger a widget re-layout when entering/exiting browse mode in McpListWidget and PluginListWidget.
  • Expand AI Customizations management editor fixtures with richer data, new per-tab screenshot fixtures, and standalone browse-mode fixtures.
  • Update the chat-customizations-editor skill doc with instructions for targeting specific tab fixtures.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/vs/workbench/contrib/chat/browser/aiCustomization/mcpListWidget.ts Store last layout size and re-layout on browse-mode toggle so the list height accounts for the back-link.
src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.ts Same browse-mode re-layout behavior as MCP widget to avoid clipped content.
src/vs/workbench/test/browser/componentFixtures/aiCustomizationManagementEditor.fixture.ts Adds richer fixture data, per-tab fixtures, and standalone browse-mode fixtures for MCP/plugins.
src/vs/workbench/test/browser/componentFixtures/aiCustomizationListWidget.fixture.ts Adds IProductService mock to satisfy dependencies for list widget fixture rendering.
.github/skills/chat-customizations-editor/SKILL.md Documents new tab-specific screenshot fixtures and how to add new ones.
Comments suppressed due to low confidence (1)

src/vs/workbench/test/browser/componentFixtures/aiCustomizationManagementEditor.fixture.ts:597

  • This uses a fixed setTimeout(..., 50) and then manually calls widget.layout(height, width) to stabilize the screenshot. The fixed delay is prone to flakiness across CI/machines, and the explicit layout call can hide regressions in the widget’s internal browse-mode reflow. Prefer waiting for a deterministic condition (e.g., list has N items, or the loading empty state text changes) and rely on the widget’s own layout behavior.
	// Wait for the marketplace query to resolve
	await new Promise(resolve => setTimeout(resolve, 50));

	// Re-layout after browse mode
	widget.layout(height, width);

alexdima
alexdima previously approved these changes Mar 23, 2026
@joshspicer joshspicer enabled auto-merge (squash) March 23, 2026 22:32
@joshspicer joshspicer merged commit c3231e5 into main Mar 23, 2026
17 of 19 checks passed
@joshspicer joshspicer deleted the josh/mcp-browse-layout branch March 23, 2026 22:46
alexdima added a commit that referenced this pull request Mar 24, 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.

Chat customization: search marketplace: last entry not visible

3 participants