Skip to content

minVersion: UI when enforced by Enterprise - #337151

Open
Ross Wollman (rwoll) wants to merge 7 commits into
mainfrom
rwoll-enterprise-version-restrictions
Open

Ross Wollman (rwoll) wants to merge 7 commits into
mainfrom
rwoll-enterprise-version-restrictions

Conversation

@rwoll

@rwoll Ross Wollman (rwoll) commented Sep 21, 2026

Copy link
Copy Markdown
Member

Fixes #337086

Enterprise Managed Settings minVersion lets administrators block AI features on outdated VS Code clients until users update—for example, to require newer sandboxing protections.

This PR explains that existing restriction without changing enforcement. Chat shows an update notice. Agents shows one blocking overlay, without a redundant banner. The editor retains a Workspace Trust-style banner even when Chat is closed, because other editing features remain available.

Native update actions are offered when available. If enterprise policy disables built-in updates, the notice directs users to their administrator for an approved update. Other unavailable-updater states do not imply administrator management, and no generic fallback link is shown. Open Editor Window opens a fresh editor window, preserving the existing recovery behavior.

Screenshots

Controlled simulations, real rendered UI. Code - OSS Dev, isolated HTTP 466 requirement (installed 1.140.0; required 1.141.0), with the existing updater service temporarily set to Idle or Disabled(Policy) and then restored to Disabled(NotBuilt). Agents captures were regenerated at the final review-fix head and matched the published PNGs byte-for-byte; unchanged Editor captures are retained. No DOM/text substitution, composites, shipping test switches, or actual update installation. Editor captures exclude the account area and show only a synthetic example file.

Native updater available — simulated Idle

Chat closed: the editor banner remains visible, with Check for Updates.

Editor with a synthetic text file and Chat closed, retaining the organizational update banner and Check for Updates action

Chat open: the same requirement and native update action appear beside the editor.

Editor showing the Chat update notice and persistent banner with Check for Updates

Agents: overlay only, with Check for Updates and Open Editor Window.

Agents update-required overlay with Check for Updates and Open Editor Window, without a window banner

Enterprise-managed updates — simulated Disabled(Policy)

Chat closed: the editor banner explains that an administrator manages the update path; no generic link.

Editor with Chat closed and a text-only banner explaining that built-in updates are disabled by the organization

Chat open: administrator guidance, without a misleading fallback action.

Chat notice showing the required and installed versions and administrator guidance, with no update button or generic link

Agents: administrator guidance and Open Editor Window; no redundant banner or generic link.

Agents overlay showing administrator-managed recovery guidance and only Open Editor Window as an action

Validation and remaining checks
  • 158 focused tests passed in each of Chromium and WebKit, including focus ownership/restoration, startup fallback, long tokens and viewport resizing, available-action help, all disabled-updater reasons, and the unchanged fresh-editor-window action.
  • Before the final push, all eight Compile & Hygiene scripts passed across documented runs: core-ci, hygiene, eslint, valid-layers-check, define-class-fields-check, vscode-dts-compile-check, tsec-compile-check, and test-build-scripts. The original aggregate hit environment blockers; it is not claimed as one successful unmodified run. The same core-ci command passed after GitHub's rate-limit reset. Build-script tests passed 462/462 with command-scoped empty Git configuration for synthetic fixture repos and canonical /private/tmp; the other checks used normal Git configuration. User signing settings were unchanged.
  • Build-tool typecheck, Markdown manifest checks, conditional Codex protocol check (no changed inputs), and cyclic-dependency check (9,174 files) passed or correctly skipped before that push.
  • Real Electron checks covered both updater states and editor-banner independence from Chat. A long version token at a 600×320 renderer viewport wrapped without horizontal overflow, and the focused recovery action remained visible after shrinking the viewport. Mock settings, updater state, and viewport were restored afterward.
  • Earlier validation covered actual 320/480/900px Chat widths and HTTP 466 → 200 {} → 466 recovery in both windows. All three Copilot review threads have concise inline replies and are resolved.
  • Presentation consumes the existing compatibility signal; it does not invent extension/runtime-specific metadata. VoiceOver and full light/dark/high-contrast coverage remain pending.
  • Draft review and a trusted signed approval checkpoint at the new head remain outstanding. No automatic merge.

Fixes #337086

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 21, 2026 20:40

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

🟡 Changes recommended

The Agents experience has unresolved focus restoration, accessibility-help accuracy, and narrow-window overflow issues.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 2 Medium severity · 1 Low severity

Open (3)
What changed in this PR

Adds persistent organization-required update guidance across Chat, Agents, and window banners without changing enforcement.

Changes:

  • Derives localized recovery actions from updater state.
  • Adds Chat and Agents blocked-state presentations.
  • Adds prioritized neutral banner support and Agents layout integration.
