From 02bfc5ff66704863ff359d395910e5cef59f1a13 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 8 Jun 2026 12:50:21 +0200 Subject: [PATCH 1/2] sessions: surface archived state in session header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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> --- .../contrib/sessions/browser/sessionsActions.ts | 6 +++--- .../browser/views/sessionsViewActions.ts | 16 ++++++---------- .../sessions/browser/sessionsListModelService.ts | 5 ++++- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/vs/sessions/contrib/sessions/browser/sessionsActions.ts b/src/vs/sessions/contrib/sessions/browser/sessionsActions.ts index 5f5ad80057c92d..4eee1fd50e9505 100644 --- a/src/vs/sessions/contrib/sessions/browser/sessionsActions.ts +++ b/src/vs/sessions/contrib/sessions/browser/sessionsActions.ts @@ -17,7 +17,7 @@ import { IQuickInputService, IQuickPickItem, IQuickPickSeparator } from '../../. import { EditorAreaFocusContext, IsAuxiliaryWindowContext, IsSessionsWindowContext } from '../../../../workbench/common/contextkeys.js'; import { Menus } from '../../../browser/menus.js'; import { SessionsCategories } from '../../../common/categories.js'; -import { CanGoBackContext, CanGoForwardContext, ChatSessionProviderIdContext, MultipleSessionsVisibleContext, SessionIsCreatedContext, SessionIsMaximizedContext, SessionIsStickyContext, SessionsFocusContext, SessionSupportsMultipleChatsContext, SessionsWelcomeVisibleContext } from '../../../common/contextkeys.js'; +import { CanGoBackContext, CanGoForwardContext, ChatSessionProviderIdContext, MultipleSessionsVisibleContext, SessionIsArchivedContext, SessionIsCreatedContext, SessionIsMaximizedContext, SessionIsStickyContext, SessionsFocusContext, SessionSupportsMultipleChatsContext, SessionsWelcomeVisibleContext } from '../../../common/contextkeys.js'; import { ANY_AGENT_HOST_PROVIDER_RE } from '../../../common/agentHostSessionsProvider.js'; import { IActiveSession, ISessionsManagementService } from '../../../services/sessions/common/sessionsManagement.js'; import { ISessionsViewService } from '../../../browser/sessionsViewService.js'; @@ -354,7 +354,7 @@ registerAction2(class AddChatToSessionBarAction extends Action2 { icon: Codicon.add, menu: { id: Menus.SessionBarToolbar, - when: ContextKeyExpr.and(SessionIsCreatedContext, SessionSupportsMultipleChatsContext), + when: ContextKeyExpr.and(SessionIsCreatedContext, SessionSupportsMultipleChatsContext, SessionIsArchivedContext.negate()), group: 'navigation', order: 10, }, @@ -388,7 +388,7 @@ registerAction2(class TogglePinSessionAction extends Action2 { id: Menus.SessionBarToolbar, group: '1_session', order: 10, - when: SessionIsCreatedContext, + when: ContextKeyExpr.and(SessionIsCreatedContext, SessionIsArchivedContext.negate()), }, }); } diff --git a/src/vs/sessions/contrib/sessions/browser/views/sessionsViewActions.ts b/src/vs/sessions/contrib/sessions/browser/views/sessionsViewActions.ts index f1c58ac80e9b19..7d2f32df6c5f65 100644 --- a/src/vs/sessions/contrib/sessions/browser/views/sessionsViewActions.ts +++ b/src/vs/sessions/contrib/sessions/browser/views/sessionsViewActions.ts @@ -17,10 +17,10 @@ import { IStorageService, StorageScope, StorageTarget } from '../../../../../pla import { KeybindingsRegistry, KeybindingWeight } from '../../../../../platform/keybinding/common/keybindingsRegistry.js'; import { IViewsService } from '../../../../../workbench/services/views/common/viewsService.js'; import { CLOSE_MOBILE_SIDEBAR_DRAWER_COMMAND_ID } from '../../../../browser/workbench.js'; -import { EditorsVisibleContext, EditorAreaFocusContext, IsAuxiliaryWindowContext, IsSessionsWindowContext } from '../../../../../workbench/common/contextkeys.js'; +import { EditorsVisibleContext, EditorAreaFocusContext, IsSessionsWindowContext } from '../../../../../workbench/common/contextkeys.js'; import { ANY_AGENT_HOST_PROVIDER_RE } from '../../../../common/agentHostSessionsProvider.js'; import { SessionsCategories } from '../../../../common/categories.js'; -import { ChatSessionProviderIdContext, IsActiveSessionArchivedContext, IsNewChatSessionContext, SessionIsArchivedContext, SessionIsReadContext, SessionsWelcomeVisibleContext } from '../../../../common/contextkeys.js'; +import { ChatSessionProviderIdContext, IsActiveSessionArchivedContext, IsNewChatSessionContext, SessionIsArchivedContext, SessionIsReadContext } from '../../../../common/contextkeys.js'; import { SessionItemToolbarMenuId, SessionItemContextMenuId, SessionSectionToolbarMenuId, SessionSectionTypeContext, IsSessionPinnedContext, SessionsGrouping, SessionsSorting, ISessionSection } from './sessionsList.js'; import { ISession, SessionStatus } from '../../../../services/sessions/common/session.js'; import { IsWorkspaceGroupCappedContext, SessionsViewFilterOptionsSubMenu, SessionsViewFilterSubMenu, SessionsViewGroupingContext, SessionsViewId, SessionsView, SessionsViewSortingContext, openSessionToTheSide } from './sessionsView.js'; @@ -621,14 +621,10 @@ registerAction2(class UnarchiveSessionAction extends Action2 { order: 2, when: ContextKeyExpr.equals(SessionIsArchivedContext.key, true), }, { - id: Menus.CommandCenter, - order: 103, - when: ContextKeyExpr.and( - IsAuxiliaryWindowContext.negate(), - SessionsWelcomeVisibleContext.negate(), - IsNewChatSessionContext.negate(), - IsActiveSessionArchivedContext - ) + id: Menus.SessionBarToolbar, + group: 'navigation', + order: 5, + when: ContextKeyExpr.equals(SessionIsArchivedContext.key, true), }] }); } diff --git a/src/vs/sessions/services/sessions/browser/sessionsListModelService.ts b/src/vs/sessions/services/sessions/browser/sessionsListModelService.ts index 4c9a60d8f28447..52b85309824923 100644 --- a/src/vs/sessions/services/sessions/browser/sessionsListModelService.ts +++ b/src/vs/sessions/services/sessions/browser/sessionsListModelService.ts @@ -208,10 +208,13 @@ export class SessionsListModelService extends Disposable implements ISessionsLis case SessionStatus.Error: return { ...Codicon.error, color: themeColorFromId('errorForeground') }; default: + if (isArchived) { + return { ...Codicon.passFilled, color: themeColorFromId('agentSessionReadIndicator.foreground') }; + } if (pullRequestIcon) { return pullRequestIcon; } - if (!isRead && !isArchived) { + if (!isRead) { return { ...Codicon.circleFilled, color: themeColorFromId('textLink.foreground') }; } return { ...Codicon.circleSmallFilled, color: themeColorFromId('agentSessionReadIndicator.foreground') }; From d249314aac6d3f9a33f7878f8380d4b5369307e1 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 8 Jun 2026 12:56:37 +0200 Subject: [PATCH 2/2] sessions: show Mark as Done in session header toolbar 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> --- .../contrib/sessions/browser/views/sessionsViewActions.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vs/sessions/contrib/sessions/browser/views/sessionsViewActions.ts b/src/vs/sessions/contrib/sessions/browser/views/sessionsViewActions.ts index 7d2f32df6c5f65..e393d87e0d13fb 100644 --- a/src/vs/sessions/contrib/sessions/browser/views/sessionsViewActions.ts +++ b/src/vs/sessions/contrib/sessions/browser/views/sessionsViewActions.ts @@ -589,6 +589,11 @@ registerAction2(class ArchiveSessionAction extends Action2 { group: '1_edit', order: 2, when: ContextKeyExpr.equals(SessionIsArchivedContext.key, false), + }, { + id: Menus.SessionBarToolbar, + group: 'navigation', + order: 15, + when: ContextKeyExpr.equals(SessionIsArchivedContext.key, false), }] }); }