Repository navigation
sessions: workspaces filter bar in every grouping and list-side scoping - #350603
Draft
Sandeep Somavarapu (sandy081) wants to merge 8 commits into
Draft
Sandeep Somavarapu (sandy081) wants to merge 8 commits into
Sandeep Somavarapu (sandy081) wants to merge 8 commits into
Conversation
Contributor
Screenshot ChangesBase: Errored (3)Fixtures that failed to render — no screenshot was produced.
|
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Remote windows can expose sessions from unrelated workspaces, and draft scoping can include unrelated directories while excluding matching worktrees and missing the session-folder fallback.
2 open issues
What changed in this PR
This PR adds an optional workspace/environment filter bar across all Sessions list groupings and moves workspace filtering into the new editor-window list, allowing providers to retain their full session inventories.
Changes:
- Adds the experimental
sessions.list.workspacesFilter.enabledsetting and shared window-scope ownership. - Applies list-side scope to sessions, comparisons, and pending rows while retaining provider filtering for the legacy list.
- Updates workspace identity matching, picker behavior, documentation, and regression tests.
| File | Description |
|---|---|
src/vs/workbench/services/configuration/test/browser/configurationService.test.ts |
Tests scope overrides and reset behavior. |
src/vs/workbench/services/configuration/common/configuration.ts |
Defines the editable workspace-scope contract. |
src/vs/workbench/services/configuration/browser/configurationService.ts |
Implements editor-window scope overrides. |
src/vs/workbench/services/configuration/browser/agents/agentsWorkspaceContextService.ts |
Adds mutable scope to Agents windows. |
src/vs/workbench/contrib/sessions/test/browser/workspaceFolderRepositories.test.ts |
Adapts tests to explicit inventory-scoping options. |
src/vs/workbench/contrib/sessions/test/browser/views/sessionsWorkbenchScope.test.ts |
Tests shared scope ownership and cleanup. |
src/vs/workbench/contrib/sessions/test/browser/views/sessionsListFilters.test.ts |
Tests URI-aware matching and environment-specific deduplication. |
src/vs/workbench/contrib/sessions/test/browser/editorWindow/editorWindowSessionsProvidersService.test.ts |
Tests full-inventory and legacy-scope transitions. |
src/vs/workbench/contrib/sessions/common/sessionConfig.ts |
Declares the workspace-filter setting ID. |
src/vs/workbench/contrib/sessions/browser/workspaceFolderRepositories.ts |
Supports switching provider scope off. |
src/vs/workbench/contrib/sessions/browser/views/sessionsWorkbenchScope.ts |
Coordinates scope across registered list bars. |
src/vs/workbench/contrib/sessions/browser/views/sessionsView.ts |
Wires list-side filtering and the shared scope bar. |
src/vs/workbench/contrib/sessions/browser/views/sessionsListFilters.ts |
Synchronizes selections and uses URI identity comparisons. |
src/vs/workbench/contrib/sessions/browser/views/sessionsList.ts |
Applies scope across groupings and list operations. |
src/vs/workbench/contrib/sessions/browser/views/sessionsInboxScope.ts |
Generalizes picker labels and workspace choices. |
src/vs/workbench/contrib/sessions/browser/views/pendingSessions.ts |
Uses shared workspace identity matching for pending rows. |
src/vs/workbench/contrib/sessions/browser/sessionScope.ts |
Extracts reusable session-scope matching. |
src/vs/workbench/contrib/sessions/browser/sessionsConfiguration.ts |
Registers the experimental filter-bar setting. |
src/vs/workbench/contrib/sessions/browser/editorWindow/editorWindowSessionsProvidersService.ts |
Connects provider scope to new-list enablement. |
src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHost/agentHostSessionListStoreProjectRoot.test.ts |
Tests agent-host inventory transitions. |
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListStore.ts |
Adds reactive full-inventory listing. |
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListContribution.ts |
Passes list enablement into the host store. |
src/vs/sessions/SESSIONS_LIST.md |
Documents list-side scope and shared bar behavior. |
src/vs/sessions/contrib/sessions/test/browser/sessionsViewMenu.test.ts |
Tests picker choices and grouping-specific labels. |
src/vs/sessions/contrib/sessions/test/browser/sessionsList.test.ts |
Tests list-side scope and strict filtering across groupings. |
src/vs/sessions/contrib/sessions/test/browser/sessionsInboxScope.fixture.ts |
Adapts the fixture to new picker inputs. |
src/vs/sessions/contrib/sessions/test/browser/pendingSessionsList.test.ts |
Tests pending-row filtering with bar and window scopes. |
src/vs/sessions/contrib/sessions/browser/sessions.contribution.ts |
Registers the setting in the Agents window. |
Review effort: Balanced
|
|
||
| this._isSessionsWindow = environmentService.isSessionsWindow; | ||
| this._surfacesAllAgents = chatViewSessionsListService.surfacesAllLocalAgentHostAgents; | ||
| this._listAllSessions = chatViewSessionsListService.enabled; |
Comment on lines
+467
to
+469
| const folder = session.mainChat.read(reader).workspace.read(reader)?.folders[0]; | ||
| if (folder) { | ||
| folders.push(folder.workingDirectory); |
Sandeep Somavarapu (sandy081)
force-pushed
the
sandy081/agents/infra-workspaces-filter
branch
2 times, most recently
from
November 26, 2026 23:17
44291af to
bcc3df9
Compare
Keep complete core provider inventories for the new editor Sessions list and apply window and picker scope in the list. Preserve legacy provider filtering and coordinate picker-selected workbench scope across list instances. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Editor-window providers drop workspace scoping only while both the new Sessions list and sessions.list.workspacesFilter.enabled are on, so getSessions() consumers in folder windows don't change while the setting is off. The setting key now lives in ChatConfiguration so contrib/chat doesn't import contrib/sessions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Store the workspace/environment pick per window (workspace storage), so each window keeps its own pick. - Scope the window from the bar only while it is shown (AI features enabled and not hidden). - Offer the bar's workspaces from the sessions the list includes, before the bar's own pick. - Share one reading of the window's folders and repositories between the providers and the Sessions lists. - Dedupe the folders that scope pending sessions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… and the Agents window Folder and multi-root editor windows keep their own scope, so the bar no longer offers or applies the window's folders there. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Folder windows with sessions.list.workspacesFilter.enabled on show no workspaces bar, so they keep the Environment submenu and environment inclusion instead of following an invisible bar pick. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The workspaces filter pick is now stored per window. Remove the value that earlier builds stored for the whole profile instead of migrating it, so no window starts on another window's pick. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sandeep Somavarapu (sandy081)
force-pushed
the
sandy081/agents/infra-workspaces-filter
branch
from
November 27, 2026 00:28
bcc3df9 to
fb32c81
Compare
Export windowShowsSessionsScopeBar (the Agents window and empty editor windows) and expose it as windowShowsBar, so the workspaces filter bar and Inbox's bar share one rule. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
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
sessions.list.workspacesFilter.enabled(off by default). When on, the "All Workspaces | All Environments" bar shows in every Sessions list grouping, not only Inbox, in the Agents window and in empty editor windows. Folder and multi-root editor windows show no extra bar and keep their own scope. Picking a workspace narrows the list and sets the window's workbench scope; All Workspaces scopes the window to all workspaces. Each window remembers its own pick.chat.viewSessions.sessionsList.enabled) andsessions.list.workspacesFilter.enabledboth on, workspace scoping moves from the session providers into the list: providers list every session and the list narrows to the window's folders (including worktrees), as the Agents window does. The old Chat view list keeps provider filtering.Changes
sessionsWorkbenchScope.ts: single owner of the bar's window scope, through a new editable workspace-context contract implemented by the editorWorkspaceServiceandAgentsWorkspaceContextService. It scopes the window only while the bar is shown (setting on, no folders in the window, AI features enabled and not hidden).sessionScope.ts: sharedgetSessionsInScopematcher used by the list, the picker counts and pending (draft/scheduled) rows.sessionsList.ts,sessionsView.ts,sessionsInboxScope.ts,sessionsListFilters.ts: the bar in all groupings, list-side scope, picker options from the sessions the list includes (before the bar's own pick), the workspace/environment pick stored per window (workspace storage), case-insensitive workspace identity with deduplication within the same environment.workspaceFolderRepositories.ts: one per-window reading of the window's folders and repositories (IWorkspaceFolderRepositories), shared by the providers and the Sessions lists.editorWindowSessionsProvidersService.ts,agentHostSessionList*: providers and the agent host list the full inventory only while the new list and the workspaces filter setting are both on (IChatViewSessionsListService.listsAllSessions); the setting key lives inChatConfiguration.sessionConfig.ts,sessionsConfiguration.tsand the Agentssessions.contribution.ts;SESSIONS_LIST.mdupdated.Notes for reviewers
IEditableWorkspaceContextServicerequiressetWorkbenchScope/resetWorkbenchScope; any other branch adding the same decorator needs to adopt this shape.Validation
pnpm run typecheck-client: passedpnpm run build-fast --client-only: passedpnpm run valid-layers-check: passedpnpm run oxlint <changed files>: passed./scripts/test.sh --runGlob '{vs/workbench/contrib/sessions/test/browser,vs/sessions/contrib/sessions/test/browser,vs/workbench/contrib/chat/test/browser/agentSessions,vs/workbench/services/configuration/test/browser,vs/workbench/contrib/chat/test/common}/**/*.test.js': 10500 passing, 31 pendingWritten by GitHub Copilot on behalf of Sandeep Somavarapu (@sandy081)