Skip to content

[cherry-pick] Fix policy continuation presenter registration in web Sessions - #344625

Merged
Osvaldo Ortega (osortega) merged 1 commit into
release/1.144from
cherry-pick/344623
Oct 27, 2026
Merged

Osvaldo Ortega (osortega) merged 1 commit into
release/1.144from
cherry-pick/344623

Conversation

@vs-code-engineering

Copy link
Copy Markdown
Contributor

Cherry-pick of #344623 from main.

Summary

Fix web Sessions chat creation failing because agentHostPolicyContinuationPresenter is not registered. The shared chat widget requires the service, but its presenter was registered only by the desktop local-agent-host contribution.

  • Register the existing delayed presenter singleton in its own module and load it from shared Sessions startup.
  • Remove the desktop-only registration without changing local-agent startup or continuation behavior.
  • Add regression coverage for registration without importing the desktop local-agent-host contribution.

Addresses the web startup regression introduced by #340702.

Validation

  • Scoped ESLint for all four changed files.
  • Layer dependency checks and layer type checks.
  • Pre-commit hygiene checks and git diff --check.
  • Run the focused presenter browser tests after compiling client output. The attempted run failed before loading the suite because the fresh worktree has no compiled test module.
  • Reopen a sandbox chat in web Sessions and confirm chat construction succeeds; verify an existing desktop chat still opens normally.

No full application build or live end-to-end verification was performed. Unrelated host-compatibility and tunnel warnings are outside this change.

Copilot AI balanced review requested due to automatic review settings October 27, 2026 19:20
@vs-code-engineering vs-code-engineering Bot added the cherry-pick-artifact Auto-generated cherry-pick PR label Oct 27, 2026

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 narrow registration move supplies the missing web dependency while preserving delayed instantiation and existing desktop behavior.

No open issues 🎉

What changed in this PR

This cherry-pick fixes web Sessions chat creation by making the required policy continuation presenter available through shared startup rather than desktop-only startup.

Changes:

  • Register the existing delayed singleton in the presenter module and import it from shared Sessions startup.
  • Remove desktop-only registration without changing presenter behavior or local-agent startup.
  • Add regression coverage for registration without the desktop contribution.

No actionable issues remain. Focused browser tests and live web/desktop verification are still pending, as noted in the PR.

File Description
src/​vs/​sessions/​sessions.common.main.ts Loads the presenter for both web and desktop Sessions.
src/​vs/​sessions/​contrib/​providers/​agentHost/​test/​browser/​agentHostPolicyContinuationPresenter.test.ts Checks that the presenter registers with delayed instantiation.
src/​vs/​sessions/​contrib/​providers/​agentHost/​browser/​localAgentHost.contribution.ts Removes desktop-only registration and its unused imports.
src/​vs/​sessions/​contrib/​providers/​agentHost/​browser/​agentHostPolicyContinuationPresenter.ts Registers the existing presenter in its own module.

Review effort: Balanced

@osortega
Osvaldo Ortega (osortega) merged commit 2c33b50 into release/1.144 Oct 27, 2026
45 checks passed
@osortega
Osvaldo Ortega (osortega) deleted the cherry-pick/344623 branch October 27, 2026 20:18
@vs-code-engineering vs-code-engineering Bot added this to the 1.144.0 milestone Oct 27, 2026
@Wdomda

Wdomda commented Oct 29, 2026

Copy link
Copy Markdown

Gg

@mosawa07

Copy link
Copy Markdown

Gg

🤣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick-artifact Auto-generated cherry-pick PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants