Skip to content

sessions: show the other Customizations categories with More and Less - #348333

Merged
Benjamin Christopher Simmonds (benibenj) merged 2 commits into
mainfrom
agents/chat-customizations-location-history
Nov 15, 2026
Merged

Benjamin Christopher Simmonds (benibenj) merged 2 commits into
mainfrom
agents/chat-customizations-location-history

Conversation

@benibenj

Copy link
Copy Markdown
Contributor

Follow-up to #348173.

The expandable Customizations section below the Sessions list in the Agents window now shows a shorter list by default:

  • It shows Overview, Plugins, MCP Servers, Skills, and Instructions, followed by a More row that counts the customizations of the other available categories and shows their suggestion badge.
  • More shows those categories in place, below the ones that are always shown, followed by a Less row that hides them again. Neither row appears when no other category is available for the active harness.
  • The section remembers per profile whether More or Less was used last.
  • Keyboard focus stays in the list: Enter on More moves focus to the first category it shows, and Enter on Less moves it back to More. More and Less expose aria-expanded.

The experiment-controlled sessions.sidebar.customizationsCategories setting controls this. It defaults to reduced; all shows every category, as before. It only affects the expandable section at the bottom of the sidebar, not the compact Customizations button or the separate navigation list.

Reviewers should know:

  • Keyboard focus restoration is in AICustomizationShortcutsWidget. Chromium moves focus out of the focused item before the toolbar update removes it, so the widget decides after the update whether focus left or was removed with the item. It restores focus only when focus is on no element, so it never takes focus from elsewhere.
  • observeVisibleSectionsBadge accepts an optional set of sections, which More uses for its badge.

How to test

  1. Open the Agents window with AI features enabled and expand the Customizations section below the Sessions list.
  2. Check that it shows Overview, Plugins, MCP Servers, Skills, Instructions, and More with a count.
  3. Select More: the other categories appear below Instructions, followed by Less. Reload the window: they stay shown.
  4. Select Less: they are hidden again. Reload the window: they stay hidden.
  5. With the keyboard, move to More and press Enter: focus moves to the first category it shows. Move to Less and press Enter: focus moves back to More.
  6. Set "sessions.sidebar.customizationsCategories": "all": every category is shown without More or Less.

Validation

  • ./scripts/test.sh --run src/vs/sessions/contrib/sessions/test/browser/customizationsToolbar.test.ts --run src/vs/workbench/contrib/sessions/test/browser/aiCustomizationShortcutsWidget.test.ts --run src/vs/sessions/contrib/sessions/test/browser/sessionsViewPane.test.ts --run src/vs/sessions/contrib/providers/agentHost/test/browser/agentsWindowRegistrations.test.ts: passed (37 passing, 1 pending existing test that needs a focused window).
  • pnpm run typecheck-client: passed.
  • pnpm run oxlint on the changed files: passed.
  • Manually verified in a Code OSS Agents window: the steps above, including both window reloads, keyboard focus, and the default when the setting is not set.

Adds the experiment-controlled sessions.sidebar.customizationsCategories setting, which defaults to reduced. The Customizations section below the Sessions list then shows Overview, Plugins, MCP Servers, Skills, and Instructions, followed by a More row that counts the customizations of the other available categories. More shows them in place, followed by a Less row that hides them again, and the section remembers per profile which of the two was used last. Setting it to all shows every category, as before.

The section also keeps keyboard focus at its position when updating its items replaces the focused one, so that focus moves from More to the first category it shows, and from Less back to More.

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

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Sandeep Somavarapu (@sandy081)

Matched files:

  • src/vs/workbench/contrib/sessions/common/sessionConfig.ts

Ladislau Szomoru (@lszomoru)

Matched files:

  • src/vs/workbench/contrib/sessions/common/sessionConfig.ts

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.

🟡 Changes recommended

More/Less rebuilding leaves duplicate tab stops that break Shift+Tab navigation, and accessibility help does not explain how to reveal hidden categories or the new focus behavior.

2 open issues
What changed in this PR

This follows #348173 by shortening the expandable Customizations section in the Agents window sidebar while keeping other categories available through More and Less.

Changes:

  • Adds a reduced/all setting and remembers More/Less state per profile.
  • Adds counts, suggestion badges, disclosure semantics, and keyboard focus restoration.
  • Adds regression tests and updates manual testing guidance.
File Description
src/​vs/​workbench/​contrib/​sessions/​test/​browser/​aiCustomizationShortcutsWidget.test.ts Tests focus restoration after list updates.
src/​vs/​workbench/​contrib/​sessions/​common/​sessionConfig.ts Defines the category-display setting and values.
src/​vs/​workbench/​contrib/​sessions/​browser/​customizationItems.ts Marks categories retained in reduced mode.
src/​vs/​workbench/​contrib/​sessions/​browser/​aiCustomizationShortcutsWidget.ts Restores focus when toolbar items are replaced.
src/​vs/​workbench/​contrib/​chat/​browser/​aiCustomization/​aiCustomizationSectionBadges.ts Supports badges for a selected set of categories.
src/​vs/​sessions/​test/​ai-customizations.test.md Documents reduced mode and its testing override.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​customizationsToolbar.test.ts Tests visibility, persistence, counts, and badges.
src/​vs/​sessions/​contrib/​sessions/​browser/​sessions.contribution.ts Registers the experiment-controlled setting.
src/​vs/​sessions/​contrib/​sessions/​browser/​customizationsToolbar.contribution.ts Implements More/Less actions, ordering, and persistence.

Review effort: Balanced

…he Agents window help

Updating the Customizations items made the first item a tab stop again, even when focus stayed on, or was restored to, another item, so Shift+Tab moved to Overview instead of leaving the list. Only the focused item now remains a tab stop.

The Agents window accessibility help now explains how More and Less show and hide the other customization categories, where focus moves, and the setting that always shows every category.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Merged via the queue into main with commit 0fbab14 Nov 15, 2026
37 of 38 checks passed
@benibenj
Benjamin Christopher Simmonds (benibenj) deleted the agents/chat-customizations-location-history branch November 15, 2026 15:43
@vs-code-engineering vs-code-engineering Bot added this to the 1.147.0 milestone Nov 15, 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.

4 participants