[cherry-pick] sessions: fix new session context attachments and pickers - #333791
Merged
Megan Rogge (meganrogge) merged 4 commits intoSep 1, 2026
Merged
Conversation
* sessions: fix new session context attachments Show and correctly size issue, pull request, and folder icons in new-session attachment pills. Persist context-only drafts and scope GitHub context browsing to the selected repository. Fixes #333516\nFixes #333523\nFixes #333564\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: address new session attachment feedback Preserve GitHub context icon colors, prevent sent prompts from being re-persisted while attachments clear, and initialize the send button after restoring a retained input model. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: fix send button after reload Defer agent-host model change notifications until the language model catalog has settled, so restored drafts can resolve their pending model and become sendable. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: preserve new session drafts on reload Save draft input during the storage lifecycle and allow Auto-capable providers to send while a remembered explicit model is still hydrating. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix deferred model event disposal Initialize lazy event subscriptions before disposal and update the reviewed new-session screenshot baselines. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace the Issue/PR plus with the same dropdown affordance used by the harness and workspace pickers.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: Disable unavailable session type picker Keep the sole session type visible for context while preventing interaction when no alternative can be selected. Re-enable the picker reactively when another type becomes available.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: Skip disabled harness in onboarding Gate the V2 harness spotlight on the picker interaction context so a visible but disabled sole session type is not presented as an actionable tour step.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Megan Rogge (meganrogge)
September 1, 2026 15:44
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
Review tier: Balanced
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
src/vs/sessions/contrib/chat/browser/sessionTypePicker.ts — This now sets sessionHarnessPickerVisible to false while the single-type pill remains visible.… |
What changed in this PR
Improves the Agents Window’s new-session composer, attachment persistence, picker behavior, and model readiness.
Changes:
- Fixes attachment icons, persistence, GitHub repository scoping, and restored send state.
- Adds consistent picker chevrons and disabled single-type behavior.
- Defers model-change notifications until catalogs settle and hardens event disposal.
| File | Description |
|---|---|
test/componentFixtures/blocks-ci-screenshots.md |
Updates visual baselines. |
src/vs/sessions/contrib/providers/copilotChatSessions/test/browser/copilotChatSessionsProvider.test.ts |
Tests repository-scoped GitHub browsing. |
src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.ts |
Derives repository scope from remote roots. |
src/vs/sessions/contrib/providers/agentHost/test/browser/localAgentHostSessionsProvider.test.ts |
Tests deferred model notifications. |
src/vs/sessions/contrib/providers/agentHost/browser/baseAgentHostSessionsProvider.ts |
Defers model-change events. |
src/vs/sessions/contrib/onboardingTours/test/browser/newSessionViewV2Tour.test.ts |
Tests harness-step gating. |
src/vs/sessions/contrib/onboardingTours/browser/tours/newSessionViewV2Tour.ts |
Gates the harness spotlight. |
src/vs/sessions/contrib/chat/test/browser/sessionWorkspacePicker.test.ts |
Verifies picker chevrons and icons. |
src/vs/sessions/contrib/chat/test/browser/sessionTypePicker.test.ts |
Tests disabled single-type pills. |
src/vs/sessions/contrib/chat/test/browser/newChatWidget.test.ts |
Updates workspace-trigger expectations. |
src/vs/sessions/contrib/chat/test/browser/newChatWidget.fixture.ts |
Expands visual expectations. |
src/vs/sessions/contrib/chat/test/browser/newChatInput.test.ts |
Tests persistence, restoration, and icons. |
src/vs/sessions/contrib/chat/test/browser/modelPicker.test.ts |
Tests sendable pending selections. |
src/vs/sessions/contrib/chat/browser/sessionWorkspacePicker.ts |
Adds compact chevrons and optional icons. |
src/vs/sessions/contrib/chat/browser/sessionTypePicker.ts |
Keeps single-type pills visible but disabled. |
src/vs/sessions/contrib/chat/browser/sessionModelPickerState.ts |
Defines sendable model state. |
src/vs/sessions/contrib/chat/browser/newChatWidget.ts |
Updates new-session pill icons. |
src/vs/sessions/contrib/chat/browser/newChatInput.ts |
Persists drafts and refreshes send state. |
src/vs/sessions/contrib/chat/browser/newChatContextAttachments.ts |
Renders attachment theme icons. |
src/vs/sessions/contrib/chat/browser/media/chatWidget.css |
Sizes compact chevrons. |
src/vs/sessions/contrib/chat/browser/media/chatInput.css |
Prevents folder-icon cropping. |
src/vs/base/test/common/event.test.ts |
Covers listener-free debounce disposal. |
src/vs/base/common/event.ts |
Initializes debounce subscriptions safely. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Screenshot ChangesBase: Changed (37) |
Megan Rogge (meganrogge)
marked this pull request as ready for review
September 1, 2026 16:31
Justin Chen (justschen)
previously approved these changes
Sep 1, 2026
Justin Chen (justschen)
left a comment
Collaborator
There was a problem hiding this comment.
thanks!!
Keep the visibility context true whenever the harness pill is rendered so the V1 tour can start. Gate only the V2 harness step and disabled behavior on a dedicated interactivity context.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Justin Chen (justschen)
approved these changes
Sep 1, 2026
Megan Rogge (meganrogge)
enabled auto-merge (squash)
September 1, 2026 16:57
Karthik Nadig (karthiknadig)
approved these changes
Sep 1, 2026
Megan Rogge (meganrogge)
deleted the
cherry-pick/333575-333603-333608
branch
September 1, 2026 17:48
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.

Cherry-picks #333575, #333608, and #333603 from
main.Summary
Validation
npm run transpile-clientgit diff --check origin/release/1.136...HEAD