Repository navigation
sessions: collapse Pinned and Chats sections on first open - #324055
Merged
Sandeep Somavarapu (sandy081) merged 1 commit intoJul 2, 2026
Merged
Sandeep Somavarapu (sandy081) merged 1 commit into
Sandeep Somavarapu (sandy081) merged 1 commit into
Conversation
The Pinned and Chats sections in the Agents window sessions sidebar previously defaulted to expanded. Default their collapse state to collapsed on first open (when no saved state exists) while continuing to persist and honor the user's later expand/collapse choice. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Agents window sessions sidebar defaults so the always-visible Pinned and Chats sections start collapsed on first open (when there is no saved collapse state), while continuing to persist and respect the user’s expand/collapse choice across loads.
Changes:
- Change the default collapse state for the
pinnedandquickchatssections toObjectTreeElementCollapseState.PreserveOrCollapsedwhen no saved state exists. - Update the Sessions List spec to document the new first-open collapse behavior and persistence key.
Show a summary per file
| File | Description |
|---|---|
| src/vs/sessions/SESSIONS_LIST.md | Documents the new first-open default collapse behavior and where the user’s choice is persisted. |
| src/vs/sessions/contrib/sessions/browser/views/sessionsList.ts | Applies the new default collapse state for Pinned/Chats sections while preserving saved per-section collapse state. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Low
Ulugbek Abdullaev (ulugbekna)
approved these changes
Jul 2, 2026
Sandeep Somavarapu (sandy081)
deleted the
sandy081/sessions-collapse-pinned-chats-first-open
branch
July 2, 2026 14:12
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What
In the Agents window sessions sidebar, the Pinned and Chats sections previously defaulted to expanded. This changes their default collapse state to collapsed on first open (when no saved state exists), while continuing to persist and honor the user's later expand/collapse choice.
Why
Both sections are always visible even when empty (showing a "No pinned sessions" / "No chats" placeholder). Defaulting them expanded added noise at the top of the list. Collapsing them by default keeps the list compact while remaining discoverable.
How
In
SessionsList.renderSection(src/vs/sessions/contrib/sessions/browser/views/sessionsList.ts), thepinnedandQUICK_CHATS_SECTION_IDsections now useObjectTreeElementCollapseState.PreserveOrCollapsedas their default. Since the effective state isgetSavedCollapseState(section.id) ?? defaultCollapsed, any saved user choice (persisted undersessionsListControl.sectionCollapseState) still takes precedence — only the first-open default changed.Notes for reviewers
SESSIONS_LIST.mdspec updated to document the behavior.npm run typecheck-clientandnpm run valid-layers-checkpass.