Surface sessions requiring input in the agents titlebar#324203
Conversation
…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)
Screenshot ChangesBase: 1 insignificant change(s) omitted (≤20 px, Δ≤2). See CI logs for details. Added (28) |
There was a problem hiding this comment.
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). AgentSessionApprovalModelnow classifies approvals viaAgentSessionApprovalKind(Terminal/Question/Other);SessionItemRenderer/SessionsListgain a reusable sectionlessSessionsFlatList, configurable approval line count, hover toggle, and approval events.SessionsTitleBarWidgetrequires-input/approved states, blink animation,BlockedSessionsListdropdown viaIContextViewService,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
|
|
||
| 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). |
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
N sessions require inputpill; a short blink plays when a new session becomes blocked (including the first).Approved N sessionsconfirmation. The dropdown dismisses on Escape or an outside click, and a header action opens the full sessions picker.Validation
npm run typecheck-clientand ESLint clean.BlockedSessionsService(per-session reason + CI precedence) andAgentSessionApprovalModel.