automations: fix: preserve view during run archival - #334032
Merged
Ulugbek Abdullaev (ulugbekna) merged 1 commit intoSep 2, 2026
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: bd312c9c-1961-430a-a572-bd4cd6a47441
Copilot started reviewing on behalf of
Ulugbek Abdullaev (ulugbekna)
September 2, 2026 16:18
View session
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Sandeep Somavarapu (@sandy081)Matched files:
Ladislau Szomoru (@lszomoru)Matched files:
|
Dmitriy Vasyura (dmitrivMS)
approved these changes
Sep 2, 2026
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation is localized, provider-neutral, and adequately covered by focused tests.
Review tier: Balanced
Findings: None
What changed in this PR
Preserves active custom views while Sessions reconciles automatic lifecycle changes.
Changes:
- Separates explicit navigation from automatic fallback behavior.
- Reports detached fallback failures and adds focused regression tests.
- Documents the custom-view navigation contract.
| File | Description |
|---|---|
src/vs/sessions/services/sessions/browser/sessionsService.ts |
Adds navigation intent handling. |
src/vs/sessions/services/sessions/test/browser/sessionsManagementService.test.ts |
Covers archival, removal, fallback, and explicit navigation. |
src/vs/sessions/LAYOUT.md |
Documents dismissal behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Ulugbek Abdullaev (ulugbekna)
requested a review
from Sandeep Somavarapu (sandy081)
September 2, 2026 16:35
Ulugbek Abdullaev (ulugbekna)
deleted the
ulugbekna/agents/remove-top-automation-switch-view
branch
September 2, 2026 20:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Preserve the Automations custom view when the underlying active Automation run is archived or when provider-driven session/chat lifecycle changes select a fallback.
Explicit session and chat open actions continue to dismiss the custom view.
Problem
Automation History renders provider-backed sessions while the Sessions grid remains alive behind the full-surface Automations view.
If the underlying active run was archived,
SessionsServicereacted by opening the new-session composer. That automatic fallback used the same navigation path as an explicit user action, so it calledhideCustomView(), navigated away from Automations, and cleared the persisted custom-view selection.Fix
explicitopen actions fromautomaticlifecycle reconciliation.onUnexpectedError.The implementation remains provider-neutral and does not special-case the Automations view ID.
Important behavior
An explicit folder-less New Session action also dismisses the custom view when the hidden grid is already on its empty slot. The no-op automatic fallback remains before open-token acquisition, so it cannot cancel an unrelated pending explicit open.
Tests
Added focused coverage for:
Validation:
npm run typecheck-client./scripts/test.sh --run src/vs/sessions/services/sessions/test/browser/sessionsManagementService.test.tsgit diff --checkManual verification
Repeated the reported sequence in an isolated Agents Code OSS window:
Verified at both the default wide viewport and 1208×768: