Skip to content

[cherry-pick] sessions: fix new session context attachments and pickers - #333791

Merged
Megan Rogge (meganrogge) merged 4 commits into
release/1.136from
cherry-pick/333575-333603-333608
Sep 1, 2026
Merged

[cherry-pick] sessions: fix new session context attachments and pickers#333791
Megan Rogge (meganrogge) merged 4 commits into
release/1.136from
cherry-pick/333575-333603-333608

Conversation

@meganrogge

Copy link
Copy Markdown
Collaborator

Cherry-picks #333575, #333608, and #333603 from main.

Summary

  • Fix new-session context attachment icons, persistence, repository scoping, and restored-model send state
  • Use dropdown chevrons consistently for new-session attachment pills
  • Keep the sole session type visible but disabled, and skip its onboarding spotlight until it becomes interactive

Validation

  • npm run transpile-client
  • 496 affected unit tests passing, 11 pending
  • git diff --check origin/release/1.136...HEAD

* 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 AI balanced review requested due to automatic review settings September 1, 2026 15:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

Review tier: Balanced
Findings: 1 High severity

New issues introduced by this change (1)
Severity Finding
High severity 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.

Comment thread src/vs/sessions/contrib/chat/browser/sessionTypePicker.ts Outdated
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 6b838495 Current: 5cda1d60

Changed (37)

sessions/chat/newInput/newChatInput/WithPet/Dark
Before After
before after
sessions/chat/newInput/newChatInput/WithPet/Light
Before After
before after
sessions/chat/newInput/newChatInput/WithPetAndNotification/Dark
Before After
before after
sessions/chat/newInput/newChatInput/WithPetAndNotification/Light
Before After
before after
sessions/chat/newInput/newChatInput/WithPetAndGettingStartedTip/Dark
Before After
before after
sessions/chat/newInput/newChatInput/WithPetAndGettingStartedTip/Light
Before After
before after
sessions/chat/newInput/newChatInput/WithPetAndSubSessionTip/Dark
Before After
before after
sessions/chat/newInput/newChatInput/WithPetAndSubSessionTip/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionDefault/Dark
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionDefault/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionWorkspacePicker/Dark
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionWorkspacePicker/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionGitHubContextPicker/Dark
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionGitHubContextPicker/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionAttachedContext/Dark
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionAttachedContext/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionRemoteWorkspace/Dark
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionRemoteWorkspace/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionNarrow/Dark
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionNarrow/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionComments/Dark
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionComments/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionTip/Dark
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionTip/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/PromptOptionsLoading/Dark
Before After
before after
sessions/chat/newWidget/newChatWidget/PromptOptionsLoading/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/PromptOptionsStandard/Dark
Before After
before after
sessions/chat/newWidget/newChatWidget/PromptOptionsStandard/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/PromptOptionsGitHubMixed/Dark
Before After
before after
sessions/chat/newWidget/newChatWidget/PromptOptionsGitHubMixed/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/PromptOptionsSelected/Dark
Before After
before after
sessions/chat/newWidget/newChatWidget/PromptOptionsSelected/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/PromptOptionsEditedDisabled/Dark
Before After
before after
sessions/chat/newWidget/newChatWidget/PromptOptionsEditedDisabled/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/PromptOptionsNarrow/Dark
Before After
before after
sessions/chat/newWidget/newChatWidget/PromptOptionsNarrow/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpServersSearch/Light
Before After
before after

@meganrogge
Megan Rogge (meganrogge) marked this pull request as ready for review September 1, 2026 16:31

@justschen Justin Chen (justschen) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@meganrogge
Megan Rogge (meganrogge) merged commit 3bd765c into release/1.136 Sep 1, 2026
37 checks passed
@meganrogge
Megan Rogge (meganrogge) deleted the cherry-pick/333575-333603-333608 branch September 1, 2026 17:48
@vs-code-engineering vs-code-engineering Bot added this to the 1.136.0 milestone Sep 1, 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.

4 participants