Skip to content

sessions: fix workspace picker and session options resetting on new chat widget#312072

Merged
connor4312 merged 3 commits intomainfrom
connor4312/fix-new-persist
Apr 23, 2026
Merged

sessions: fix workspace picker and session options resetting on new chat widget#312072
connor4312 merged 3 commits intomainfrom
connor4312/fix-new-persist

Conversation

@connor4312
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 23, 2026 03:37
@connor4312 connor4312 self-assigned this Apr 23, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 improves the Sessions window “New Session” experience by preserving the in-progress (unsent) session instance when navigating away and back, preventing the workspace picker and session configuration from resetting due to new widget instantiation.

Changes:

  • Track and restore a “pending new session” in SessionsManagementService so openNewSessionView can rehydrate UI state from the existing session object.
  • Clear the pending session when the session is unset or after a request is sent.
  • Update NewChatWidget initialization to reuse an already-restored active session and synchronize the workspace picker without triggering a new session creation.
Show a summary per file
File Description
src/vs/sessions/services/sessions/browser/sessionsManagementService.ts Adds _pendingNewSession tracking and restores it when returning to the new-session view.
src/vs/sessions/contrib/chat/browser/newChatViewPane.ts Avoids recreating a new session if one is already active (restored), and syncs the workspace picker accordingly.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 2

Comment thread src/vs/sessions/contrib/chat/browser/newChatViewPane.ts Outdated
…rsist

# Conflicts:
#	src/vs/sessions/services/sessions/browser/sessionsManagementService.ts
@connor4312 connor4312 marked this pull request as ready for review April 23, 2026 15:53
@connor4312 connor4312 enabled auto-merge (squash) April 23, 2026 15:53
@connor4312 connor4312 merged commit 36d37fe into main Apr 23, 2026
53 of 56 checks passed
@connor4312 connor4312 deleted the connor4312/fix-new-persist branch April 23, 2026 16:59
@vs-code-engineering vs-code-engineering Bot added this to the 1.118.0 milestone Apr 23, 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