Skip to content

sessions: improve Inbox labels, triage, and section defaults - #347649

Merged
Megan Rogge (meganrogge) merged 9 commits into
microsoft:mainfrom
meganrogge:agents/inbox-mode-folder-redundancy-fix
Nov 11, 2026
Merged

Megan Rogge (meganrogge) merged 9 commits into
microsoft:mainfrom
meganrogge:agents/inbox-mode-folder-redundancy-fix

Conversation

@meganrogge

@meganrogge Megan Rogge (meganrogge) commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Hide redundant folder badges and matching accessible location text when Inbox is scoped to a specific workspace. Selecting All or switching grouping restores the labels.
  • Keep initial, already-read history out of Inbox rather than backfilling it after restart. Persist admission for eligible completions so reading, loading, notification resolution, and session identity changes do not silently remove them. Preserve explicit triage decisions.
  • Remove the separate Clear from Inbox action and Cleared section. Use the normal Archive/Mark as Done action, icon, shortcut, and archived-section wording.
  • Acknowledge current Inbox activity on accepted messages and explicit chat/list actions while Inbox is visible, without archiving or closing the session. Opening, selecting, reading, and navigation do not acknowledge it. Acknowledged sessions remain available in ordinary groupings, and new activity can bring them back.
  • Collapse secondary sections by default when Inbox becomes populated. Expand Working by default when Inbox is empty. Preserve manual expansion/collapse choices across updates and reloads, and keep explicit session-focus reveals unchanged.
  • Add regression coverage and update accessibility help and the Inbox persistence contract.

Validation

Passed:

corepack pnpm run build-fast --client-only
corepack pnpm run typecheck-client
corepack pnpm run valid-layers-check

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 dot

Latest targeted ESLint and hygiene: passed. The preceding UI revision also passed changed-file ESLint and hygiene.

corepack pnpm run eslint src/vs/workbench/contrib/sessions/browser/sessionsListModelService.ts src/vs/workbench/contrib/sessions/test/browser/sessionsListModelService.test.ts
corepack pnpm run precommit src/vs/workbench/contrib/sessions/browser/sessionsListModelService.ts src/vs/workbench/contrib/sessions/test/browser/sessionsListModelService.test.ts

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

  1. Select a specific workspace in Inbox. Folder badges should disappear from session rows and their accessible labels. Select All or switch grouping and confirm the labels return.
  2. Open, select, and read an Inbox session. It should remain in Inbox, including after reload. Repeat with an admitted historical completion while loading or while its actionable notification resolves.
  3. Check initial history: already-read completions from before first Inbox activation should not backfill Inbox. Unread historical activity is admitted only if modified today in local time; actionable notifications remain available.
  4. Send a message or invoke an explicit session action in Inbox. Current activity should be acknowledged without closing or archiving the session. Confirm it remains available in ordinary groupings and new activity returns it to Inbox. Verify there is no Clear action or Cleared section.
  5. Use the checkmark (or Archive, according to settings), including with multiple selected sessions. It should use the same archive/done behavior and wording as the normal Sessions list.
  6. With an empty Inbox and no saved preference, Working should expand. Populate Inbox and confirm secondary sections collapse by default. Empty it again and confirm Working expands. Manually expand or collapse a section and verify updates and reloads preserve the choice. Sending a request may still reveal its focused session.
  7. Switch to Workspace, Repository, Environment, or Date grouping. Normal labels and section behavior should be unchanged, and actions there should not acknowledge Inbox activity.

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]>
Copilot AI balanced review requested due to automatic review settings November 11, 2026 15:43
@vs-code-engineering

vs-code-engineering Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

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

Ladislau Szomoru (@lszomoru)

Matched files:

  • src/vs/workbench/contrib/sessions/browser/sessionsListModelService.ts
  • src/vs/workbench/contrib/sessions/common/sessionAttentionService.ts
  • src/vs/workbench/contrib/sessions/common/sessionCommands.ts
  • src/vs/workbench/contrib/sessions/common/sessionInbox.ts

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]>
@meganrogge Megan Rogge (meganrogge) changed the title sessions: fix redundant Inbox folders and read sessions after restart sessions: fix Inbox labels, restored read sessions, and dismissal Nov 11, 2026
@meganrogge Megan Rogge (meganrogge) added this to the 1.147.0 milestone Nov 11, 2026
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]>
@meganrogge Megan Rogge (meganrogge) changed the title sessions: fix Inbox labels, restored read sessions, and dismissal sessions: fix Inbox labels, history, dismissal, and section defaults Nov 11, 2026
@meganrogge
Megan Rogge (meganrogge) marked this pull request as draft November 11, 2026 15:52
@meganrogge Megan Rogge (meganrogge) changed the title sessions: fix Inbox labels, history, dismissal, and section defaults sessions: improve Inbox labels, history, dismissal, and section defaults Nov 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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
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]>
@meganrogge Megan Rogge (meganrogge) changed the title sessions: improve Inbox labels, history, dismissal, and section defaults sessions: improve Inbox labels, triage, and section defaults Nov 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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]>
@meganrogge
Megan Rogge (meganrogge) marked this pull request as ready for review November 11, 2026 18:31
roblourens
roblourens previously approved these changes Nov 11, 2026
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
@meganrogge
Megan Rogge (meganrogge) merged commit 5618b3e into microsoft:main Nov 11, 2026
52 of 53 checks passed
Sandeep Somavarapu (sandy081) added a commit that referenced this pull request Nov 11, 2026
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]>
Sandeep Somavarapu (sandy081) added a commit that referenced this pull request Nov 11, 2026
…(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]>
Sandeep Somavarapu (sandy081) added a commit that referenced this pull request Nov 11, 2026
…(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]>
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.

5 participants