Repository navigation
sessions: keep automation cards running until history appears - #347444
Conversation
Hide unresolved provider bookkeeping from run history while preserving it for duplicate-start, cancellation, and recovery semantics. Keep the card and accessibility state running until the real session-backed history entry is presented. Co-authored-by: Copilot <[email protected]>
Avoid treating deleted completed sessions as pending startup, and keep disabled automation accessibility output aligned with the visual Running state. Co-authored-by: Copilot <[email protected]>
Screenshot ChangesBase: Changed (11) |
There was a problem hiding this comment.
🟡 Changes recommended
Valid completed history can leave automation cards stuck in Running with Run now disabled, while accessibility filtering can omit retained-history owner names and guidance.
3 open issues
What changed in this PR
This PR moves local automation startup feedback from provisional history rows to automation cards in the Agents Window, keeping Run disabled until session-backed history is presented.
Changes:
- Track unresolved local runs and presented sessions to control card startup state.
- Align accessibility labels, Accessible View content, and help text with the card-to-history handoff.
- Extend regression coverage for startup, session discovery, deletion, and dispatch feedback.
| File | Description |
|---|---|
src/vs/sessions/contrib/sessions/test/browser/automationsView.test.ts |
Updates startup, handoff, deletion, and accessibility tests. |
src/vs/sessions/contrib/sessions/browser/views/automationsView.ts |
Keeps startup on cards and hides unresolved local history rows. |
src/vs/sessions/contrib/sessions/browser/views/automationsAccessibility.ts |
Updates accessible startup status and history filtering. |
src/vs/sessions/contrib/sessions/browser/views/automationRunProgress.ts |
Adds a shared predicate for local startup presentation. |
Review effort: Max
Exclude terminal sessionless history from startup presentation, reuse one session catalog snapshot in the accessible view, and preserve retained-history guidance during session handoff. Co-authored-by: Copilot <[email protected]>
|
Ben Villalobos (@benvillalobos), a heads-up: a test added here looks like the reason every unit job on main is timing out. What fails: since 495093 ( Mechanism (local repro of all Why PR CI didn't catch it: PR CI runs only the affected tests across 4 workers. Main runs the full suite in one renderer, so a stuck flag only reaches other suites there. Confirmation: agent bisect runs are in flight. 495148 has #347484 alone, and 495149 adds this PR. Results come around 02:10 UTC. Timing and options: the 05:00 UTC releasing insider will include this commit. A minimal test-side fix is being staged (await the frame, or keep the splice outside the faked-timer window), so you can take it or do your own. A revert is staged only as a fallback. The longer-term fix is for
|
The sinon clocks in AutomationsCardsWidget faked requestAnimationFrame. Since #347444, the last setRuns in 'run feedback survives acknowledgement and refresh until the new run session appears' splices a list after the final tick, so scheduleAtNextAnimationFrame sets the window's animFrameRequested flag and requests the frame from the fake clock. restore() drops that frame, the flag never clears, and no later test in the renderer gets an animation frame. In the full single-renderer unit run this times out every later frame waiter, starting with the SessionsList catalogue refresh tests (main CI 495093). Fake only Date and timers in these tests so animation frames stay real. Co-authored-by: Copilot <[email protected]>
The sinon clocks in AutomationsCardsWidget faked requestAnimationFrame. Since #347444, the last setRuns in 'run feedback survives acknowledgement and refresh until the new run session appears' splices a list after the final tick, so scheduleAtNextAnimationFrame sets the window's animFrameRequested flag and requests the frame from the fake clock. restore() drops that frame, the flag never clears, and no later test in the renderer gets an animation frame. In the full single-renderer unit run this times out every later frame waiter, starting with the SessionsList catalogue refresh tests (main CI 495093). Fake only Date and timers in these tests so animation frames stay real. Co-authored-by: Copilot <[email protected]>
|
The agent bisect confirms it. 495148 (#347484 alone, on green
|
…sts (#347524) The sinon clocks in AutomationsCardsWidget faked requestAnimationFrame. Since #347444, the last setRuns in 'run feedback survives acknowledgement and refresh until the new run session appears' splices a list after the final tick, so scheduleAtNextAnimationFrame sets the window's animFrameRequested flag and requests the frame from the fake clock. restore() drops that frame, the flag never clears, and no later test in the renderer gets an animation frame. In the full single-renderer unit run this times out every later frame waiter, starting with the SessionsList catalogue refresh tests (main CI 495093). Fake only Date and timers in these tests so animation frames stay real. Co-authored-by: Copilot <[email protected]>

Motivation
Clicking Run briefly showed provisional history while the Agent Host created the real session, which made the automation card flicker and re-enabled Run too early. This PR keeps startup on the card until the session-backed row is presented, without changing provider-owned execution bookkeeping.
Code stats
Where the change lives
automationsView.test.ts: +127/-32 (60.9%)automationsAccessibility.ts: +41/-24 (24.9%)automationsView.ts: +18/-12 (11.5%)automationRunProgress.ts: +7/-0 (2.7%)Change breakdown
automationRunProgress.ts,automationsAccessibility.ts,automationsView.tsautomationsView.test.tsChanges made
Watch the Before/After proof video
Testing
pnpm run build-fast --client-onlypassed.pnpm run test-browser-no-install --run src/vs/sessions/contrib/sessions/test/browser/automationsView.test.ts --browser chromiumpassed with 178 tests.pnpm run typecheck-clientpassed.pnpm run eslint src/vs/sessions/contrib/sessions/browser/views/automationRunProgress.ts src/vs/sessions/contrib/sessions/browser/views/automationsAccessibility.ts src/vs/sessions/contrib/sessions/browser/views/automationsView.ts src/vs/sessions/contrib/sessions/test/browser/automationsView.test.tspassed.