File Description
src/​vs/​workbench/​workbench.common.main.ts Loads update guidance contribution.
src/​vs/​workbench/​test/​browser/​parts/​banner/​bannerPart.test.ts Tests banner replacement and priority.
src/​vs/​workbench/​services/​policies/​test/​browser/​managedSettingsUpdate.test.ts Tests update presentation states.
src/​vs/​workbench/​services/​policies/​test/​browser/​accountPolicyGateContribution.test.ts Verifies dialog removal.
src/​vs/​workbench/​services/​policies/​common/​managedSettingsUpdate.ts Defines update presentation contract.
src/​vs/​workbench/​services/​policies/​browser/​managedSettingsUpdateService.ts Derives reactive update information.
src/​vs/​workbench/​services/​policies/​browser/​managedSettingsUpdate.contribution.ts Controls banner, context, and help.
src/​vs/​workbench/​services/​policies/​browser/​accountPolicyGateContribution.ts Removes duplicate compatibility dialogs.
src/​vs/​workbench/​services/​banner/​browser/​bannerService.ts Adds priority and neutral styling options.
src/​vs/​workbench/​contrib/​chat/​test/​browser/​viewsWelcome/​chatUpdateRequiredView.test.ts Tests Chat replacement behavior.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​media/​chatViewWelcome.css Adds wrapping and scrolling styles.
src/​vs/​workbench/​contrib/​chat/​browser/​viewsWelcome/​chatViewWelcomeController.ts Supports plain text and primary actions.
src/​vs/​workbench/​contrib/​chat/​browser/​viewsWelcome/​chatUpdateRequiredView.ts Implements read-only Chat replacement.
src/​vs/​workbench/​contrib/​chat/​browser/​chatParticipant.contribution.ts Registers the replacement Chat view.
src/​vs/​workbench/​browser/​parts/​banner/​media/​bannerpart.css Styles neutral banners.
src/​vs/​workbench/​browser/​parts/​banner/​bannerPart.ts Adds queued priority rendering.
src/​vs/​sessions/​test/​browser/​workbench.test.ts Tests banner layout allocation.
src/​vs/​sessions/​sessions.common.main.ts Loads the shared contribution.
src/​vs/​sessions/​LAYOUT.md Documents the Agents banner row.
src/​vs/​sessions/​contrib/​policyBlocked/​test/​browser/​sessionsPolicyBlocked.test.ts Tests Agents update blocking.
src/​vs/​sessions/​contrib/​policyBlocked/​browser/​sessionsPolicyBlocked.ts Renders the Agents update overlay.
src/​vs/​sessions/​contrib/​policyBlocked/​browser/​policyBlocked.contribution.ts Prioritizes update-required blocking.
src/​vs/​sessions/​browser/​workbench.ts Integrates the banner into Agents layout.

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

Comment thread src/vs/sessions/contrib/policyBlocked/browser/sessionsPolicyBlocked.ts Outdated
Comment thread src/vs/workbench/services/policies/browser/managedSettingsUpdate.contribution.ts Outdated
Refs #337086

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Label the existing fresh editor-window action accurately without changing its behavior. Refs #337086.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep native update actions and policy-specific administrator guidance without a hardcoded fallback URL. Refs #337086.

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

github-actions Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Base: e2ecbd6a Current: 0646232e

No screenshot changes.

Restore owned focus after inert cleanup, keep long notices scrollable, clarify Agents accessibility help, and initialize observables after service injection. Refs #337086.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@rwoll Ross Wollman (rwoll) changed the title Explain organization-required updates across Chat and Agents minVersion: Explain organization-required updates across Chat and Agents Sep 22, 2026
@rwoll Ross Wollman (rwoll) changed the title minVersion: Explain organization-required updates across Chat and Agents minVersion: UI when enforced by Enterprise Sep 22, 2026
Keep focused recovery actions visible after resizing without stealing focus when the overlay rerenders. Refs #337086.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Handle WebKit focus scrolling before revealing the focused action; verified with Chromium and WebKit after completing the Compile and Hygiene checks. Refs #337086.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@rwoll
Ross Wollman (rwoll) marked this pull request as ready for review September 22, 2026 19:15
@rwoll
Ross Wollman (rwoll) enabled auto-merge (squash) September 22, 2026 19:16
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Benjamin Christopher Simmonds (@benibenj)

Matched files:

  • src/vs/workbench/browser/parts/banner/bannerPart.ts
  • src/vs/workbench/browser/parts/banner/media/bannerpart.css

This branch has not been deployed

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

Labels

feature-request Request for new features or functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Explain enterprise minVersion restrictions in Chat, the Agents window, and a window-level banner

3 participants