Skip to content

Honor side placement for agent-session links in editor windows - #342109

Merged
Henning Dieterichs (hediet) merged 1 commit into
mainfrom
hediet/agent-session-links-to-side
Oct 16, 2026
Merged

Henning Dieterichs (hediet) merged 1 commit into
mainfrom
hediet/agent-session-links-to-side

Conversation

@hediet

@hediet Henning Dieterichs (hediet) commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Fixes #342119

Summary

Honor explicit open-to-side requests for agent-host-session:// links in regular editor windows.

The built-in session-link opener previously discarded opener options and always targeted the Chat view. This made Alt+click / Alt+Enter ignore side placement even when the link source passed openToSide: true.

  • Forward opener options into the agent-session handler.
  • Open side requests in a chat editor using SIDE_GROUP.
  • Disable revealIfOpened for explicit side requests, so a session already visible elsewhere is opened/moved to the requested side rather than merely revealed at its previous location.
  • Forward editor options such as pinning and preserving focus.
  • Preserve normal opening/reveal behavior when side opening is not requested, including delegated request-origin links.
  • Add six regression cases covering session and peer-chat links with absent, false, and true side options.

Validation

  • 50 tests passed across the agent-session link opener and Quick Open link test files.
  • Client type-check, focused ESLint, incremental client build, and commit hygiene passed.
  • Tested the combination with Support opening links directly from Quick Open #342081 in a live Code OSS instance via dbgjs: Ctrl+P with a scoped local agent-host-session://ahp-session/... URI followed by Alt+Enter opened the actual session in a second editor group while retaining Untitled-1 in the original group. Also exercised Alt+click on the Quick Pick result and verified the two-group result with no notifications.

This PR contains only the session-link handler and its tests. The Quick Open implementation remains in #342081; both fixes are present on a separate local integration branch for manual testing.

Related: #342050, #340724, #342051.

Forward opener editor options and use SIDE_GROUP without revealing the session in its old location when openToSide is requested.

Co-authored-by: Copilot <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 16, 2026 16:34

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.

🟢 Approval recommended

The focused change has targeted regression coverage and no unresolved findings; tests were not rerun.

0 open findings

What changed in this PR

Makes agent-session links honor explicit side-opening requests in regular editor windows while preserving normal Chat view behavior.

Changes:

  • Forward opener options and route side requests to SIDE_GROUP, disabling reveal-at-existing-location behavior.
  • Add six regression cases covering session and peer-chat links with absent, false, and true side options.
File Description
src/​vs/​workbench/​contrib/​chat/​test/​browser/​agentSessions/​agentHost/​openSessionLinkOpener.contribution.test.ts Tests placement and editor-option forwarding.
src/​vs/​workbench/​contrib/​chat/​browser/​agentSessions/​agentHost/​openSessionLinkOpener.contribution.ts Honors side placement and forwards editor options.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: be4f9ba6 Current: b3faaab4

Changed (1)

sessions/sessionActivityBar/sessionActivityBar/SubmenuOpen/Light
Before After
before after

@hediet
Henning Dieterichs (hediet) merged commit 3895f17 into main Oct 16, 2026
49 checks passed
@hediet
Henning Dieterichs (hediet) deleted the hediet/agent-session-links-to-side branch October 16, 2026 18:12
@vs-code-engineering vs-code-engineering Bot added this to the 1.143.0 milestone Oct 16, 2026
Henning Dieterichs (hediet) added a commit that referenced this pull request Oct 26, 2026
…342131)

The Session Activity Bar `SubmenuOpen` fixture produces flaky screenshot
comparisons. Mark it as `animated` across all themes so it stays
available in Component Explorer but is excluded from automated
screenshot capture.

The same
`sessions/sessionActivityBar/sessionActivityBar/SubmenuOpen/Light` image
pair appears in these screenshot reports:

- [#342109 — Honor side placement for agent-session links in editor
windows](#342109 (comment))
- [#342081 — Support opening links directly from Quick
Open](#342081 (comment))
- [#342099 — Fix session diff statistics for inactive folder
sessions](#342099 (comment)),
with the before/after images reversed.
- [#342079 — Update distro for Copilot BYOK voice speech
proposal](#342079 (comment))

Validation: editor diagnostics and `git diff --check` passed. No runtime
tests were run for this metadata-only change.

Fixes #342130
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.

Agent-session links ignore open-to-side requests in editor windows

3 participants