Skip to content

[pull] main from microsoft:main#1508

Merged
pull[bot] merged 34 commits into
code:mainfrom
microsoft:main
Jul 22, 2026
Merged

[pull] main from microsoft:main#1508
pull[bot] merged 34 commits into
code:mainfrom
microsoft:main

Conversation

@pull

@pull pull Bot commented Jul 22, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

DonJayamanne and others added 15 commits July 22, 2026 10:55
…326938)

* fix(chat): restore last-used agent-host model instead of falling back to Auto

Agent-host chat sessions (e.g. Copilot CLI) publish their model list
asynchronously after the agent host connects. During that cold-start
window the model-restore logic treated an absent remembered/session
model as conclusively unavailable and reset the picker to "Auto" instead
of waiting for the pool to load. This affected new chat editors, the
sidebar chat view, and reopened existing sessions.

Root fix: give agent-host vendors the same "empty results are transient"
grace already applied to Copilot in isLanguageModelVendorAbsenceConclusive,
so a remembered/restored model resolves as `pending` (wait) rather than
`unavailable` (give up) while the agent-host model pool is still loading.
This fixes every restore surface at once (initialize, conversation-restore
and their model-change waiters) and naturally survives the transient empty
resolutions emitted before the real models arrive.

Additional hardening:
- loadRemoteSession: carry the session's known model (with metadata) into
  the restored input state when the live lookup is cold, including through
  a transferred draft, instead of dropping it to undefined.
- syncFromConversationState: keep waiting through transient empty
  agent-host resolutions; only fall back once the pool has loaded without
  the model.

Adds regression tests (verified to fail if the root fix is reverted).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* address review: scope agent-host grace to resolution; revert redundant wait

Addresses two review comments on #326938:

- Relocate the agent-host "empty is transient" grace out of the shared
  isLanguageModelVendorAbsenceConclusive (reverted to original) into
  resolveModelIdentifierFromCatalog, so it applies to model-restore
  resolution only and no longer relaxes cache-retention
  (mergeModelsWithCache) or send-availability. A resolved-empty agent-host
  vendor's cache is evicted again (authoritative), so stale/removed models
  aren't offered. The grace is guarded so it only softens the empty-pool
  case; once the vendor has live models an absent model stays conclusive.

- Revert the syncFromConversationState wait change: with the resolution
  grace, agent-host cold-empty already resolves as `pending`, so the extra
  `|| !hasModelsTargetingSession(...)` branch was redundant and would arm a
  never-firing wait for a non-agent-host contributed session whose provider
  resolved to an authoritatively-empty pool (fallback would never run).

Tests: resolution/restore tests now route through the real catalog resolver
and are verified to fail if the grace is removed; a new mergeModelsWithCache
test locks in that a resolved-empty agent-host cache is evicted.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* review: reuse canonical isAgentHostTarget instead of a bespoke helper

Replace the local isAgentHostVendor helper (in languageModels.ts) with the
existing isAgentHostTarget from chatSessionsService.ts, used directly in
resolveModelIdentifierFromCatalog. The agent-host model vendor id equals the
session type, so isAgentHostTarget classifies it correctly.

This reverts languageModels.ts back to its original form (the PR no longer
touches it) and avoids duplicating agent-host prefix detection. No import
cycle: modelSelection.ts is only consumed by browser-layer input files, so it
is unreachable from chatSessionsService's common-only dependency graph, and
isAgentHostTarget is a runtime function (not a load-time constant).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* style: update tab label font weight for consistency

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Try fix macOS test flake

* try again

