4 Commits

Author SHA1 Message Date
Josh Spicer
7efa1c5c0d chatCustomizations: support grouping and badges for external provider items (#305813)
* feat: enhance AICustomizationListWidget with grouping and badge support for external customization items

* feat: add user data profile service and infer storage from URI in AICustomizationListWidget

* Copilot CLI session 8af2fd4a-10fe-4bba-b408-f1b90cebc8dc changes

* docs: add chatSessionCustomizationProvider API chain to customizations editor skill

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: address PR review feedback

- Remove duplicate sectionToIcon, reuse getSectionIcon instance method
- Use Map for O(1) groupKey lookups instead of O(n²) includes/find
- Check active project root in inferStorageFromUri for Sessions window
- Set pluginUri on provider items and use it for storage inference
- Remove redundant plugin check from inferStorageFromUri (handled by caller)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-27 21:48:27 +00:00
Josh Spicer
b4e7793b6c chat customizations: improve agentic engineering dev loop (#304305)
* fix #304030: show custom agent names as-is without title-casing

formatDisplayName was converting dashes/underscores to spaces and
applying title case (e.g. nls-code-helper → Nls Code Helper). This
made names inconsistent between the customization view and the agent
dropdown. Now only strips .md extension, showing names exactly as
defined in frontmatter headers.

* fix #304131: show workspace-relative paths in customization tooltips

Workspace items now show paths relative to the project root (e.g.
.github/instructions/coding-standards.instructions.md) instead of
absolute paths (/Users/.../workspace/.github/...).

* fix #304133: show extension name instead of full path in tooltips

Extension items now show 'Extension: github.copilot-chat' in the
tooltip instead of the full filesystem path into the extension
directory. The extensionLabel is populated from the extensionIdByUri
map during item post-processing.

* fix #304178: use save icon instead of ambiguous checkmark

The editor save indicator now uses Codicon.save (floppy disk) instead
of Codicon.check (bare checkmark), making it clear that the indicator
is about save status rather than an enable/disable toggle.

* fix #304183: show user-scoped hooks in sessions window

HOOKS_FILTER excluded PromptsStorage.user, so hooks in
~/.copilot/hooks/ were filtered out in the sessions window (and
any harness using the restricted filter). User hooks are now
supported in CLI, so add user storage to the allowed sources.

* fix: improve list layout footer fallback and remove extension tooltip

- Use 80px footer height fallback instead of 0 when sectionHeader
  has not rendered yet, preventing list from overlapping the footer
  on first paint
- Wait for async section load in fixture before final layout
- Remove extensionLabel tooltip (implementation detail, not relevant
  to users)

* fix #304178: show loading spinner before saved icon, remove green color

The save indicator now shows a spinning loading animation while the
file is being saved (onDidChangeDirty dirty→clean transition), then
switches to the save icon when the save completes (onDidSave). The
special green color was removed to use the default description
foreground color instead.

* fix: simplify list layout to use CSS flex instead of manual height calculation

All three list widgets (AICustomizationListWidget, McpListWidget,
PluginListWidget) now rely on CSS flex layout to distribute space
between search bar, list container, and footer. The layout() method
sets the widget height, clears any manual list container height,
and reads clientHeight (forcing a synchronous reflow) to get the
flex-computed height for the WorkbenchList.

This eliminates hardcoded fallback values, requestAnimationFrame
correction loops, and manual offsetHeight arithmetic that caused
the list to overlap the footer on first render.

* revert: drop save indicator icon changes (#304178)

Reverts the checkmark→save icon change, the loading spinner, and the
green color removal. The save indicator is back to the original
Codicon.check with green color — this will be addressed separately.

* fix: show Built-in/Extension name in tooltips, fix MCP scroll, hide copy path for built-in

- Built-in items show 'Built-in' in tooltip instead of file path
- Non-built-in extension items show 'Extension: {displayName}'
- Copy path context menu hidden for built-in items
- Fix MCP/Plugin scroll: fall back to passed height when container
  is hidden (display:none → clientHeight=0), and re-layout when
  section becomes visible via selectSectionById
- Remove unused resolveExtensionGroupKey method

* fix: use explicit height calculation for list layout instead of flex clientHeight

The flex-based clientHeight approach was unreliable — reflow timing
varied between the component explorer and the real product, causing
the list to clip behind the footer at certain window sizes.

Reverts to explicit height calculation by measuring sibling elements
(search bar, footer, back link) via offsetHeight and subtracting
from total height. For hidden widgets (MCP/Plugin when not the
active tab), layout is skipped since offsetHeight returns 0; the
selectSectionById re-layout handles showing them later.

Removes the rAF wait from the fixture since explicit measurement
doesn't depend on paint timing.

* Stabilize AI customizations editor fixtures

* Add narrow viewport fixture variants and fix widget overflow clipping

* fix: defer layout when offsetHeight returns 0 during display:none → visible transition

When switching sections in the Chat Customizations editor, the
container transitions from display:none to visible. The layout
method fires synchronously before the browser has reflowed, causing
offsetHeight to return 0 for sibling elements. Previously, layout
bailed out entirely, leaving the virtual list with no viewport
height — resulting in missing rows and empty space.

Now defers layout to the next animation frame so measurements
are accurate after the reflow completes.

* skill: add live debugging workflow to chat-customizations-editor skill

* skill: reference launch skill instead of duplicating agent-browser docs

* skill: add fixture gotchas — built-in grouping, editor contribution mocks, screenshot stability

* ci: add blocksCi labels to key customization fixtures for automated regression gating

* refactor: replace type assertion mutations with immutable map in applyBuiltinGroupKeys

* fix: show extension display name instead of ID for agent extension source labels
2026-03-24 17:05:32 -07:00
Josh Spicer
c3231e5f45 chat customizations: fix clipping (#304281)
* fix: re-layout list when toggling browse mode in MCP/plugin widgets

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 https://github.com/microsoft/vscode/issues/304139

* fix: register IProductService in AI customization component fixtures

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'.

* fix: address PR review — remove manual layout() in fixtures, fix null! in ParsedPromptFile
2026-03-23 22:46:01 +00:00
Josh Spicer
9541d49335 chat customizations: component fixtures, developer skill, spec updates (#303309)
* component explorer fixture for chat customization tabs

* chat customizations: full editor fixture + developer skill

* Refine AI customization management editor fixtures

* fix: update DOM element creation to use shorthand syntax

---------

Co-authored-by: Martin Aeschlimann <martinae@microsoft.com>
2026-03-20 00:37:36 +00:00