Skip to content

sessions: add Inbox workspace and environment filters - #347484

Merged
Megan Rogge (meganrogge) merged 1 commit into
mainfrom
agents/inbox-scope-filters
Nov 10, 2026
Merged

Megan Rogge (meganrogge) merged 1 commit into
mainfrom
agents/inbox-scope-filters

Conversation

@meganrogge

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

Copy link
Copy Markdown
Collaborator
Screenshot 2026-11-10 at 5 00 50 PM

Fixes #347488.

Summary

  • Add workspace and environment pickers above the Inbox, using New Session-style anchored dropdowns rather than Quick Pick. Each supports All or one selection.
  • Apply scope to every session category, including Pinned, Working, On hold, Cleared, and Archived. Workspace identity includes its exact URI and execution environment.
  • Remember scope across reloads, retain unavailable selections, preserve other grouping modes, and keep an out-of-scope active conversation open.
  • Remove workspace subgroups from On hold. Include keyboard/focus handling, accessibility help, regression tests, and themed fixtures.

Follow-up to #347385.

Scope boundary and deferred Automations work

These pickers scope Inbox sessions only. They do not scope the Automations catalog or change any automation's workspace, execution environment, schedule, or enabled state.

The Automations entry remains in its existing position below the controls, which can suggest that it is already scoped. Making Automations follow the selected workspace/environment is intentionally deferred and is not part of this PR.

The pickers also do not change the New Session composer's destination or connect remote hosts. Choose All Workspaces and All Environments to clear scope; there is no separate Reset Scope button.

How to test

  1. Switch the Sessions list to Inbox Mode. Open both anchored dropdowns with the mouse or Enter, Space, or Down Arrow; search workspaces and verify Escape returns focus.
  2. Select a workspace and environment. Verify every category, including Pinned, contains only matching sessions. Selecting an incompatible environment resets the workspace to All.
  3. Keep a conversation open while choosing a nonmatching scope: its row should disappear without closing the conversation. An empty scoped Inbox should explain that no activity matches.
  4. Reload and switch grouping modes to verify Inbox scope is remembered independently. Choose both All options to clear it; verify ordinary filters still work.
  5. Open Automations: its catalog should remain unscoped in this PR.

Validation

After rebasing onto latest main:

  • corepack pnpm run gulp compile-client — passed, zero compilation/type errors.

  • The following focused regression selection — 7 passed:

    ./scripts/test.sh --reporter dot \
      --run src/vs/sessions/contrib/sessions/test/browser/sessionsViewMenu.test.ts \
      --run src/vs/sessions/contrib/sessions/test/browser/sessionsList.test.ts \
      --run src/vs/workbench/contrib/sessions/test/browser/views/sessionsListFilters.test.ts \
      --grep 'Inbox scope'
  • git diff --name-only -z origin/main...HEAD | xargs -0 corepack pnpm run precommit — passed for all applicable changed files.

The full test suite and cross-platform UI checks were not run for this final revision.

Filter every Inbox category, including pinned sessions, by an exact workspace and execution environment. Reuse New Session-style dropdowns, preserve scope across reloads, and keep On hold flat.

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

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 1df0ec93 Current: e545dfcf

Added (7)

sessions/sessionsInboxScope/All/Light

current

sessions/sessionsInboxScope/Selected/Light

current

sessions/sessionsInboxScope/Disconnected/Light

current

sessions/sessionsInboxScope/Unavailable/Light

current

sessions/sessionsInboxScope/Narrow/Light

current

sessions/sessionsInboxScope/WorkspaceDropdown/Light

current

sessions/sessionsInboxScope/EnvironmentDropdown/Light

current

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

Scoped comparison summaries still include hidden attempts, and both dropdowns fail to expose their selected option to assistive technology.

2 open issues
What changed in this PR

Adds persistent workspace and environment filters to the Agents Window Inbox, reusing New Session-style dropdowns. Automations remain unscoped, with that work deferred to #347482.

Changes:

  • Applies scope across all Inbox categories while keeping filtered-out conversations open.
  • Removes On hold workspace subgroups and preserves ordinary filtering outside Inbox.
  • Adds keyboard handling, accessibility help, regression tests, and themed fixtures.
File Description
src/​vs/​workbench/​contrib/​sessions/​test/​browser/​views/​sessionsListFilters.test.ts Tests scope identity, persistence, reset, and metadata hydration.
src/​vs/​workbench/​contrib/​sessions/​browser/​views/​sessionsView.ts Integrates scope controls and adjusts filter menus.
src/​vs/​workbench/​contrib/​sessions/​browser/​views/​sessionsListFilters.ts Implements scope matching and persistence.
src/​vs/​workbench/​contrib/​sessions/​browser/​views/​sessionsList.ts Applies scope to rows and comparisons; removes On hold subgroups.
src/​vs/​workbench/​contrib/​sessions/​browser/​views/​sessionsInboxScope.ts Adds workspace and environment dropdown controls.
src/​vs/​workbench/​contrib/​sessions/​browser/​media/​sessionsViewPane.css Styles the scope controls.
src/​vs/​workbench/​contrib/​sessions/​browser/​chat/​sessionEnvironmentPicker.ts Exports shared environment-picker options.
src/​vs/​sessions/​SESSIONS_LIST.md Documents scope behavior and grouping changes.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsViewMenu.test.ts Tests picker interaction, focus, and menu behavior.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsList.test.ts Tests category filtering, hydration, and comparison scope.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsInboxScope.fixture.ts Adds themed fixtures for scope states and dropdowns.
src/​vs/​sessions/​contrib/​chat/​browser/​sessionsChatAccessibilityHelp.ts Documents scope controls and keyboard navigation.

