Sessions: refactor toggle action and unread badge#306272
Merged
mrleemurray merged 6 commits intomainfrom Mar 30, 2026
Merged
Conversation
Co-authored-by: Copilot <copilot@github.com>
…ate changes Co-authored-by: Copilot <copilot@github.com>
…nd visibility changes Co-authored-by: Copilot <copilot@github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors the Agent Sessions window’s sidebar visibility control by moving it to a dedicated toggle action and adding a titlebar unread-count badge that reacts to session state changes.
Changes:
- Adds a
workbench.action.agentToggleSidebarVisibilityaction entry to the sessions window titlebar left layout (with toggled state). - Introduces a custom
ActionViewItemto render an unread-count badge on the sidebar toggle action and update it via observable-driven state tracking. - Removes the prior bespoke sidebar title-area toggle button and its related CSS.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vs/sessions/contrib/sessions/browser/sessionsTitleBarWidget.ts | Adds SidebarToggleActionViewItem with unread badge + registers it for the sidebar toggle action; removes old in-widget unread/count button logic. |
| src/vs/sessions/contrib/sessions/browser/media/sessionsTitleBarWidget.css | Adds CSS for the unread badge positioning/styling on the titlebar toggle action. |
| src/vs/sessions/browser/parts/sidebarPart.ts | Removes the standalone sidebar title-area “hide sidebar” button implementation. |
| src/vs/sessions/browser/parts/media/sidebarPart.css | Removes CSS for the removed standalone sidebar button and updates the no-drag selector. |
| src/vs/sessions/browser/layoutActions.ts | Updates sidebar toggle action icon, toggled state, and contributes it to Menus.TitleBarLeftLayout. |
src/vs/sessions/contrib/sessions/browser/sessionsTitleBarWidget.ts
Outdated
Show resolved
Hide resolved
…t.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ctionViewItem Co-authored-by: Copilot <copilot@github.com>
…nread session count Co-authored-by: Copilot <copilot@github.com>
bpasero
approved these changes
Mar 30, 2026
mrleemurray
added a commit
that referenced
this pull request
Mar 30, 2026
…-update Sessions: refactor toggle action and unread badge
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.
Improve the sidebar by adding a toggle action and an unread badge that updates based on session state changes. Optimize badge updates for better performance and user experience.
Screen.Recording.2026-03-30.at.10.27.03.mov