Skip to content

Surface sessions requiring input in the agents titlebar#324203

Merged
benibenj merged 2 commits into
mainfrom
benibenj/surviving-snail
Jul 3, 2026
Merged

Surface sessions requiring input in the agents titlebar#324203
benibenj merged 2 commits into
mainfrom
benibenj/surviving-snail

Conversation

@benibenj

@benibenj benibenj commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Sessions requiring input

Adds a command-center indicator in the agents window that surfaces sessions needing attention when the primary side bar is hidden, and lets you act on them from a dropdown.

Highlights

  • Requires-input pill — when the side bar is hidden and one or more sessions are blocked (need input, failing CI, or unresolved PR comments), the command center shows an orange N sessions require input pill; a short blink plays when a new session becomes blocked (including the first).
  • Context-specific messages — when all blocked sessions share one reason the pill is more specific: requires terminal approval, are failing CI, have questions, have unresolved comments. A mix of reasons falls back to the generic message.
  • Blocked-sessions dropdown — clicking opens a flat list of the blocked sessions (width matched to the command center, kept in sync on resize) with inline Allow buttons; approving shows a transient green Approved N sessions confirmation. The dropdown dismisses on Escape or an outside click, and a header action opens the full sessions picker.
  • Sessions already visible on screen are excluded from the indicator and the list.

Validation

  • npm run typecheck-client and ESLint clean.
  • Unit tests for BlockedSessionsService (per-session reason + CI precedence) and AgentSessionApprovalModel.
  • Component fixtures for the titlebar states (active / requires-input variants / approved) and the blocked-sessions list.

benibenj added 2 commits July 3, 2026 13:01
…essages

- Close the dropdown on Escape or an outside click (contextView onDOMEvent)
- Show a specific titlebar message when all blocked sessions share one reason (terminal approval, failing CI, question, unresolved comments); fall back to the generic 'N sessions require input' for a mix
- Animate the first requires-input appearance (preserve the blink class across redundant re-renders)
Copilot AI review requested due to automatic review settings July 3, 2026 11:33
@benibenj
benibenj enabled auto-merge (squash) July 3, 2026 11:33
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: cc3f68b7 Current: 6aff6ecd

1 insignificant change(s) omitted (≤20 px, Δ≤2). See CI logs for details.

Added (28)

sessions/blockedSessionsList/BlockedSessionsList_Mixed/Dark

current

sessions/blockedSessionsList/BlockedSessionsList_Mixed/Light

current

sessions/blockedSessionsList/BlockedSessionsList_SingleNeedsInput/Dark

current

sessions/blockedSessionsList/BlockedSessionsList_SingleNeedsInput/Light

current

sessions/blockedSessionsList/BlockedSessionsList_Many/Dark

current

sessions/blockedSessionsList/BlockedSessionsList_Many/Light

current

sessions/blockedSessionsList/BlockedSessionsList_OneApproval/Dark

current

sessions/blockedSessionsList/BlockedSessionsList_OneApproval/Light

current

sessions/blockedSessionsList/BlockedSessionsList_TwoApprovals/Dark

current

sessions/blockedSessionsList/BlockedSessionsList_TwoApprovals/Light

current

sessions/blockedSessionsList/BlockedSessionsList_FiveApprovals/Dark

current

sessions/blockedSessionsList/BlockedSessionsList_FiveApprovals/Light

current

sessions/sessionsTitleBarWidget/SessionsTitleBar_ActiveSession/Dark

current

sessions/sessionsTitleBarWidget/SessionsTitleBar_ActiveSession/Light

current

sessions/sessionsTitleBarWidget/SessionsTitleBar_RequiresInput/Dark

current

sessions/sessionsTitleBarWidget/SessionsTitleBar_RequiresInput/Light

current

sessions/sessionsTitleBarWidget/SessionsTitleBar_RequiresInputTerminal/Dark

current

sessions/sessionsTitleBarWidget/SessionsTitleBar_RequiresInputTerminal/Light

current

sessions/sessionsTitleBarWidget/SessionsTitleBar_RequiresInputQuestion/Dark

current

sessions/sessionsTitleBarWidget/SessionsTitleBar_RequiresInputQuestion/Light

current

sessions/sessionsTitleBarWidget/SessionsTitleBar_RequiresInputFailingCI/Dark

current

sessions/sessionsTitleBarWidget/SessionsTitleBar_RequiresInputFailingCI/Light

current

sessions/sessionsTitleBarWidget/SessionsTitleBar_RequiresInputMixed/Dark

