Skip to content

Agents welcome: improve sign-in flow, loading state, and sign-out reset#312750

Merged
sandy081 merged 2 commits into
mainfrom
sandy081/agents-welcome-disclaimer
Apr 27, 2026
Merged

Agents welcome: improve sign-in flow, loading state, and sign-out reset#312750
sandy081 merged 2 commits into
mainfrom
sandy081/agents-welcome-disclaimer

Conversation

@sandy081
Copy link
Copy Markdown
Member

Improves the Agents App welcome screen flow with several UX and correctness fixes.

Changes

Welcome screen improvements

  • Loading animation on first launch: Shows the Agents app logo with a pulse animation while the default account resolves, preventing a flash of sign-in buttons for already-signed-in users
  • Consistent welcome message: Always shows "Welcome to {productName}" regardless of sign-in state — no account name embedded in the title

Sign-in flow correctness

  • isShowingSignIn flag: Prevents premature overlay dismissal during the loading phase. Previously, if the account resolved externally (e.g. VS Code's account provider) while the loading spinner was still visible, the overlay would auto-dismiss before the user ever saw the sign-in screen
  • Returning signed-in users: No overlay shown at all — watchSignInState() runs quietly in the background
  • Returning signed-out users: Sign-in screen renders immediately without a loading delay (account is already known to be null)

Sign-out state reset

  • When the user signs out while the app is running, WELCOME_COMPLETE_KEY is cleared from storage so the next reload shows the full loading overlay instead of briefly flashing the workbench before the sign-in screen appears

Code cleanup

  • Removed showSessionsWelcomeAfterSignOut function (redundant — watchSignInState already handles re-showing the overlay on sign-out)
  • Updated all signatures to use full IDefaultAccountService type instead of Pick<>

Files changed

  • src/vs/sessions/contrib/welcome/browser/sessionsWalkthrough.ts — overlay rendering, loading state, sign-in/welcome screens
  • src/vs/sessions/contrib/welcome/browser/welcome.contribution.ts — orchestration, sign-out reset
  • src/vs/sessions/contrib/welcome/browser/media/sessionsWalkthrough.css — loading animation styles
  • src/vs/sessions/contrib/accountMenu/browser/account.contribution.ts — removed redundant showSessionsWelcomeAfterSignOut
  • src/vs/sessions/contrib/accountMenu/test/browser/account.contribution.test.ts — updated tests
  • src/vs/sessions/contrib/welcome/test/browser/welcome.contribution.test.ts — updated tests

Copilot AI review requested due to automatic review settings April 27, 2026 12:44
lszomoru
lszomoru previously approved these changes Apr 27, 2026
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 the Agents welcome overlay rendering logic in the Sessions walkthrough to improve how the disclaimer is displayed and how focus is managed for keyboard users.

Changes:

  • Toggle the disclaimer visibility based on whether disclaimer links exist (instead of always hiding it in the welcome step).
  • Include disclaimer links in the overlay’s focus trap sequence on the welcome screen.
Show a summary per file
File Description
src/vs/sessions/contrib/welcome/browser/sessionsWalkthrough.ts Adjusts welcome-step disclaimer visibility and adds disclaimer links to the focusable elements list.

Copilot's findings

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

Comment thread src/vs/sessions/contrib/welcome/browser/sessionsWalkthrough.ts
- Show loading animation (Agents app logo pulse) on first launch while
  default account resolves, avoiding flash of sign-in buttons for
  signed-in users
- Add isShowingSignIn flag to prevent premature overlay dismissal
  during the loading phase when account resolves externally
- Returning signed-in users skip the overlay entirely; watchSignInState
  runs quietly in the background
- On sign-out, clear WELCOME_COMPLETE_KEY so next reload shows the
  loading overlay instead of briefly flashing the workbench
- Welcome screen always shows 'Welcome to {productName}' regardless of
  sign-in state — no account name or badge in the message

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sandy081 sandy081 force-pushed the sandy081/agents-welcome-disclaimer branch from 384a7bb to 6db9211 Compare April 27, 2026 13:05
alexdima
alexdima previously approved these changes Apr 27, 2026
- Add isShowingSignIn flag to prevent premature overlay auto-dismiss
  during the loading phase when account resolves before sign-in screen
  is shown
- Guard showWalkthrough and watchSignInState with _store.isDisposed
  check to avoid acting on a disposed contribution after async resumes
- Guard walkthrough.outcome.then continuation against disposed state
- Hide sidebar toggle and secondary sidebar actions when welcome
  overlay is visible (SessionsWelcomeVisibleContext.toNegated())
- Show 'Happy Agentic Coding!' tagline on sign-in screen (was only
  shown on the signed-in welcome screen)
- Delete welcome.contribution.test.ts (tests were not well written)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sandy081 sandy081 merged commit 48c267e into main Apr 27, 2026
26 checks passed
@sandy081 sandy081 deleted the sandy081/agents-welcome-disclaimer branch April 27, 2026 16:35
@vs-code-engineering vs-code-engineering Bot added this to the 1.119.0 milestone Apr 27, 2026
@sandy081 sandy081 added the ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch label Apr 27, 2026
@vs-code-engineering vs-code-engineering Bot added release-cherry-pick Automated cherry-pick between release and main branches and removed ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch labels Apr 27, 2026
@sandy081 sandy081 added ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch release-cherry-pick Automated cherry-pick between release and main branches and removed release-cherry-pick Automated cherry-pick between release and main branches ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch labels Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-cherry-pick Automated cherry-pick between release and main branches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants