Repository navigation
sessions: let the provider own nested session order; stop saving it in the list - #342849
Merged
Sandeep Somavarapu (sandy081) merged 1 commit intoOct 20, 2026
Merged
Sandeep Somavarapu (sandy081) merged 1 commit into
Sandeep Somavarapu (sandy081) merged 1 commit into
Conversation
…n the list 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]>
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Ladislau Szomoru (@lszomoru)Matched files:
|
Contributor
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No actionable defects remain, and focused regression coverage supports the ownership change; reported validation was not independently rerun.
No open issues 🎉
What changed in this PR
Makes providers the sole owner of nested-chat ordering in the Agents window, removing the competing list-owned state that caused reorder resets.
Changes:
- Removes nested-chat order persistence and cleans up the retired storage key.
- Routes reordering exclusively through providers and gates move actions accordingly.
- Adds regression coverage and updates documentation and accessibility help.
| File | Description |
|---|---|
src/vs/sessions/SESSIONS_LIST.md |
Documents provider-owned nested-chat ordering. |
src/vs/sessions/services/sessions/test/browser/sessionsListModelService.test.ts |
Tests idempotent storage cleanup. |
src/vs/sessions/services/sessions/browser/sessionsListModelService.ts |
Removes chat-order APIs and persistence. |
src/vs/sessions/contrib/sessions/test/browser/sessionsListTestUtils.ts |
Removes obsolete chat-order mocks. |
src/vs/sessions/contrib/sessions/test/browser/sessionsListChatMoveDnd.test.ts |
Covers provider reordering, storage writes, and move availability. |
src/vs/sessions/contrib/sessions/test/browser/sessionsList.test.ts |
Removes list-owned ordering tests. |
src/vs/sessions/contrib/sessions/browser/views/sessionsViewActions.ts |
Gates keybindings on directional move availability. |
src/vs/sessions/contrib/sessions/browser/views/sessionsList.ts |
Uses provider ordering and provider-only moves. |
src/vs/sessions/contrib/chat/browser/sessionsChatAccessibilityHelp.ts |
Clarifies when move actions are available. |
Review effort: Balanced
Benjamin Christopher Simmonds (benibenj)
approved these changes
Oct 20, 2026
Ladislau Szomoru (lszomoru)
approved these changes
Oct 20, 2026
Sandeep Somavarapu (sandy081)
deleted the
agents/investigate-drag-and-drop-reset-issue
branch
October 20, 2026 11:16
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.
What
The sessions provider is now the only owner of the order of a session's nested sessions (peer chats). This removes the list-owned nested chat order added in #342591 and keeps the rest of #342591 as it is: placement drops, archive and unarchive, pin and unpin, and date headers.
ISessionsListModelServicedropsgetChatOrder,setChatOrderandclearChatOrder, theChatOrderchange kind, and thesessionsListControl.chatOrderpersistence.sessionsListControl.chatOrderkey (PROFILE scope). The removal is idempotent and works like the other retired list keys, so stale orders, including ones Settings Sync synced, are dropped.session.chatsorder. Sort by Updated still sorts them by update time, as before.sessionChatItem.canMoveUp/canMoveDown, which are bound for the focused nested chat.SESSIONS_LIST.mdand the Agents window accessibility help are updated.Why: the reorder "reset"
Dragging a nested session to reorder it within its session sometimes snapped back to the old order, even with Sort by Created. The order had two owners:
movable.runMove) cleared the list-owned order first, so all earlier list-owned placements snapped back to the provider's order. Block 5 also anchors provider moves in the provider's order, so while a list-owned order was shown, the moved chat landed somewhere other than the drop line.Evidence from an Insiders log investigation (no private data):
session/chatsReordered, and its chat set matched the action (same count, no chats added or removed in between), so the protocol reducer applied it.sessionsListControl.chatOrderkey being added by list-owned drops and removed by each provider drag, in the same session.a fixed c d ewherefixedcan't be moved by the provider, draggingfixedbelowd(list-owned) and theneabovec(provider) rendereda fixed e c d:fixedsnapped back.Follow-ups (out of scope)
movablein root session summaries, so nested sessions of unsubscribed sessions can be reordered.How to test
Validation
./scripts/test.sh --run src/vs/sessions/contrib/sessions/test/browser/sessionsListChatMoveDnd.test.ts --run src/vs/sessions/services/sessions/test/browser/sessionsListModelService.test.ts./scripts/test.sh --reporter dot --runGlob "vs/sessions/**/test/browser/**/*.test.js"(all sessions browser tests, includingsessionsList.test.tsand the DnD suite)npm run typecheck-clientnpm run eslint -- <changed .ts files>npm run precommit(hygiene on the staged files; also ran in the commit hook)npm run transpile-clientNew or changed tests:
chatOrderstorage is written on any drag, checked against the real list model service and storage.Not run: smoke and integration tests, and a manual pass in a dev build.