current

sessions/sessionsTitleBarWidget/SessionsTitleBar_RequiresInputMixed/Light

current

sessions/sessionsTitleBarWidget/SessionsTitleBar_ApprovedOne/Dark

current

sessions/sessionsTitleBarWidget/SessionsTitleBar_ApprovedOne/Light

current

sessions/sessionsTitleBarWidget/SessionsTitleBar_ApprovedMany/Dark

current

sessions/sessionsTitleBarWidget/SessionsTitleBar_ApprovedMany/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.

Pull request overview

This PR adds a command-center indicator to the Agents window titlebar that surfaces sessions requiring attention when the primary side bar is hidden. A new IBlockedSessionsService detects "blocked" sessions (needs input, failing CI, or unresolved PR comments), and the SessionsTitleBarWidget renders an orange "N sessions require input" pill (with a context-specific message when all reasons match) plus a click-through dropdown of blocked sessions with inline Allow buttons. Approvals surface a transient green "Approved N sessions" confirmation. It fits into the vs/sessions layer, reusing the existing GitHub PR status models and session-row renderer.

Changes:

  • New BlockedSessionsService + contribution and unit tests for blocked-session detection (needs-input/CI/comments, archived/in-progress exclusions, sorting, precedence).
  • AgentSessionApprovalModel now classifies approvals via AgentSessionApprovalKind (Terminal/Question/Other); SessionItemRenderer/SessionsList gain a reusable sectionless SessionsFlatList, configurable approval line count, hover toggle, and approval events.
  • SessionsTitleBarWidget requires-input/approved states, blink animation, BlockedSessionsList dropdown via IContextViewService, SessionActionFeedback, new menu, CSS, docs, and component fixtures.
Show a summary per file
File Description
blockedSessions/browser/blockedSessionsService.ts New service detecting blocked sessions with reasons
blockedSessions/browser/blockedSessions.contribution.ts Registers the new service singleton
blockedSessions/test/browser/blockedSessionsService.test.ts Unit tests for detection/precedence/sorting
chat/browser/agentSessions/agentSessionApprovalModel.ts Adds AgentSessionApprovalKind classification
sessions/browser/views/sessionsList.ts Adds reusable SessionsFlatList, hover/max-line options, approval event
sessions/browser/sessionsTitleBarWidget.ts Requires-input/approved states, dropdown, blink logic
sessions/browser/blockedSessionsList.ts Dropdown wrapper with header toolbar and bounded height
sessions/browser/sessionActionFeedback.ts Rolling 3s approved-count feedback
sessions/browser/media/*.css Orange requires-input, green approved, blink, dropdown styles
sessions/browser/menus.ts Adds BlockedSessionsHeader menu id
sessions/sessions.common.main.ts Imports the new contribution
sessions/LAYOUT.md, SESSIONS_LIST.md Documents new titlebar behavior and flat list
componentFixtures/sessions/*.fixture.ts Fixtures for titlebar states and blocked list; kind added to approval mocks

Review details

  • Files reviewed: 17/17 changed files
  • Comments generated: 4
  • Review effort level: Medium

Comment thread src/vs/sessions/LAYOUT.md

When the primary side bar is hidden and at least one session is **blocked** the widget instead switches to a **requires-input** state (see [Blocked Sessions](#blocked-sessions-center) below).

After the user approves a pending action on a session from the sessions list (e.g. the **Allow** button on an approval row), the widget briefly shows a green "Approved N sessions" confirmation. Each approval within the rolling 3s window increments the count and restarts the countdown; while visible it takes precedence over the requires-input state. Driven by `ISessionActionFeedbackService` (`contrib/sessions`), whose `approvedCount` observable the widget reads.
}),

// Five sessions awaiting approval, spanning short, long single-line and
// multi-line terminal commands (the approval row shows up to three lines).
*/
export class SessionsFlatList extends Disposable {

private static readonly ROW_HEIGHT = 54;
* main {@link SessionsList} but without any sections, groups or workspace
* headers. Only the sessions passed to {@link setSessions} are shown. Used by
* surfaces that need a focused, sectionless view of a specific set of sessions
* (e.g. the titlebar "N blocked" hover).
@benibenj
benibenj merged commit d769f0d into main Jul 3, 2026
30 checks passed
@benibenj
benibenj deleted the benibenj/surviving-snail branch July 3, 2026 11:47
@vs-code-engineering vs-code-engineering Bot added this to the 1.128.0 milestone Jul 3, 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