* Platform agnostic preseed
…header panes (#326950)

style: add top spacing for progress container in non-merged header panes

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
The workbench only re-checked for a remembered model when its vendor
reported the empty pool as "pending". If the model instead resolved as
"unavailable" (the pool was non-empty but did not yet include it), the
input applied a fallback (Auto) and armed no wait, so the remembered
model was lost when it loaded a moment later.

Restructure `initialize` to arm a single catalog wait whenever a
remembered model has not been honored yet (both the "pending" and the
provisional-fallback cases), settling on the vendor-aware resolution so
the wait cannot linger. Consolidate the three restore waits behind one
`_watchModelChanges` helper.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fix: dispose task problem reporter listener
… host (#326847)

* Adopt AHP 0.6.0 workingDirectories property in agent host

Sync the generated agent host protocol copy to spec version 0.6.0
(agent-host-protocol @ 11f1a65e), which renames the singular
`workingDirectory` on session/chat state to a `workingDirectories`
array in preparation for multiroot session support.

This change is a pure, behaviour-preserving property adoption across all
consumers: sessions continue to use a single working directory. Reads of
a single directory now use `workingDirectories?.[0]`, field-copy sites
pass the array through unchanged, and writes from a single URI produce a
one-element array. No multiroot client support is added here (no
capability advertising, state actions, multi-folder workspaces, or UI);
those land in a follow-up milestone.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address PR review feedback

- Reject the not-yet-supported multiroot working-directory client actions
  (session|chat/workingDirectorySet|Removed) in the handwritten dispatch path
  so a client cannot mutate the synchronized working-directory set without the
  agent actually reconfiguring its directory access. The protocol declarations
  remain; only the operational dispatch is deferred until multiroot lands.
- Compare workingDirectories by array identity (not just the primary entry) in
  the state manager summary-equality check, matching the immutable reducers and
  SessionSummaryNotifier so secondary-directory changes still dirty the summary.
- Update ISessionWithDefaultChat / mergeSessionWithDefaultChat API docs to
  describe a chat's workingDirectories subset overriding or inheriting the
  session's full set, fixing links to the removed singular members.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix agentHost session-filter test for workingDirectories migration

The `sessionAdded notification filters out sessions outside the workspace`
test constructed session summaries with the removed singular `workingDirectory`
field, so the production filter (which now reads `workingDirectories[0]`) saw no
directory and dropped the in-workspace session. Update the two directly-built
summaries to the `workingDirectories` array form.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Migrate test createSession wire calls to workingDirectories

The createSession dispatch handler now reads the working directory from the
renamed `CreateSessionParams.workingDirectories` array (AHP 0.6.0), but several
node integration / e2e test call sites still sent the removed singular
`workingDirectory` field. Since the field is silently ignored, sessions were
created without a working directory and fell back to the default chats folder,
failing the Agent Host E2E workspace/fileOperations/hostFeatures suites across
all providers (wrong cwd cascades into file completions, renames, worktree
resolution, and cd-prefix stripping).

Send `workingDirectories: [dir]` from the shared `createProviderSession` helper
and the remaining direct wire call sites so the requested directory reaches the
session state again. The real VS Code client already sent the array form.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Adopt AHP 0.7.0 primaryWorkingDirectory + requiresPrimary

Re-sync the generated protocol copy to the multiroot spec at 148c716b (spec
version 0.7.0) and adopt the two follow-up changes:

- Capability flag renamed `MultipleWorkingDirectoriesCapability.immutablePrimary`
  -> `requiresPrimary`, with the new "agent needs one directory designated as
  its primary root" semantics. No consumers referenced the old name.
- New optional `primaryWorkingDirectory` field at both the session level
  (CreateSessionParams / SessionMetadata -> SessionState + SessionSummary) and
  the chat level (CreateChatParams / ChatState + ChatSummary). Mirror it through
  the state<->summary projection layer exactly like `workingDirectories`:
  createSessionState / createChatState / chatSummaryFromState /
  mergeSessionWithDefaultChat, plus the state manager's summary projection,
  field-equality check, SessionSummaryNotifier diff, and markSessionPersisted
  propagation. The generated SessionChatUpdated partial-summary merge is
  field-agnostic, so it carries the new field automatically.

Purely additive optional fields; no client multiroot behavior is added
(consumers still read `workingDirectories[0]` as the single effective root).

Also preserve the VS Code-local `CompletionItem.label` field (added in #326807,
ahead of the spec) which the verbatim re-sync would otherwise drop.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Reject unsupported working-directory actions via reconciliation path

Address PR review feedback on the multiroot working-directory action gate:

- Instead of silently dropping the four not-yet-supported
  session|chat/workingDirectorySet|Removed client actions (which never echoed
  the origin, leaving the client's optimistic write-ahead action pending until
  reconnect), emit a rejection envelope through the normal reconciliation path.
  Added AgentHostStateManager.rejectClientAction, which emits an ActionEnvelope
  carrying the original ActionOrigin and a rejectionReason without running the
  reducer (no synchronized state change), so the originating client rolls back
  its optimistic action.
- Guard the write-ahead client reconcile (SessionStateSubscription /
  ChatStateSubscription) so a rejected envelope is never applied to confirmed
  state in any branch — this also prevents a broadcast rejection from leaking
  the rejected action into a non-origin client's state.
- Add a table-driven test covering all four action types asserting no dispatch
  and exactly one rejection envelope preserving the original origin.
- Simplify the create-session working-directory read to
  `URI.parse(params.workingDirectories[0])` now the branch proves index 0 exists.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Refine primaryWorkingDirectory to per-chat read-only (AHP ea279d99)

Re-sync the protocol copy to spec ea279d99 (0.7.0) and adopt the refined
primaryWorkingDirectory design:

- Session has NO primary: `primaryWorkingDirectory` is removed from
  SessionState / SessionSummary. The session is just the equal-peer
  `workingDirectories` set. Dropped all session-level primary handling
  (createSessionState, the SessionSummaryNotifier diff, _toSummary,
  _summaryFieldsEqual, and markSessionPersisted propagation).
- Primary is per-chat, read-only, fixed at chat creation: kept the ChatState
  <-> ChatSummary mirroring (createChatState / chatSummaryFromState) and carry
  the chat's own primary through the session+default-chat composite
  (ISessionWithDefaultChat gains its own primaryWorkingDirectory; the merge no
  longer falls back to a session primary). It is not sent via `session/chatUpdated`
  (the state manager only ever puts status/activity/title in those changes), so
  it never mutates post-creation.
- Inputs `CreateSessionParams.primaryWorkingDirectory` (seeds the default chat's
  primary) and `CreateChatParams.primaryWorkingDirectory` are synced; capability
  `requiresPrimary` unchanged.

Also re-preserve the VS Code-local `CompletionItem.label` field (#326807, ahead
of the spec) that the verbatim re-sync drops.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…kens (#326948)

* perf: consolidate style-override CSS selectors

Merge the duplicate .tab.sticky-compact geometry blocks in tabs.css and collapse the focus selector lists in keyboardFocusOnly.css with :is() (specificity preserved) to reduce the number of matched selector entries.

* style: update surface color tokens and unify font weights across components

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
…anels (#326986)

style: add top margin for compact activity bar in floating panels

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
…ate UI flickering (#326991)

* Cache quota snapshot so missing values in CAPI's snapshot doesn't create UI flickering

* fix compile
Update codicons version to 0.0.46-23 and add new icons to codicons library

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
@pull pull Bot locked and limited conversation to collaborators Jul 22, 2026
Co-authored-by: Dmitriy Vasyura <dmitriv@microsoft.com>
@pull pull Bot added the ⤵️ pull label Jul 22, 2026
dependabot Bot and others added 12 commits July 22, 2026 09:23
…#326898)

Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.2 to 3.1.4.
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](fastify/fast-uri@v3.1.2...v3.1.4)

---
updated-dependencies:
- dependency-name: fast-uri
  dependency-version: 3.1.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Simplify model selection restoration

* Restore chat widget main behavior

* Simplify chat model selection reconciliation

* Simplify model picker architecture
…326974)

* sessions: address Copilot code review feedback on folder Quick Pick

Addresses the 4 review comments from Copilot code review on #326921:

- Carry each recent entry's provider ID through the Quick Pick item and
  pass it to `openNewSession`, so re-picking a folder resolvable by
  multiple providers keeps its previous provider association instead of
  falling back to the first registered one.
- Centralize the workspace-trust gate: `ISessionsService.openNewSession`
  now resolves the workspace and, when it requires trust, prompts before
  creating a session for it (a single gate shared by every path that
  creates a concrete session for a folder). `NewChatWidget` no longer
  duplicates this check itself.
- Add `ISessionsRecentWorkspacesService.getOwnRecentWorkspaces()`,
  restricted to the sessions' own recently-picked history (excluding VS
  Code's global recents), and use it for the workspace picker's
  restore-on-startup fallback so an unrelated folder merely opened in
  another VS Code window can no longer silently seed a new session.
- Document the new Cmd/Ctrl+O folder Quick Pick command in
  `SessionsChatAccessibilityHelp` with a dynamic keybinding reference.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: fold getOwnRecentWorkspaces into a getRecentWorkspaces parameter

Per review feedback, replaces the separate getOwnRecentWorkspaces() API
with an includeVSCodeRecents parameter (default true) on the existing
getRecentWorkspaces(), instead of adding a new method. The workspace
picker's restore-on-startup fallback now calls
getRecentWorkspaces(false) to restrict to the sessions' own history.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: address CCR feedback round 2 on PR #326974

- resolveWorkspace now accepts an optional preferredProviderId so the
  trust check in openNewSession honors options.providerId instead of
  always resolving against the first matching provider
- openNewSession returns a discriminated IOpenNewSessionResult
  ({ session, trustDeclined }) instead of a bare ISession | undefined,
  so callers can tell trust-declined apart from other non-creation
  outcomes without re-deriving it from resolveWorkspace
- newChatWidget consumes the discriminated result and skips scheduling
  a provider-change retry after an explicit trust decline
- add regression tests verifying workspace-picker restore uses only
  the sessions-owned recent history, not VS Code global recents
- update SESSIONS.md to describe the async trust gate in the new
  session data flow

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… resize) (#326961)

* Fix chat list row height swallowed during render (stale/clipped until resize)

fireItemHeightChange committed `currentRenderedHeight` before the
`_elementBeingRendered` suppression check, so a later identical measurement
was deduped by the "unchanged" guard and the tree never learned the grown
row height. The chat response therefore stayed visually stale/clipped until
a window resize forced a relayout.

- Extract `reconcileChatItemHeight`; on a measurement suppressed during the
  render pass, keep the stored height untouched and schedule a next-frame
  re-measure so the grown height reliably reaches the tree (no reliance on
  the row ResizeObserver re-delivering).
- Show the scroll-down button whenever the view is not at the bottom,
  decoupled from the `chat-list-at-bottom` padding state
  (`computeScrollDownState`), so users can jump to the latest content.
- Add deterministic pure-function + real-render integration regression tests.

Fixes #326952

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 79925e85-d0b2-4e6d-91ae-2d50eee7fb7f

* Show scroll-down button with explicit display:flex

Clearing the inline display let the `.interactive-session .chat-scroll-down`
stylesheet rule (`display: none`) win, so the button stayed hidden even when
it should show. Use `flex` (the `.monaco-button` default) so the inline value
overrides the stylesheet and the codicon stays centered.

Addresses PR review feedback on #326952.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 79925e85-d0b2-4e6d-91ae-2d50eee7fb7f

* Cover scheduleInitial and initial-fit in reconciler tests

The helper initialized the stored height from allocatedHeight, so
currentRenderedHeight was never undefined and the `scheduleInitial` /
initial-fit branches were never exercised (the "already fits" step actually
hit the equality guard). Pass the initial stored height separately and add
cases for an initial fit (<= allocation) and an initial measurement larger
than the allocation.

Addresses PR review feedback on #326952.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 79925e85-d0b2-4e6d-91ae-2d50eee7fb7f

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix leaked disposable in the mid-render height integration test

The test rendered a streaming (incomplete) response, so progressive rendering
kept scheduling runProgressiveRender on animation frames and created a
ChatWorkingProgressContentPart that outlived the test — surfacing in CI as a
leaked disposable and unexpected console output during teardown. Complete the
response (and re-render) before the assertions so progressive rendering stops,
matching the existing renderer test's pattern.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 79925e85-d0b2-4e6d-91ae-2d50eee7fb7f

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Document Agent Host E2E coverage strategy

Capture the public principles for coverage-guided test selection, model-boundary choices, portable oracles, shared-server isolation, and completion criteria.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Expand Agent Host multi-chat E2E coverage

Add cross-provider peer chat lifecycle and provider-backed history tests, validate actual replay requests carry prior context, and document provider capability gaps through targeted skips.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Refresh Agent Host E2E coverage metrics

Regenerate the loaded-file coverage summary after rebasing the multi-chat E2E expansion onto current main.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Expand Agent Host peer chat E2E coverage

Add 21 peer-chat scenarios covering local commands, workspace tools, provider context isolation and attachment projection. Record strict Claude and Copilot fixtures and refresh aggregate coverage metrics.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Document disabled Agent Host E2E tests

Add a persistent inventory and reevaluation process for suspected provider bugs, platform limitations, record-only scenarios, and capability skips. Gate the two Copilot peer file mutations whose recorded POSIX tool plans do not produce Windows filesystem effects.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Strengthen Agent Host context assertions

Require prior assistant responses to be non-empty before using them to verify provider request history.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix Agent Host E2E approval loop

Deduplicate retained toolCallReady notifications by server sequence so the permission test sends one confirmation instead of flooding and terminating the shared Copilot host.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Recycle shared Agent Host E2E server to prevent cumulative wedge

The shared replay server caches one provider SDK/CLI subprocess and reuses
it across the whole suite. After enough sessions that subprocess degrades
and eventually wedges a turn (turn starts, no model response arrives even
though replay is instant), which times out and, via teardown of the
mid-turn session, leaves the host unavailable so the next test hits
ECONNREFUSED. Proactively recycle the server every 25 tests, and restart
it after any failed test so a wedge cannot cascade into unrelated tests.

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: dispose terminal environment listener

* test: cover terminal environment listener cleanup
* added classification comments for response events

* Classify forwarded Copilot identifiers as pseudonymous

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix: apply chat.defaultModel on every new local session

* Tests and comment update
Copilot AI and others added 6 commits July 22, 2026 18:58
* Initial plan

* feat: add delete action to prompt migration items

Co-authored-by: aeschli <6461412+aeschli@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: aeschli <6461412+aeschli@users.noreply.github.com>
…ow (#327022)

In the Agents window session editor, only show the chat tab strip when the
session has more than one chat actually visible as a tab. A single visible
tab (including a lone real chat with unopened subagents) now always hides the
strip.

Also move the Chats (Conversations) menu out of the tab-strip/header split and
always render it in the session header meta row, at the end of the pills, once
the session has more than one committed chat or the active chat has subagents.
The now-dead chat-tab-bar action menu, its menu id, and CSS are removed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* Initial plan

* Include typed chat input text with voice mode request

Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
…327025)

* Fix voice request misrouting to background chat editor

When dictating with voice mode in the panel chat input, the request could
be sent to a background chat editor that had been focused earlier instead
of the panel.

_chat.voice.acceptInput routed to IChatWidgetService.lastFocusedWidget,
which is only updated on a chat widget's onDidFocus and is never cleared
on blur (only on dispose). After a chat editor was opened/focused it stayed
the lastFocusedWidget, and because dictating in the panel voice input does
not DOM-focus its chat input, the request was dispatched to that stale
editor even though _chat.voice.getCurrentSession reported the panel.

Only trust lastFocusedWidget while it still holds input focus (an
intentionally focused chat editor); otherwise fall back to the panel view
pane's own widget, keeping the send target consistent with the reported
current session.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e000e96c-2f7e-4721-9405-001e9e0ff1fd

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
#327030)

* sessions: open single-file diff directly from single-pane Changes view

Fixes #327012.

SinglePaneChangesViewPane forced every file click in the Changes view to
open the aggregate multi-file diff editor, ignoring the shared single/
multi-file decision logic and the Alt invert. Remove that override so
single-pane falls through to the same logic as the standard layout: honor
sessions.changes.openSingleFileDiff (default off, so default behavior is
unchanged) with Alt inverting the choice, reusing the existing
_openSingleFileDiffEditor()/_openMultiFileDiffEditor() paths.

Also show the whole file by default when a single-file diff is opened from
Changes, instead of folding unchanged regions - that diff is opened to
review one specific file, so nothing should be hidden.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: address review feedback on single-file diff opening

- Restore hideUnchangedRegions to the configured value once the pane's
  active editor switches away from the opened single-file diff. The diff
  editor control is reused across different inputs in the same pane, and
  AbstractTextEditor.updateEditorConfiguration only applies configuration
  deltas, so the earlier fix left folding disabled for whatever opened
  next in that pane.

- Extend SinglePaneResponsiveSidebarStrategy's real-content check to also
  treat a DiffEditorInput whose original/modified side is a FileEditorInput
  as real content, so opening a single-file diff on a small window
  auto-hides the sessions list like a plain file open already does.

- Update LAYOUT.md, which still documented the old always-multi-diff
  behavior this PR replaced.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pull
pull Bot merged commit 87efe6c into code:main Jul 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.