Skip to content

sessions: add pinned sidebar section#310266

Merged
hawkticehurst merged 2 commits into
microsoft:mainfrom
hawkticehurst:agents/update-sidebar-pinned-chats-label
Apr 15, 2026
Merged

sessions: add pinned sidebar section#310266
hawkticehurst merged 2 commits into
microsoft:mainfrom
hawkticehurst:agents/update-sidebar-pinned-chats-label

Conversation

@hawkticehurst
Copy link
Copy Markdown
Member

@hawkticehurst hawkticehurst commented Apr 15, 2026

Summary

Related to #310018

  • render pinned chats under a dedicated Pinned section header in the sessions sidebar
  • reuse the existing section-header presentation so the label stays uppercase like workspace and folder headers
  • keep the pinned section toolbar limited to Mark All as Done, without workspace-specific actions like New Session
  • add grouping tests and update the sessions layout spec
Screenshot 2026-04-15 at 6 08 18 PM Screenshot 2026-04-15 at 6 08 25 PM

Notes

  • compile-check and hygiene passed in this environment
  • the targeted Electron-backed unit test bootstrap failed in this CLI environment before reaching the sessions code (app.setPath on an undefined Electron app)

Copilot AI review requested due to automatic review settings April 15, 2026 22:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a dedicated “Pinned” section to the Sessions sidebar list so pinned chats render under the same section-header UI pattern as other sections, while keeping section actions appropriate for pinned content.

Changes:

  • Introduce groupSessionsForList(...) helper to centralize sorting/grouping with pinned + archived handling.
  • Render pinned sessions as a top “Pinned” section (using section headers) and ensure pinned sections don’t get workspace-only toolbar actions.
  • Add unit tests for pinned grouping behavior and update the Sessions layout spec.

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/test/browser/sessionsList.test.ts Adds test coverage for pinned/archived grouping via groupSessionsForList.
src/vs/sessions/contrib/sessions/browser/views/sessionsViewActions.ts Adjusts archive confirmation messaging for the new pinned section behavior.
src/vs/sessions/contrib/sessions/browser/views/sessionsList.ts Refactors list building to use groupSessionsForList and introduces a dedicated pinned section.
src/vs/sessions/LAYOUT.md Documents the new pinned section behavior and records it in revision history.

Comment thread src/vs/sessions/contrib/sessions/browser/views/sessionsViewActions.ts Outdated
Yoyokrazy
Yoyokrazy previously approved these changes Apr 15, 2026
hawkticehurst and others added 2 commits April 15, 2026 18:50
Render pinned chats as a real section in the sessions sidebar so they inherit the standard uppercase header styling and only expose the bulk done action.

Also add helper coverage for the new section grouping behavior and document the pinned section in the sessions layout spec.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Extract the pinned-vs-workspace archive confirmation message selection into a small helper to keep ArchiveSectionAction readable.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@hawkticehurst hawkticehurst force-pushed the agents/update-sidebar-pinned-chats-label branch from 647c5b7 to caddcbf Compare April 15, 2026 22:50
@hawkticehurst hawkticehurst merged commit 3ea09a0 into microsoft:main Apr 15, 2026
25 of 26 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.117.0 milestone Apr 15, 2026
@hawkticehurst hawkticehurst deleted the agents/update-sidebar-pinned-chats-label branch April 22, 2026 21:56
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.

3 participants