Skip to content

Fix stale chat input warning message#314594

Closed
pwang347 wants to merge 3 commits into
mainfrom
pawang/staleWarning
Closed

Fix stale chat input warning message#314594
pwang347 wants to merge 3 commits into
mainfrom
pawang/staleWarning

Conversation

@pwang347
Copy link
Copy Markdown
Member

@pwang347 pwang347 commented May 6, 2026

Fixes #314436

Copilot AI review requested due to automatic review settings May 6, 2026 00:00
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 addresses stale chat input quota/limit notifications by ensuring ChatQuotaService clears previously cached quota data when authentication changes and no longer provides quota information (e.g. sign-out), preventing UI warnings from persisting across accounts/sessions.

Changes:

  • Clear cached quota/rate-limit state and emit onDidChange when an auth change occurs without valid quotaInfo.
  • Add a new Vitest suite covering quota initialization, exhaustion logic, and clearing behavior on sign-out / missing quota info.
  • Validate that clearing triggers change events only when there was prior quota state.
Show a summary per file
File Description
extensions/copilot/src/platform/chat/test/common/chatQuotaService.spec.ts Adds unit tests for ChatQuotaService quota state transitions and onDidChange behavior during auth changes.
extensions/copilot/src/platform/chat/common/chatQuotaServiceImpl.ts Clears stale quota/rate-limit state on auth changes where quota info is missing, and fires onDidChange when clearing occurs.

Copilot's findings

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

// Clear stale quota data when auth changes without quota info
// (e.g. user signed out). This ensures quota-exhausted
// notifications from the previous account don't persist.
if (this._quotaInfo) {
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Screenshot Changes

Base: c7bc16d4 Current: 0a61a404

Changed (11)

chat/input/chatInput/Default/Dark
Before After
before after
chat/input/chatInput/WithArtifacts/Light
Before After
before after
chat/input/chatInput/WithFileChanges/Dark
Before After
before after
chat/input/chatInput/WithFileChanges/Light
Before After
before after
chat/input/chatInput/WithTodos/Dark
Before After
before after
chat/input/chatInput/WithTodosAndFileChanges/Dark
Before After
before after
chat/input/chatInput/WithArtifactsAndFileChanges/Light
Before After
before after
chat/widget/chatWidget/SimpleQA/Light
Before After
before after
chat/widget/chatWidget/PendingToolApproval/Light
Before After
before after
agentSessionsViewer/WithDiffChanges/Dark
Before After
before after
agentSessionsViewer/WithDiffChanges/Light
Before After
before after

@pwang347 pwang347 closed this May 7, 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.

Monthly limit warning persisted if signed out

2 participants