Skip to content

sessions: allow meaningful drops between Inbox groups - #347708

Merged
Megan Rogge (meganrogge) merged 3 commits into
mainfrom
agents/fix-vscode-issue-346934
Nov 11, 2026
Merged

Megan Rogge (meganrogge) merged 3 commits into
mainfrom
agents/fix-vscode-issue-346934

Conversation

@meganrogge

Copy link
Copy Markdown
Collaborator

Fixes #346934

Allows sessions to be dragged between Inbox-mode groups when the destination represents a meaningful action:

  • Drop onto On hold, Cleared, Pinned, or Archived to apply the corresponding action.
  • Resume held, cleared, pinned, or archived sessions into Inbox, Working, or Ready to merge only when their current activity belongs there.
  • Reuse existing triage commands, including their announcements and Undo behavior. Preserve saved custom-group memberships and manual ordering.
  • Reject no-op reordering, incompatible bulk drops, and individual comparison-participant moves. Provider-owned nested chat moves are unchanged.

Updates accessibility help with the supported drops and existing keyboard alternatives.

Validation

  • corepack pnpm run build-fast --client-only — passed.
  • ./scripts/test.sh --run src/vs/sessions/contrib/sessions/test/browser/sessionsList.test.ts --grep 'drag and drop' --reporter dot — 24 passed.
  • ./scripts/test.sh --run src/vs/sessions/contrib/sessions/test/browser/sessionsListChatMoveDnd.test.ts --run src/vs/sessions/contrib/sessions/test/browser/sessionsViewMenu.test.ts --run src/vs/sessions/contrib/chat/test/browser/sessionsChatAccessibilityHelp.test.ts --reporter dot — 148 passed.
  • corepack pnpm run typecheck-client — passed.
  • corepack pnpm run valid-layers-check — passed.
  • corepack pnpm run eslint src/vs/workbench/contrib/sessions/browser/views/sessionsList.ts src/vs/workbench/contrib/sessions/common/sessionCommands.ts src/vs/sessions/contrib/sessions/browser/views/sessionsViewActions.ts src/vs/sessions/contrib/chat/browser/sessionsChatAccessibilityHelp.ts src/vs/sessions/contrib/sessions/test/browser/sessionsList.test.ts — passed.

The Electron tests dispatch drag events through the rendered Sessions list. Manual end-to-end testing with a live provider and a screen reader was not performed.

Manual testing

  1. In the Agents window, choose Grouping > Inbox Mode.
  2. Use the existing actions to create On hold and Cleared categories, then drag sessions onto their headers and session rows. Try multiple selected sessions and Undo.
  3. Drag held or cleared sessions back into their activity-derived category. Verify incompatible destinations and same-category reordering are rejected.
  4. Try Pinned and Archived destinations and restoring an archived session. Switch grouping and verify custom groups and ordering remain unchanged.

Fixes #346934. Reuse Inbox triage commands for category drops while preserving custom groups and ordering. Reject activity-incompatible destinations and individual comparison moves.

Co-authored-by: Copilot <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 11, 2026 19:10
@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:

Sandeep Somavarapu (@sandy081)

Matched files:

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

Ladislau Szomoru (@lszomoru)

Matched files:

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

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.

🟡 Changes recommended

Unresolved drag-and-drop issues can skip triage and alter saved groups when grouping changes during restoration, while archived sessions are validated against an incorrect post-restoration classification.

2 open issues
What changed in this PR

Adds action-based drag and drop between Inbox groups in the Agents window, addressing #346934 through the existing session-management commands.

Changes:

  • Supports pinning, archiving, holding, clearing, and activity-compatible resume drops while rejecting no-op reordering and incompatible selections.
  • Reuses triage commands and their announcements and Undo behavior.
  • Adds drag-and-drop tests and updates the list specification and accessibility help.
File Description
src/​vs/​workbench/​contrib/​sessions/​common/​sessionCommands.ts Exports shared Inbox triage command IDs.
src/​vs/​workbench/​contrib/​sessions/​browser/​views/​sessionsList.ts Validates and executes Inbox placement drops.
src/​vs/​sessions/​SESSIONS_LIST.md Documents supported Inbox drop behavior.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsList.test.ts Tests Inbox drops, Undo, and placement restrictions.
src/​vs/​sessions/​contrib/​sessions/​browser/​views/​sessionsViewActions.ts Uses shared IDs for existing triage actions.
src/​vs/​sessions/​contrib/​chat/​browser/​sessionsChatAccessibilityHelp.ts Describes supported drops and keyboard alternatives.

Review effort: Balanced

Validate restored sessions against their prospective attention category and preserve Inbox triage when grouping changes during restoration.

Co-authored-by: Copilot <[email protected]>
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Base: f666c609 Current: 19b9e2f0

No screenshot changes.

Keep Undo coverage for hold drops without requiring a notification when clearing sessions, matching the current main-branch behavior.

Co-authored-by: Copilot <[email protected]>
@meganrogge
Megan Rogge (meganrogge) merged commit 6096cd7 into main Nov 11, 2026
52 of 53 checks passed
@meganrogge
Megan Rogge (meganrogge) deleted the agents/fix-vscode-issue-346934 branch November 11, 2026 20:01
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]>
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.

Inbox mode: Sessions cannot be dragged between groups

4 participants