Skip to content

chat: improve ChatApprovedAccountOrganizations restriction messaging#313324

Merged
joshspicer merged 2 commits into
mainfrom
agents/iterate-messaging-chatapproved-orgs
May 5, 2026
Merged

chat: improve ChatApprovedAccountOrganizations restriction messaging#313324
joshspicer merged 2 commits into
mainfrom
agents/iterate-messaging-chatapproved-orgs

Conversation

@joshspicer
Copy link
Copy Markdown
Member

Reframes the ChatApprovedAccountOrganizations gate messaging to clearly attribute the restriction to the administrator, rather than using passive "approved organization" language that could imply VS Code itself controls the list.

Changes

Notifications (accountPolicyGateContribution.ts):

  • New shape: "Your administrator restricts AI features to GitHub accounts in the following organizations: {orgs}. The account "{name}" is not a member of any of these."
  • Unified the previously split OrgNotApproved vs noAccount/wrongProvider branches into a single consistent message shape
  • Removed "Contact your administrator for more information." and "Sign into an approved GitHub account" — the org list and Sign In button are self-explanatory
  • Wildcard (*) case: "Your administrator restricts AI features to specific GitHub accounts. The account "{name}" does not qualify."

Splash screen (sessionsPolicyBlocked.ts):

  • Title: "Sign-In Required by Your Administrator" (was "Sign-In Required")
  • Body (with account): "The account "{name}" is not a member of an organization that your administrator allows for Agents."
  • Body (no account): "Your administrator restricts Agents to members of the organizations below."
  • Org list heading: "Allowed organizations:" (was "Approved organizations:")
  • Footer: dropped "Contact your administrator for more information." — the title already names the source

Refs #312534

Reframes the gate messaging to clearly attribute the restriction to the administrator rather than using passive 'approved organization' language.

- Notifications now read 'Your administrator restricts AI features to GitHub accounts in the following organizations: {orgs}.' with account-specific context when available
- Splash screen title updated to 'Sign-In Required by Your Administrator'
- Splash org list heading updated from 'Approved organizations:' to 'Allowed organizations:'
- Drops redundant 'Contact your administrator for more information.' footer from splash (the title already attributes the source)
- Simplifies notification branching by unifying OrgNotApproved and noAccount/wrongProvider cases into a single consistent shape

Refs #312534

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 29, 2026 19:58
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 29, 2026

No screenshot changes.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates user-facing messaging for the ChatApprovedAccountOrganizations policy gate to clearly attribute restrictions to the user’s administrator (instead of implying VS Code controls “approved orgs”), both in VS Code notifications and the Agents app blocked overlay.

Changes:

  • Rewords policy-gate notifications to use consistent “administrator restricts …” language and simplifies branching.
  • Updates the Agents app policy-blocked splash screen title/body/org heading to match the new framing and removes the “contact your administrator” footer text.
  • Adjusts wildcard (*) messaging to a “specific GitHub accounts” framing.
Show a summary per file
File Description
src/vs/workbench/services/policies/browser/accountPolicyGateContribution.ts Reframes and unifies notification text for the account policy gate, including org list and wildcard cases.
src/vs/sessions/contrib/policyBlocked/browser/sessionsPolicyBlocked.ts Rewords Agents “policy blocked” overlay copy (title/body/heading/aria-label) and removes the footer contact text.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

roblourens
roblourens previously approved these changes Apr 29, 2026
@joshspicer
Copy link
Copy Markdown
Member Author

@copilot

  • keep the header title 'Sign-in Required' (so it's one line still).
  • keep the 'contact your administrator for more information'

Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/150065f9-6482-45ed-bc65-146739992e2b

Co-authored-by: joshspicer <23246594+joshspicer@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 30, 2026

@copilot

  • keep the header title 'Sign-in Required' (so it's one line still).
  • keep the 'contact your administrator for more information'

Addressed in 85f9e63: the Agents blocked overlay title is back to "Sign-In Required" and the administrator contact guidance is restored.

Screenshot: https://github.com/user-attachments/assets/f4161210-3578-4629-820e-85c0f36fcfd1

@joshspicer joshspicer merged commit 47245c8 into main May 5, 2026
53 of 56 checks passed
@joshspicer joshspicer deleted the agents/iterate-messaging-chatapproved-orgs branch May 5, 2026 16:05
@vs-code-engineering vs-code-engineering Bot added this to the 1.120.0 milestone May 5, 2026
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.

5 participants