Propagate /btw transcript selections through sessions and agent host.
Hide the snapshot in the first side-chat prompt while preserving it in origin metadata.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the selected local turn as side-chat provenance while using a separate concrete provider anchor. Inject the bounded local context exactly once on the first side-chat prompt.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Require explicit fork/sideChat source kinds throughout VS Code.
Remove the legacy ChatSource helper/fallbacks and update focused tests plus the sessions skill note.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
/btw now branches the active chat context into standard Agents tabs instead of a separate side chat surface.
This keeps hidden tool subagents out of the visible tab model while preserving compatibility with the legacy fork-based side chat protocol.
Co-authored-by: Copilot <223556219+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>
* Expand Agent Host end-to-end coverage
Add cross-provider E2E coverage for host-owned completions, local commands, session state, and terminal lifecycle. Record tokenless replay fixtures and semantic AHP snapshots, and refresh coverage metrics.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Deduplicate Agent Host E2E test setup
Centralize common test timeouts and terminal cleanup without changing test titles or replay fixture identities.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Stabilize Agent Host E2E tests on Windows
Allow slower Windows terminal completion and skip the Git-backed branch-completion scenario where the temporary repository remains locked during suite cleanup.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix Agent Host E2E timeout wrappers
Set timeouts inside wrapper callbacks because the test registration function does not return a chainable object in the Windows Electron test runtime. Preserve Mocha context for snapshot assertions.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Gate successful bang E2E test on Windows
Windows surfaces bang-command output but does not reach host-local tool completion, which wedges the shared replay server. Keep the failure-path and direct terminal coverage enabled while skipping only this POSIX-dependent success scenario.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Share empty fixture across host-only E2E tests
Register host-only tests explicitly and route them through one strict empty replay fixture in all update modes. Remove 99 duplicate empty captures while preserving hard cache misses for unexpected model traffic.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: scope git availability to each session surface
Publish usable Git availability on ISession and have the shared session context
key plumbing bind it into root and per-session scoped context key services. This
keeps repository picker menu visibility aligned with each toolbar's own session
when multiple session inputs are visible.
Remove the provider contribution that mirrored only the globally active session,
and add regression coverage for independent scoped contexts.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: forward git availability through session wrappers
Delegate the optional hasGitRepository observable from both VisibleSession and
ResourceOverrideSession so scoped context keys preserve provider-refined Git
availability through the visibility model.
Add regression coverage for both wrapper paths.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
EOF && git push
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-20 21:07:50 +00:00
Raymond ZhaoGitHubcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
* Reorganize Agent Host integration tests
Separate protocol, provider E2E, mocked-LLM, and direct SDK test families, and split shared provider scenarios into focused suites.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Address Agent Host test review feedback
Keep coverage scope metadata and replay fixture documentation aligned with the reorganized suites.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Limit Agent Host coverage to provider E2E tests
Exclude mock-agent and mocked-LLM suites so the report measures only the real server and bundled provider stacks with replayed model traffic.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Clarify Agent Host E2E test boundaries
Move synthetic-LLM suites into provider integration, flatten E2E captures, and simplify the checked-in coverage summary path without changing tests or fixture contents.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Persist profile and workspace enablement for agent-host-only MCP servers while keeping session overrides independent. Apply durable changes immediately before turns and group profile, workspace, and session actions consistently.
Fixes#326167
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Gate Codex shell-dependent replay tests on Linux while preserving recording and coverage on other platforms.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: stabilize Codex shell replay
Pin unified exec for Codex record/replay tests so fixtures and the runtime use the same shell tool protocol.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: update E2E replay guidance
Remove the obsolete shell-permission gate recommendation from the Agent Host E2E workflow guide.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep automatic MCP authentication probes non-interactive so unsupported dynamic client registration is only surfaced after the user chooses Authenticate.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Collapse internal Agents workspace history entries into one canonical picker entry, without a path description, and skip it when choosing the initial recent item.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: do not force-open managed tabs when opening a file in single-pane layout
Rework the single-pane managed docked tabs (Changes + Files placeholder) so
they are only opened into an *empty* editor group on a view-open trigger,
removing the fragile dismissal bookkeeping and aux-bar-visibility inference.
- Add layout-service events `onDidRevealSidePane` (side pane goes fully
hidden -> visible) and `onDidEndSessionLayoutRestore` (restore epoch settles)
and drive the managed-tabs strategy off named triggers A-D.
- Open default tabs only when the group is empty, so closing a managed tab
sticks and closing a file no longer re-forces the tabs open / leaves the
side pane un-closable.
- Ensure Changes (opened active) on new-session submit; ensure all docked
inputs on a details-only reveal.
- Scope pending reconcile intents to their session so a superseded reconcile
cannot leak its intent onto a switched-to session.
- Gate responsive sessions-list auto-collapse on small windows (<= 1800px).
- Only collapse editors on a details-only hide (aux still visible), not when
the whole side pane closes.
- Tests + docs (SINGLE_PANE_SCENARIOS.md, sessions SKILL.md) updated.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: address CCR review feedback on single-pane managed tabs
- Guard the Files-tab tidy on onWillOpenEditor: resolve the event group via
mainPart.getGroup and skip re-activations (already-open editors) and
non-main-part groups, so selecting/closing-to-reveal an existing file no
longer removes a user-added Files tab.
- Open the submit Changes tab with preserveFocus so activating it for detail
mapping never steals focus from the just-submitted chat.
- Remove the now-dead internallyClosingEditors bookkeeping from the coordinator
and both docked-tab strategies (no readers after dismissal tracking was
removed).
- Trim the SinglePaneManagedTabsStrategy class JSDoc to the ownership contract.
- Tests: model production onWillOpenEditor ordering (fire before insert) and add
a re-activation case; add onDidRevealSidePane transition assertions.
- Docs: fix stale/nonexistent API references in the sessions SKILL.md pitfalls.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add best practice: never anchor :has() on body or a workbench-wide root
A body:has() selector forces the style engine to re-evaluate against the whole
document on nearly every DOM mutation, degrading workbench interaction perf even
in builds where the feature is disabled. Document the class-on-container
alternative under the Styling best practices.
* sessions: rename single-pane detail context key to HasDockedDetailsContext
Rename SinglePaneDetailChangesOrFilesActiveContext (raw key
agentSessionsSinglePaneDetailChangesOrFiles) to HasDockedDetailsContext
(raw key agentSessionsHasDockedDetails) to better convey its meaning:
whether the single-pane active editor has a docked detail panel. Updates
the producer, both consumers (Toggle Details, Hide Editor), tests and docs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: align docs and test terminology with HasDockedDetailsContext
Address review feedback: update SINGLE_PANE_SCENARIOS.md to describe the
new intent (active editor has a docked detail panel — a managed
Changes/Files tab or a text file editor) instead of the old
Changes/Files-target wording, and rename the test helpers
(isChangesOrFilesActive -> hasDockedDetails) and snapshot property
(gatedOnChangesOrFilesTab -> gatedOnDockedDetails).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: model docked (Changes/Files) editors as DockedEditorInput
Replace the ad-hoc reveal-suppression predicate (setEditorRevealOnOpenExclusion) with a proper DockedEditorInput base class that the Changes and Files editors extend. The single-pane workbench owns the policy: revealEditorOnOpen (renamed from _handleWillOpenEditor, now protected) is overridden so activating a docked editor does not reveal the editor area only while the detail panel is open and the editor area is closed. When the detail panel is closed, opening a docked editor reveals it as usual.
Also drive the editor-area collapse strategy off 'instanceof DockedEditorInput' instead of the coordinator's isManagedEditor heuristic, and close every non-docked editor when the editor area hides (restoring the ones that can be re-resolved from a resource; non-restorable ones such as an untitled Search editor are dropped since they can neither be serialized nor reopened after disposal).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: address CCR feedback on docked-editor docs/comments
Fix stale references left by the DockedEditorInput refactor:
- workbench.ts onWillOpenEditor comment now describes the base reveal and points to the SinglePaneWorkbench.revealEditorOnOpen override (the base no longer special-cases the Files tab).
- LAYOUT.md editor-area tab collapse now references SinglePaneEditorAreaCollapseStrategy._collapseNonManagedTabs / _restoreCollapsedTabs instead of the non-existent SinglePaneLayoutController._registerEditorAreaTabCollapse.
- SKILL.md 'Explicit managed-editor opens' entry now describes DockedEditorInput / the SinglePaneWorkbench override instead of the removed _handleWillOpenEditor exclusion.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Reveal Files view when empty file editor is opened in single-pane layout
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: reveal Files detail when the empty Files editor becomes active
In the single-pane layout, the empty Files editor placeholder shows a
"Select a file..." landing tab whose content (the Files tree) lives in
the detail panel (auxiliary bar). Opening it while the detail was closed
was a dead end. The detail-panel strategy now reveals the Files detail
when the placeholder becomes the active editor, so the `+` Files action
and selecting the Files tab both surface the Files view.
Keyed on the active-editor signal so the managed auto-ensured Files tab
(opened inactive as a background tab) never triggers it, preserving the
Editor-only default; hiding the detail sticks; and it is skipped while
the whole side pane is closed or during a session-switch restore.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: trim inline comment on the Files-detail reveal listener
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: default the single-pane side pane to 60% and persist its width reliably
Make the single-pane side pane (docked editor part) open at a comfortable
60% of the window width and keep its size workbench-wide across session
switches and reloads.
- First reveal of the side pane uses 60% of the window width
(`INITIAL_EDITOR_WIDTH_RATIO`) instead of a 50% main-area split.
- Side-pane width is workbench-global (`workbench.sessions.partSizes`), so
switching sessions keeps the same width; hiding the pane in one session no
longer resets another session's width on return.
- Fix persistence: `_persistedGridViewSize` is a single overridable read for
all parts, and single-pane returns its docked auxiliary-bar width from the
docked layout state instead of the grid (the docked aux bar is not a grid
view, so reading it threw 'View not found' and aborted the whole save,
losing the editor width).
- Restore-side guards a stale/corrupt sub-minimum saved editor width (e.g. a
persisted 0) by falling back to the default instead of collapsing to the
300px minimum on reload.
- `_persistedEditorWidth` subtracts the docked detail width only when the
detail is visible, mirroring the grid descriptor, so an Editor-only session
no longer shrinks by the detail width on every reload.
- Double-clicking the chat/side-pane sash resets the side pane to 60% via a
`preferredWidth` on `SinglePaneMainEditorPart` (single-pane only; the
classic layout keeps the standard distribute).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: address side-pane sizing review feedback
- Move editor/side-pane sizing constants into a shared leaf module
(parts/editorPartSizing.ts) so the reveal split and the sash
double-click reset can't drift apart.
- Keep the base grid layout's classic even split of the main area; scope
the 60%-of-window side-pane split to the single-pane override.
- Preserve the last valid global editor width whenever a measurement is
sub-minimum (e.g. editor hidden with detail visible), instead of only
when the editor part is visible, so a hidden editor never persists 0.
- Remove a duplicate JSDoc opener on _applyEditorSplitSize.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add a PR CI check that fails when the committed codex app-server protocol
client (src/vs/platform/agentHost/node/codex/protocol/generated/**) does not
match what `codex app-server generate-ts` produces for the @openai/codex
dev-dependency version, but only when a PR actually changes the generated
client or the version pin.
- build/codex/generate-protocol.mjs: export the reusable pieces (generate,
resolveCodexBinary, readBinaryVersion, readPinnedVersion, paths) and only
run main() when invoked directly, so the check can import it side-effect
free. Types provided by generate-protocol.d.mts.
- build/codex/check-protocol-sync.ts: gate on a git diff touching the
generated dir or codex-version.txt (its README.md excluded — preserved
across regen), regenerate into a scratch dir with the dev-dependency binary,
byte-compare against the committed client, and assert the pin matches. Never
touches the working tree.
- build/codex/test/checkProtocolSync.test.ts: unit tests for the gate + diff
helpers; wired in via the build/package.json test glob (adds `codex`).
- package.json: `codex:check-protocol` script.
- .github/workflows/pr.yml: run the gated check in the Compile & Hygiene job.
- generated/README.md: document the check.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>