Repository navigation
sessions: improve Inbox labels, triage, and section defaults - #347649
Megan Rogge (meganrogge) merged 9 commits into
Conversation
Hide row workspace labels when Inbox is scoped to a specific workspace. Treat restored read completions as historical while preserving unread activity, actionable notifications, and new completions. Co-authored-by: Copilot <[email protected]>
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Ladislau Szomoru (@lszomoru)Matched files:
|
Close dismissed sessions through the session view service, including the last open session. Preserve triage Undo without reopening the session and document the behavior in accessibility help. Co-authored-by: Copilot <[email protected]>
Collapse secondary sections when Inbox becomes populated unless the user has saved a collapse preference. Keep manual expansion across updates and reloads, and ignore Clear from Inbox commands outside Inbox grouping. Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
4 open issues
This makessessionsViewPane.inboxDonea silent no-op whenever the Sessions view isn't available… · New Usingtypeof ... === 'object'as the workspace-scoped predicate is brittle (notably, it also… · New Usingtypeof ... === 'object'as the workspace-scoped predicate is brittle (notably, it also… · New This test asserts against an English substring ('in app') inside anaria-label. That makes the… · New
What changed in this PR
This PR refines Inbox-mode session behavior by reducing redundant workspace labeling when scoped, preserving read completion triage across restarts, and improving Inbox UX with auto-collapsing secondary sections plus regressions tests.
Changes:
- Suppress workspace/location labels in Inbox when the Inbox scope is pinned to a single workspace, restoring them when scope/grouping changes.
- Treat already-read completions restored after restart as historical (Cleared) unless they need attention; keep unread/actionable behavior unchanged.
- Auto-collapse non-primary Inbox sections when Inbox becomes populated, and add/adjust tests for these flows.
| File | Description |
|---|---|
| src/vs/workbench/contrib/sessions/common/sessionAttentionService.ts | Updates the contract doc for historical completions to reflect restart/read behavior. |
| src/vs/workbench/contrib/sessions/browser/views/sessionsList.ts | Adds Inbox workspace-scoped label suppression and Inbox auto-collapse state tracking. |
| src/vs/sessions/contrib/sessions/browser/views/sessionsViewActions.ts | Changes “Clear from Inbox” to only operate in Inbox grouping and to close cleared sessions. |
| src/vs/sessions/contrib/sessions/browser/sessionAttentionService.ts | Introduces a restart-based cutoff for read completions when computing historical status. |
| src/vs/sessions/contrib/sessions/test/browser/sessionsViewMenu.test.ts | Extends tests to validate closing behavior and Inbox-only behavior of Clear. |
| src/vs/sessions/contrib/sessions/test/browser/sessionsList.test.ts | Adds/updates tests for workspace-scoped label hiding and Inbox auto-collapse persistence. |
| src/vs/sessions/contrib/sessions/test/browser/sessionAttentionService.test.ts | Adds restart regression test for read vs unread/actionable completion restoration. |
| src/vs/sessions/contrib/chat/browser/sessionsChatAccessibilityHelp.ts | Documents that Clear-from-Inbox closes sessions and describes Inbox auto-collapse behavior. |
Review effort: Lite
Preserve admitted Inbox history across reading and reloads, without treating read state as dismissal. Expand Working by default when Inbox is empty while preserving manual section choices and explicit focus reveals. Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
Session-clearing regressions can lose unread state or leave detached chats open, while Inbox admission gaps can move untriaged sessions into Cleared.
9 open issues
Clear can close sessions already marked done · New Bulk clear can mark the next unread session as read · New Clearing the active session moves focus out of the list · New Closing an unopened row can cancel another session's open · New Clearing a session leaves detached chat panes open · New Historical completions with PR notifications lack admission markers · New Loading guard can lose admission for unread completions · New Session identity migration drops Inbox admission state · New Undo help fails to explain that Clear closes sessions · New
4 resolved since last review
Usingtypeof ... === 'object'as the workspace-scoped predicate is brittle (notably, it also… Usingtypeof ... === 'object'as the workspace-scoped predicate is brittle (notably, it also… This makessessionsViewPane.inboxDonea silent no-op whenever the Sessions view isn't available… This test asserts against an English substring ('in app') inside anaria-label. That makes the…
Review effort: Max
Use normal Archive/Mark as Done actions and remove the separate Cleared section. Acknowledge explicit Inbox actions without removing sessions merely opened or read, and preserve admission through loading, notification resolution, and identity migration. Co-authored-by: Copilot <[email protected]>
Align the row-action snapshot with the shared archive action and provide chat event stubs required by the sessions list fixture harness. Co-authored-by: Copilot <[email protected]>
Preserve removal of the separate Inbox dismissal command and keep remaining triage actions undoable. Co-authored-by: Copilot <[email protected]> Copilot-Session: 6b3199e6-7d7a-4368-ae89-638d12f7f518
Keep supported Inbox drop destinations while preserving removal of the separate Clear from Inbox action and Cleared section. Align drag-and-drop tests and accessibility help. Co-authored-by: Copilot <[email protected]> Copilot-Session: 6b3199e6-7d7a-4368-ae89-638d12f7f518
5618b3e
into
microsoft:main
Brings in main through sandy081/agents/agents-viewlet-infra db97c77, including #347649 (Inbox labels, triage and section defaults) and #347708. Conflicts: - sessionsViewActions.ts: kept Block 1's version (the actions live in workbench sessionsListActions.ts) and ported main's changes there: removed Clear from Inbox and its cleared message, always count down the triage notification, the Resume/Hold command id constants, the Delete keybinding archives in Inbox mode too, removed the Inbox-only Archive menu items, and Archive shows with AI enabled in every mode. - sessionsList.test.ts: merged the imports. Co-authored-by: Copilot <[email protected]>
…(behind chat.agentsView.enabled) With chat.agentsView.enabled (off by default; reload), an editor window shows the Sessions list in an Agents viewlet above the Explorer, and opens sessions in a chat part beside the editor area: the chat window's session chat surface, which replaces the Chat view and follows workbench.editor.showTabs. Pills open in the main editor area. - The Sessions list shares its state with the Agents window. In a window with folders it lists only their sessions and their repositories' (worktrees), with a Worktree grouping. - Session providers are held only while the viewlet or the chat part shows; the shared list state loads while the loading view shows. - The Sessions list actions move to vs/workbench (sessionsListActions.ts) and register when first shown; main's Inbox changes (#347649) are ported there. - Hidden when AI features are disabled; nothing changes with the setting off. Co-authored-by: Copilot <[email protected]>
…(behind chat.agentsView.enabled) With chat.agentsView.enabled (off by default; reload), an editor window shows the Sessions list in an Agents viewlet above the Explorer, and opens sessions in a chat part beside the editor area: the chat window's session chat surface, which replaces the Chat view and follows workbench.editor.showTabs. Pills open in the main editor area. - The Sessions list shares its state with the Agents window. In a window with folders it lists only their sessions and their repositories' (worktrees), with a Worktree grouping. - Session providers are held only while the viewlet or the chat part shows; the shared list state loads while the loading view shows. - The Sessions list actions move to vs/workbench (sessionsListActions.ts) and register when first shown; main's Inbox changes (#347649) are ported there. - Hidden when AI features are disabled; nothing changes with the setting off. Co-authored-by: Copilot <[email protected]>


Summary
Validation
Passed:
Focused Inbox/menu selection and full list-model suite: 135 passing. Includes five new regressions that reproduced the notification, loading/read, and identity-migration defects before the fixes.
./scripts/test.sh --run src/vs/workbench/contrib/sessions/test/browser/sessionsListModelService.test.ts --run src/vs/sessions/contrib/sessions/test/browser/sessionsViewMenu.test.ts --run src/vs/sessions/contrib/sessions/test/browser/sessionsList.test.ts --grep 'SessionsListModelService|Sessions - View Menu|Inbox|inbox' --reporter dotLatest targeted ESLint and hygiene: passed. The preceding UI revision also passed changed-file ESLint and hygiene.
Earlier Code OSS testing confirmed reading a real session left it in Inbox. The latest action changes are covered by automated tests but have not been retested end to end in OSS. Native application update/restart and provider read-flag persistence were not validated; service-recreation tests cover persisted triage.
Manual testing