Visitar URL original
Agents window: preview sessions from the command center by mrleemurray · Pull Request #348107 · microsoft/vscode · GitHub
Skip to content

Agents window: preview sessions from the command center - #348107

Merged
Lee Murray (mrleemurray) merged 4 commits into
mainfrom
mrleemurray/agents/agents-window-hover-toggle
Nov 13, 2026
Merged

Lee Murray (mrleemurray) merged 4 commits into
mainfrom
mrleemurray/agents/agents-window-hover-toggle

Conversation

@mrleemurray

@mrleemurray Lee Murray (mrleemurray) commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

This makes switching and responding to agent sessions frictionless from the Agents window command center.

Summary

  • Preview prioritized recent sessions after a short command-center hover, keep the preview open across pointer transfer, and pin it with click, Enter, or Space.
  • Preserve unresolved attention with an initial full message, a compact persistent reminder and count, and a full recent-session list after the initial alert is viewed.
  • Select and retain the current session in the capped preview, scope the context view and focus restoration to its owning window, and respect reduced motion and keyboard navigation.

Issues addressed

Severity Issue Resolution
Medium The dropdown could mount and restore focus in a different window from its command center. Mount the context view in the anchor window's layout container, listen only to that container's layout, and restore focus only within the same document.
Medium An open dropdown could retain the wrong attention mode, close when its final blocked row resolved, or omit the active session beyond the eight-row cap. Replace only the list body when modes change, preserve pin/focus state, fall back to the full preview, and reserve a capped row for the active session.
Medium Versioning the acknowledgement storage key would resurface previously ignored attention occurrences. Reuse the existing profile key and read legacy entries as explicit ignores while persisting the new viewed-reminder kind.
Low Keyboard-opened lists could lack a focused row, and automatic hover previews could replace an unrelated context menu. Seed focus from the focused, selected, or first row and suppress only automatic previews while a context menu is visible.
Low Component fixtures did not expose the newly consumed active-pane state, causing their render and Playwright checks to fail. Extend the affected fixture service mocks with active-pane state.

Validation

Command Result
pnpm run build-fast --client-only Passed on the rebased branch.
./scripts/test.sh --reporter dot --isolate --workers 2 --run src/vs/sessions/contrib/chat/test/browser/sessionsChatAccessibilityHelp.test.ts --run src/vs/sessions/contrib/sessions/test/browser/blockedSessionsIndicatorModel.test.ts --run src/vs/sessions/contrib/sessions/test/browser/sessionsList.test.ts --run src/vs/sessions/contrib/sessions/test/browser/sessionsTitleBarWidget.test.ts --run src/vs/sessions/contrib/sessions/test/browser/sessionsTitleBarWidgetRemoteHost.test.ts Passed: all five files passed independently, 690 tests total.
pnpm run typecheck-client Passed.
pnpm run oxlint --changed-since origin/main Passed for all changed TypeScript files.
pnpm run hygiene --changed-since origin/main Passed for all changed files.
pnpm run stylelint src/vs/sessions/contrib/sessions/browser/media/blockedSessionsList.css src/vs/sessions/contrib/sessions/browser/media/sessionsTitleBarWidget.css Passed for both changed stylesheets.
pnpm run valid-layers-check Passed.
pnpm run check-cyclic-dependencies Passed: no cycles in 11,618 files.
git diff --check origin/main...HEAD Passed.
Component fixture Screenshots & Tests CI Passed: 148 affected renders and all nine Playwright tests completed successfully.

Visual evidence

Command-center hover preview

1200×800 desktop Agents window, light theme, same profile and workspace, captured 150 ms after hovering the same command-center position.

Before After
Before: hovering the command center leaves the current view unchanged After: hovering the command center opens the recent sessions preview

Review status

  • Unresolved actionable findings: None
  • Residual risks: Phone/touch interaction and OS-level screen reader narration were not manually exercised; keyboard behavior, ARIA state, reduced motion, and auxiliary-window focus are covered by unit tests.

Open a recent-session preview on command-center hover, pin it on activation, and preserve focus across dismissal. Keep unresolved session reminders visible and mark the active session in the preview.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 13, 2026 10:21
@vs-code-engineering

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/contextkeys.ts

Ladislau Szomoru (@lszomoru)

