Repository navigation
sessions: extend sessions list drag and drop across placements - #342591
Merged
Benjamin Christopher Simmonds (benibenj) merged 5 commits intoOct 19, 2026
Conversation
Resolve every session drop to a destination placement (Pinned, a custom group, an ungrouped section, or Archived) and apply only the archive, pin, and group changes that placement precedence needs. This lets sessions be dragged out of groups into date sections, unpinned, archived (with undo) and restored by dragging, placed at the top of a date section via its header, and moved to the end of the date sections by dropping below the last row. Nested chats can be reordered within their session through a new persisted, list-owned chat order, and dropping a session on a chat row places it after that chat's session. Co-authored-by: Copilot <[email protected]>
Benjamin Christopher Simmonds (benibenj)
enabled auto-merge (squash)
October 19, 2026 16:02
Copilot started reviewing on behalf of
Benjamin Christopher Simmonds (benibenj)
October 19, 2026 16:03
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Sandeep Somavarapu (@sandy081)Matched files:
Ladislau Szomoru (@lszomoru)Matched files:
|
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Placement correctness, selection ordering, and keyboard accessibility remain unresolved.
4 open issues
What changed in this PR
Extends Agents window Sessions list drag and drop across placements and adds persisted nested-chat ordering.
Changes:
- Unifies session moves between pinned, grouped, ungrouped, and archived placements.
- Adds nested-chat reordering per sort mode and archive-with-undo integration.
- Updates tests and the list’s documented behavior.
| File | Description |
|---|---|
src/vs/sessions/SESSIONS_LIST.md |
Documents placement and chat-order contracts. |
src/vs/sessions/services/sessions/browser/sessionsListModelService.ts |
Persists per-sort nested-chat order. |
src/vs/sessions/contrib/sessions/test/browser/sessionsListTestUtils.ts |
Extends drag-and-drop test helpers. |
src/vs/sessions/contrib/sessions/test/browser/sessionsList.test.ts |
Adds placement and chat-reordering tests. |
src/vs/sessions/contrib/sessions/browser/views/sessionsViewActions.ts |
Registers archive-with-undo command. |
src/vs/sessions/contrib/sessions/browser/views/sessionsList.ts |
Implements destination-based moves and chat ordering. |
src/vs/sessions/common/sessionCommands.ts |
Defines the archive-with-undo command identifier. |
Review effort: Balanced
roblourens
previously approved these changes
Oct 19, 2026
Add keyboard Move Up/Move Down actions for nested chats that keep focus on the moved chat. Anchor drops below the last row in an earlier date section when the selection empties the last one, preserve the dragged sessions' display order, and only offer date section drops when date grouping will render the sessions in that section. Co-authored-by: Copilot <[email protected]>
…drop-session-grouping-improvements Combine the placement-based session drops with moving chats and sessions by drag and drop (#342624): provider moves take precedence for chats and single sessions the provider can move, and the list's own placement handles everything else. The provider owns the order of chats it can move, so a provider move clears the list-owned chat order of the sessions involved, and Move Up/Move Down reorder movable chats through the provider like dragging does. Co-authored-by: Copilot <[email protected]>
Contributor
…drop-session-grouping-improvements
Alexandru Dima (alexdima)
previously approved these changes
Oct 19, 2026
#342682 and #342706 both added the IDefaultAccountService import and stub to the Connector authorization test fixture, so main no longer compiles (duplicate identifier). Keep a single copy. Co-authored-by: Copilot <[email protected]>
roblourens
approved these changes
Oct 19, 2026
Benjamin Christopher Simmonds (benibenj)
merged commit Oct 19, 2026
fe9ee64
into
main
49 checks passed
Benjamin Christopher Simmonds (benibenj)
deleted the
benibenj/agents/drag-drop-session-grouping-improvements
branch
October 19, 2026 23:54
Sandeep Somavarapu (sandy081)
added a commit
that referenced
this pull request
Oct 20, 2026
…n the list (#342849) The sessions list kept its own order of a session's nested chats (#342591) next to the order the sessions provider owns. Chats the provider could not move were reordered in the list-owned order, and every provider move then cleared it, so earlier arrangements snapped back. Provider moves were also anchored in the provider's order while the rows showed the list-owned one. Nested chats now render in the provider's order only. A nested chat its provider can't move is not accepted as a drop, Move Up and Move Down are available only for chats the provider can move, and the persisted sessionsListControl.chatOrder key is removed on startup. Co-authored-by: Copilot <[email protected]>
This was referenced Oct 20, 2026
Sandeep Somavarapu (sandy081)
added a commit
that referenced
this pull request
Oct 20, 2026
…on (#343025) Adds a regression test for #340740: a quick chat moved into a custom group can be dragged back onto the Chats section header even when it is the only quick chat, so Chats is empty and renders its placeholder. The drop target itself was fixed by #342591, which resolves drops to placements and lets quick chats return to Chats; its test only covered a populated Chats section. Fixes #340740 Co-authored-by: Copilot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Extends drag and drop in the Agents window Sessions list so that sessions can be moved between all list placements, not only into groups and Pinned.
What changed
Every session drop now resolves to a destination placement: Pinned, a custom group, the session's own ungrouped section (workspace, Recent/Older, Chats, External), or Archived, plus an optional anchor row. A single move function then applies only the state that the list's placement precedence (archived > pinned > group > section) needs: archive or unarchive, pin or unpin, join or leave a group, and the manual sort key. Adding a drop target is one more case that maps the hovered element to a destination. Adding a placement is one more entry in
getPlacementState.New behaviors:
sessionsViewPane.archiveSessionsWithUndocommand. Archived sessions dropped on a section, group, or Pinned are restored first.ISessionsListModelService; chats missing from the order keep their natural position. Dropping a session on a chat row places it after that chat's session.Side effects: comparison groups are no longer offered as targets for membership changes (those drops used to look valid but do nothing). Reorder neighbours now come from all sessions in the anchor's sort scope instead of only visible rows, so drops also work against collapsed sections.
SESSIONS_LIST.mdis updated because the drag-and-drop contract and the persisted list state changed.How to test
In the Agents window Sessions list:
Validation
tsctype check of the changed files: no errors insrc/vs/sessions(run with the main checkout's TypeScript because this worktree'snode_modulescould not be reinstalled).src/vs/sessions/contrib/sessions/test/browser/sessionsList.test.tswere added and updated but not run locally; CI will run them.