Repository navigation
welcome: show the Agents banner while the chat extension awaits setup - #347475
Draft
Alexandru Dima (alexdima) wants to merge 1 commit into
Draft
Alexandru Dima (alexdima) wants to merge 1 commit into
Alexandru Dima (alexdima) wants to merge 1 commit into
Conversation
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>
Contributor
There was a problem hiding this comment.
🟡 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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, sosentiment.disabledistrue.canShowAgentsBanner()hid the banner wheneversentiment.disabledwas set, so brand-new users never saw it.Change
canShowAgentsBanner()now checkssentiment.disabledInWorkspaceinstead ofsentiment.disabled, matchingOPEN_AGENTS_WINDOW_PRECONDITION. Users who turned AI off are still covered bysentiment.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
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 eslinton both changed files: clean.--user-data-dir/--extensions-dirvia Playwright. On Insiders 1.146.0 (before).agents-bannerstaysdisplay: none; on a dev build of this branch (after) it shows "Sign in to GitHub".Before / after
Before
before-insiders-fresh-profile.mp4
After
after-rebased-dev-fix-fresh-profile.mp4
🤖 Authored with GitHub Copilot on behalf of Alexandru Dima (@alexdima).