Skip to content

welcome: show the Agents banner while the chat extension awaits setup - #347475

Draft
Alexandru Dima (alexdima) wants to merge 1 commit into
mainfrom
agents/fix-welcome-agents-banner-chat-disabled
Draft

Alexandru Dima (alexdima) wants to merge 1 commit into
mainfrom
agents/fix-welcome-agents-banner-chat-disabled

Conversation

@alexdima

Copy link
Copy Markdown
Member

Fixes #347473

Problem

On a new profile (e.g. code --transient), the Welcome page footer shows neither "Sign in to GitHub" nor "Try out the new Agents window". ensureChatExtensionInitialDisabledState() keeps the built-in chat extension disabled until chat setup completes, so sentiment.disabled is true. canShowAgentsBanner() hid the banner whenever sentiment.disabled was set, so brand-new users never saw it.

Change

canShowAgentsBanner() now checks sentiment.disabledInWorkspace instead of sentiment.disabled, matching OPEN_AGENTS_WINDOW_PRECONDITION. Users who turned AI off are still covered by sentiment.hidden (chat.disableAIFeatures, which an explicit earlier disable of the chat extension is migrated to), and a workspace-disabled chat extension still hides the banner.

Testing

  • New unit test shows the sign-in action when the chat extension is disabled until setup completes; the existing "keeps the banner hidden" case now uses { disabled: true, disabledInWorkspace: true }.
  • ./scripts/test.sh --run src/vs/workbench/contrib/chat/test/browser/agentSessions/agentSessionsBanner.test.ts: without the fix, 1 failing (the new test); with the fix, all passing.
  • ./scripts/test.sh --run src/vs/workbench/contrib/welcomeGettingStarted/test/browser/gettingStarted.test.ts --run src/vs/workbench/contrib/welcomeGettingStarted/test/browser/gettingStartedMarkdownRenderer.test.ts: 2 passing.
  • pnpm run eslint on both changed files: clean.
  • Manual: launched with empty --user-data-dir/--extensions-dir via Playwright. On Insiders 1.146.0 (before) .agents-banner stays display: none; on a dev build of this branch (after) it shows "Sign in to GitHub".

Before / after

Before

before-insiders-fresh-profile.mp4

before-welcome-empty-footer-insiders.png

After

after-rebased-dev-fix-fresh-profile.mp4

after-rebased-welcome-sign-in.png

🤖 Authored with GitHub Copilot on behalf of Alexandru Dima (@alexdima).

New profiles keep the built-in chat extension disabled until chat setup
completes, which made canShowAgentsBanner hide the Welcome page's
Sign in / Agents window banner for every new user. Check
disabledInWorkspace instead of disabled, matching
OPEN_AGENTS_WINDOW_PRECONDITION; users who turned AI off are still
covered by sentiment.hidden.

🤖 Authored with GitHub Copilot on behalf of @alexdima.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 10, 2026 21:33

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.

🟡 Changes recommended

The banner can retain stale visibility after workspace disablement changes because the sentiment event filter omits disabledInWorkspace, requiring a filter update and production-path regression coverage.

1 open issue
What changed in this PR

This PR addresses #347473 by showing the Welcome page’s Agents banner on fresh profiles while the chat extension awaits setup.

Changes:

  • Uses workspace-specific disablement for banner visibility while retaining the explicit AI opt-out check.
  • Adds a regression test for setup-pending sign-in and updates workspace-disablement coverage.
File Description
src/​vs/​workbench/​contrib/​chat/​test/​browser/​agentSessions/​agentSessionsBanner.test.ts Tests setup-pending sign-in and workspace-disabled visibility.
src/​vs/​workbench/​contrib/​chat/​browser/​agentSessions/​agentSessionsBanner.ts Updates the visibility condition and documents its rationale.

Review effort: Balanced

export function canShowAgentsBanner(chatEntitlementService: IChatEntitlementService, configurationService: IConfigurationService): boolean {
const sentiment = chatEntitlementService.sentiment;
if (sentiment.hidden || sentiment.disabled || configurationService.getValue<boolean>(ChatConfiguration.AgentEnabled) === false) {
if (sentiment.hidden || sentiment.disabledInWorkspace || configurationService.getValue<boolean>(ChatConfiguration.AgentEnabled) === false) {

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Welcome page shows no "Sign in to GitHub" / "Try the Agents window" button on a new profile (e.g. code --transient)

2 participants