Skip to content

sessions: surface archived state in session header#320392

Merged
sandy081 merged 2 commits into
mainfrom
sandy081/sessions-archived-session-ui
Jun 8, 2026
Merged

sessions: surface archived state in session header#320392
sandy081 merged 2 commits into
mainfrom
sandy081/sessions-archived-session-ui

Conversation

@sandy081
Copy link
Copy Markdown
Member

@sandy081 sandy081 commented Jun 8, 2026

What

In the Agents window, an archived ("done") session is currently almost invisible — the only signals are missing actions and the Restore button hidden away in the title bar's command center.

This PR consolidates the archived-session UI on the session header:

  • Distinct "done" glyph in the status icon. getStatusIcon now returns Codicon.passFilled (in the muted read-indicator color) for archived sessions, instead of reusing the plain read dot. Applies wherever the shared status icon is used (header, sessions list, picker).
  • Restore action moved to the session header toolbar. Previously contributed to Menus.CommandCenter (title bar pill area); now contributed to Menus.SessionBarToolbar, navigation group (order 5), so it sits where New Chat would otherwise be. Gated by the session-scoped SessionIsArchivedContext, which is the right scope for a per-session header toolbar.
  • Hide New Chat and Pin/Unpin in the header when archived. These actions don't apply to a done session — SessionIsArchivedContext.negate() added to both when clauses.

Why

A done session now reads as done at a glance (check glyph in the header), and the Restore affordance lives next to the session it acts on, rather than across the window in the title bar. The header toolbar stays focused on actions that are actually meaningful for the current state.

Notes for reviewers

  • No new menu IDs or context keys — reuses the existing per-session SessionIsArchivedContext already bound in sessionView.ts (and used elsewhere for header context-menu gating).
  • The Restore action still appears in the sessions-list per-item toolbar and the list item context menu (unchanged); only the title-bar command-center contribution moved.
  • Title text is intentionally not dimmed — the glyph + hidden-actions combination conveys the state without changing typography.
  • Type-check (compile-check-ts-native) and layers check both pass.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

- Show a distinct "done" glyph (check) for archived sessions in the
  shared status icon instead of reusing the read dot, so the terminal
  state is visible in the session header (and anywhere else that uses
  the shared status icon).
- Move the Restore action from the title bar command center to the
  session header toolbar (navigation group, next to where New Chat
  would sit), gated by the session-scoped SessionIsArchivedContext.
- Hide the New Chat and Pin/Unpin actions in the session header
  toolbar when the session is archived — they don't apply to a done
  session and would otherwise clutter the header.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 8, 2026 10:51
@vs-code-engineering
Copy link
Copy Markdown
Contributor

vs-code-engineering Bot commented Jun 8, 2026

📬 CODENOTIFY

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

@lszomoru

Matched files:

  • src/vs/sessions/services/sessions/browser/sessionsListModelService.ts

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

This PR improves the Agents window “done/archived” session affordances by making the archived state visible directly in the session header and aligning the header toolbar to only show actions that apply to an archived session.

Changes:

  • Update the shared session status icon logic to render a distinct “done” glyph for archived sessions.
  • Move the “Restore” action from the title bar command center into the session header toolbar (SessionBarToolbar).
  • Hide “New Chat” and “Pin/Unpin” header toolbar actions when the session is archived.
Show a summary per file
File Description
src/vs/sessions/services/sessions/browser/sessionsListModelService.ts Adds an archived-state-specific status icon (passFilled) in the shared status icon resolver.
src/vs/sessions/contrib/sessions/browser/views/sessionsViewActions.ts Moves the Restore (unarchive) action contribution from CommandCenter to the session header toolbar menu.
src/vs/sessions/contrib/sessions/browser/sessionsActions.ts Gates New Chat + Pin/Unpin header toolbar actions behind SessionIsArchivedContext.negate().

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 1

Comment thread src/vs/sessions/contrib/sessions/browser/sessionsActions.ts
Adds the Archive Session action (Mark as Done) to the per-session header
toolbar after the New Chat action, hidden when the session is already
archived.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sandy081 sandy081 force-pushed the sandy081/sessions-archived-session-ui branch from 3f8f264 to d249314 Compare June 8, 2026 10:56
@sandy081 sandy081 merged commit e3f63e6 into main Jun 8, 2026
25 checks passed
@sandy081 sandy081 deleted the sandy081/sessions-archived-session-ui branch June 8, 2026 12:36
@vs-code-engineering vs-code-engineering Bot added this to the 1.125.0 milestone Jun 8, 2026
@sandy081 sandy081 added the ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch label Jun 8, 2026
@vs-code-engineering vs-code-engineering Bot added release-cherry-pick Automated cherry-pick between release and main branches and removed ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch labels Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-cherry-pick Automated cherry-pick between release and main branches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants