sessions: fix sidebar layout when customizations toolbar changes#306314
Merged
sessions: fix sidebar layout when customizations toolbar changes#306314
Conversation
- Listen to toolbar's onDidChangeMenuItems to trigger re-layout when items are added/removed (e.g., Plugins appearing after extension activation) - Remove redundant height: 100% from sessions-list-control (flex sizing handles this) - Reduce sessions section bottom margin from 12px to 6px - Rename onDidToggleCollapse to onDidChangeLayout to reflect broader layout change handling Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes sizing coordination issues in the Agent Sessions sidebar by ensuring the sessions list relayouts when the customizations toolbar changes (e.g., dynamic menu items added after extension activation), and by adjusting related CSS spacing/sizing rules.
Changes:
- Trigger sessions view layout when the customizations toolbar’s menu items change, not only on collapse/expand transitions.
- Rename the customization widget layout callback (
onDidToggleCollapse→onDidChangeLayout) to reflect broader layout triggers. - Adjust sidebar CSS spacing and remove
height: 100%from the sessions list control.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/vs/sessions/contrib/sessions/browser/views/sessionsView.ts | Uses the renamed callback to relayout the view when the customization widget signals layout changes. |
| src/vs/sessions/contrib/sessions/browser/media/sessionsViewPane.css | Reduces bottom spacing between the sessions list section and the customizations area. |
| src/vs/sessions/contrib/sessions/browser/media/sessionsList.css | Removes height: 100% from the list container (potentially impacting list sizing). |
| src/vs/sessions/contrib/sessions/browser/aiCustomizationShortcutsWidget.ts | Fires layout callback on toolbar menu-item changes and on collapse transition end. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
chrmarti
approved these changes
Mar 30, 2026
mrleemurray
pushed a commit
that referenced
this pull request
Mar 30, 2026
…6314) * sessions: fix sidebar layout when customizations toolbar changes - Listen to toolbar's onDidChangeMenuItems to trigger re-layout when items are added/removed (e.g., Plugins appearing after extension activation) - Remove redundant height: 100% from sessions-list-control (flex sizing handles this) - Reduce sessions section bottom margin from 12px to 6px - Rename onDidToggleCollapse to onDidChangeLayout to reflect broader layout change handling Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update src/vs/sessions/contrib/sessions/browser/media/sessionsList.css Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes layout issues in the sessions sidebar where the sessions list and customizations section don't properly coordinate their sizing.
Changes
Re-layout on toolbar item changes: The
AICustomizationShortcutsWidgetnow listens to the toolbar'sonDidChangeMenuItemsevent and triggers a layout update. Previously, layout was only recalculated on collapse/expand toggle — so when toolbar items were dynamically added (e.g., Plugins appearing after extension activation), the sessions list kept stale height dimensions.Remove redundant CSS: Removed
height: 100%from.sessions-list-controlsinceflex: 1 1 autoalready handles sizing. The redundant height could cause unexpected flex-basis calculations.Reduce section margin: Reduced
.agent-sessions-sectionbottom margin from 12px to 6px for tighter spacing between the sessions list and customizations toolbar.Rename callback: Renamed
onDidToggleCollapse→onDidChangeLayoutto accurately reflect it handles any layout-affecting change, not just collapse toggles.