Review effort: Balanced

@meganrogge
Megan Rogge (meganrogge) merged commit bcb5b9c into main Nov 10, 2026
53 of 54 checks passed
@meganrogge
Megan Rogge (meganrogge) deleted the agents/inbox-scope-filters branch November 10, 2026 23:12
Megan Rogge (meganrogge) added a commit that referenced this pull request Nov 10, 2026
<!-- Thank you for submitting a Pull Request. Please:
* Read our Pull Request guidelines:

https://github.com/microsoft/vscode/wiki/How-to-Contribute#pull-requests
* Associate an issue with the Pull Request.
* Ensure that the code is up-to-date with the `main` branch.
* Include a description of the proposed changes and how to test them.
-->

Follow-up to #347484.

## Summary

- Remove the decorative chevrons from the workspace and environment
pickers above Inbox to match the New Session composer.
- Keep the leading icons, labels, dropdown behavior, keyboard
activation, and accessibility attributes unchanged.
- Extend the existing regression test to verify neither picker renders a
chevron.

## How to test

1. Switch the Sessions list to Inbox Mode.
2. Verify both pickers show their leading icon and label without a
trailing chevron.
3. Open and select from each picker with the mouse and keyboard; verify
filtering and focus restoration still work.

## Validation

- `corepack pnpm run gulp compile-client` - passed with zero compilation
errors.
- `./scripts/test.sh --reporter dot --run
src/vs/sessions/contrib/sessions/test/browser/sessionsViewMenu.test.ts
--run src/vs/sessions/contrib/sessions/test/browser/sessionsList.test.ts
--run
src/vs/workbench/contrib/sessions/test/browser/views/sessionsListFilters.test.ts
--grep 'Inbox scope'` - passed, 7 tests.
- `corepack pnpm run eslint
src/vs/workbench/contrib/sessions/browser/views/sessionsInboxScope.ts
src/vs/sessions/contrib/sessions/test/browser/sessionsViewMenu.test.ts`
- passed.
- `git diff --check` - passed.

The new assertion failed before the fix (two chevrons) and passes after
it (zero). Full-suite and manual visual checks were not run.
@bryanchen-d

Copy link
Copy Markdown
Collaborator

Megan Rogge (@meganrogge), a heads-up: main CI has been red since this merged, and this PR is one of the suspects. We haven't confirmed it yet.

What fails: in 495093 (225e6b5944), every unit job (Electron on Linux, Windows and macOS, plus Browser Chromium and WebKit) hits its 30-minute timeout. In all 3 Electron runs, the first failure is Sessions - SessionsList › catalogue refresh scheduling › coalesces provider, catalogue and host invalidations while preserving focus and selection. About 70 failures then cascade into later virtual-time suites. The browser logs show [VirtualTimeProcessor] Run … exceeded maxEvents (100) and leaked VirtualTimeProcessor._park stores, so some timer keeps rescheduling itself under virtual time.

Why this PR is on the list: it's the only change in aadc4c6a07..225e6b5944 that touches sessionsList.ts (the new scope autorun), sessionsListFilters.ts, sessionsInboxScope.ts and sessionsList.test.ts. The last green main CI, 495064 on aadc4c6a07, didn't include it.

What we don't know yet: the PR's own CI passed, but it runs only affected tests across 4 workers, while main runs the full suite in one renderer. sessionsList.test.ts passes locally on 225e6b5944, so the trigger may come from earlier in the full run, or from #347444 or #345368, which landed right after. Three CI runs are bisecting the merges now (results around 02:15 UTC):

Timing: the 05:00 UTC releasing insider will include these commits. If the bisect points here, your fix goes first. A revert is staged as a fallback, and it'll go up for approval around 03:30 UTC if no fix lands by then.

Co-authored with Copilot

@bryanchen-d

Copy link
Copy Markdown
Collaborator

An update to my note above: a local repro now points away from this PR. Running all of vs/sessions/** in one Chromium window reproduces the cascade, and the first faked requestAnimationFrame call comes from an automation-cards test added in #347444. That faked call leaves the shared animation-frame flag stuck, which then hangs catalogue refresh scheduling and every later rAF waiter. The agent bisect runs (495148 with #347484 alone, 495149 with #347444 added) are confirming it, so no action is needed here unless they say otherwise. Sorry for the noise.

Co-authored with Copilot

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.

Add workspace and environment scope pickers to Inbox

5 participants