SIGN IN SIGN UP

sessions: add `sessions.customizations.sidebarMode` enum setting (#314862)

* agents app: add chat.customizations.sidebarOpensWelcome enum setting

Adds a three-value enum setting chat.customizations.sidebarOpensWelcome
that controls the presentation and behavior of the Customizations section
in the Agents sidebar:

- 'welcome' (default): one item per category, clicking opens the
  Customizations welcome page
- 'section': one item per category, clicking deep-links to that
  category's section in the Customizations editor (prior behavior)
- 'single': replaces the per-category list with a single
  'Customizations' entry (with total count badge) that opens the
  welcome page

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

* sessions: fix customizations toolbar hygiene

Use tab indentation in the single-entry CSS block so the hygiene check passes.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: stop single-entry customization button from stretching

The shared .customization-link-button-container has flex: 1 so it can\nshare the toolbar height with sibling rows. In single-entry mode there\nis only one container in a flex-column toolbar, which made the\n'Customizations' button stretch to fill the section's full height. Set\nflex: none on the single-entry container so it sizes to its content,\nmatching the per-section row height.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: rename customizations sidebar setting and scope to Agents app

- Renames `chat.customizations.sidebarOpensWelcome` -> `sessions.customizations.sidebarMode` (more generic; no longer baked into the 'opens welcome' framing).\n- Moves the setting registration and `SessionsCustomizationsSidebarMode` enum out of `vs/workbench/contrib/chat` (where they affected all consumers) into `vs/sessions/contrib/sessions/browser/customizationsToolbar.contribution.ts`, so the setting is only registered when the Agents app loads.\n- Updates the widget, action handler, fixture, and AI_CUSTOMIZATIONS.md to use the new key/enum.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: keep customizations widget at stable DOM position on re-render

On a sidebar mode setting change, the widget removed its rendered\nroot from the parent and appended a new one. `DOM.append` puts the\nnew element at the END of the  past the agent-host-toolbar\nsibling registered after the customizations  which stacked\nthe two toolbars' `border-top` rules right next to each other and\nproduced a stray double divider above 'Customizations'.\n\nFix by appending a stable wrapper element once in the constructor and\nrendering into it; re-renders now clear and refill the wrapper without\ndisturbing its position in the parent.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* address PR review: dedupe total count, skip re-render when welcome<->section

- Extract _totalCount() helper used by both _render and _renderSingleEntry
- Track _renderedSingle bool instead of exact mode; only re-render when
  crossing the single<->non-single boundary (welcome and section produce
  identical DOM, click behavior already resolved at click-time)

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
J
Josh Spicer committed
22bff377322169a238f3090a795d5811c747ec6f
Parent: 6391321
Committed by GitHub <noreply@github.com> on 5/7/2026, 4:57:49 AM