Matched files:

  • src/vs/workbench/contrib/sessions/common/contextkeys.ts

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 4998a22d Current: 8352da5c

Changed (8)

sessions/blockedSessionsList/BlockedSessionsList_Mixed/Light
Before After
before after
sessions/blockedSessionsList/BlockedSessionsList_SingleNeedsInput/Light
Before After
before after
sessions/blockedSessionsList/BlockedSessionsList_Many/Light
Before After
before after
sessions/blockedSessionsList/BlockedSessionsList_OneApproval/Light
Before After
before after
sessions/blockedSessionsList/BlockedSessionsList_TwoApprovals/Light
Before After
before after
sessions/blockedSessionsList/BlockedSessionsList_FiveApprovals/Light
Before After
before after
sessions/blockedSessionsList/BlockedSessionsList_OneFixCI/Light
Before After
before after
sessions/blockedSessionsList/BlockedSessionsList_FixCIAndApproval/Light
Before After
before after

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 regressions can leave previews suppressed or stale, make empty-history activation inert, omit approval feedback, and overwrite cross-window ignore state.

5 open issues
What changed in this PR

Adds session previews to the Agents window command center, reusing the shared session list to support quick switching and persistent reminders for unresolved attention requests.

Changes:

  • Adds hover previews that can be pinned with click, Enter, or Space, with window-local focus handling and reduced-motion support.
  • Separates initial attention alerts from viewed reminders while preserving stored ignores.
  • Extends list selection, interaction tests, and accessibility help for the new preview behavior.
File Description
src/​vs/​workbench/​contrib/​sessions/​common/​contextkeys.ts Renames the dropdown visibility context key.
src/​vs/​workbench/​contrib/​sessions/​browser/​views/​sessionsList.ts Adds active-session selection, hover notifications, and initial row focus.
src/​vs/​workbench/​contrib/​sessions/​browser/​menus.ts Adds command-center header and row menu IDs.
src/​vs/​sessions/​test/​browser/​testContextViewService.ts Supports explicit host containers in tests.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsTitleBarWidgetRemoteHost.test.ts Updates remote-host test dependencies.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsTitleBarWidget.test.ts Covers preview interactions, mode changes, and window-local behavior.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsList.test.ts Tests active-session selection and initial focus.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​blockedSessionsIndicatorModel.test.ts Tests viewed reminders and acknowledgement persistence.
src/​vs/​sessions/​contrib/​sessions/​browser/​sessionsTitleBarWidget.ts Implements preview lifecycle, pinning, prioritization, and reminder presentation.
src/​vs/​sessions/​contrib/​sessions/​browser/​media/​sessionsTitleBarWidget.css Styles open states and attention reminders.
src/​vs/​sessions/​contrib/​sessions/​browser/​media/​blockedSessionsList.css Shares dropdown styling and adds motion-aware transitions.
src/​vs/​sessions/​contrib/​sessions/​browser/​blockedSessionsList.ts Shares list composition between ordinary and blocked previews.
src/​vs/​sessions/​contrib/​sessions/​browser/​blockedSessionsIndicatorModel.ts Distinguishes viewed reminders from explicit ignores.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​sessionsWorkbenchFixtureUtils.ts Updates attention-model fixture observables.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​sessionsChatAccessibilityHelp.test.ts Checks the new preview and reminder guidance.
src/​vs/​sessions/​contrib/​chat/​browser/​sessionsChatAccessibilityHelp.ts Documents preview interactions and attention states.

Review effort: Balanced

Model the active grid pane in Sessions fixture services so the command center can derive its current-session state during component rendering.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Handle cross-window acknowledgement races and keep command-center previews reactive to session state. Preserve context-menu and picker behavior for empty results.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Provide recent-session histories in title bar fixtures and remote-host tests now that preview contents are derived reactively.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mrleemurray
Lee Murray (mrleemurray) added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit 6f6d54f Nov 13, 2026
37 of 38 checks passed
@mrleemurray
Lee Murray (mrleemurray) deleted the mrleemurray/agents/agents-window-hover-toggle branch November 13, 2026 11:55
@vs-code-engineering vs-code-engineering Bot added this to the 1.147.0 milestone Nov 13, 2026
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.

3 participants