Add telemetry for chat quota notification banners#321793
Merged
pwang347 merged 5 commits intoJun 19, 2026
Merged
Conversation
Closes microsoft#320996 Adds telemetry events to track when users see and interact with consumption quota checkpoint notification banners: - chat.quotaNotificationShown: Emitted when banner renders - chat.quotaNotificationDismissed: Emitted when user dismisses - chat.quotaNotificationActionInvoked: Emitted when user clicks action Implementation adds lifecycle events (onDidShow, onDidAction, onDidDismiss) to ChatInputNotificationService and wires telemetry through the real widget render path with deduplication logic. Includes integration test using production services and DOM interactions to verify telemetry flows through the real pipeline. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds explicit “shown” and “action invoked” signals to chat input notifications so ChatQuotaNotificationContribution can log quota-notification telemetry on real UI render, dismiss, and action interactions (plus unit + integration coverage).
Changes:
- Extended
IChatInputNotificationServicewithonDidShow/onDidActionand correspondingshowNotification/actionNotificationAPIs. - Updated
ChatInputNotificationWidgetto emit “shown” on render and “action invoked” on action clicks. - Added quota-notification telemetry wiring + new integration tests that exercise the real widget DOM path.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/browser/chatQuotaNotification.ts | Logs shown/dismissed/action telemetry for the quota notification using new service events. |
| src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.ts | Adds show/action events + tracking state needed to avoid duplicate “shown” emissions. |
| src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationWidget.ts | Emits show/action signals from the actual render and click paths. |
| src/vs/workbench/contrib/chat/test/browser/chatQuotaNotification.test.ts | Updates mocks and adds unit tests for quota notification telemetry behaviors. |
| src/vs/workbench/contrib/chat/test/browser/chatQuotaNotification.integrationTest.ts | New integration tests verifying telemetry via the real widget DOM interactions. |
| src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostPermissionUiContribution.test.ts | Updates fake notification service to satisfy new interface members. |
Copilot's findings
- Files reviewed: 6/6 changed files
- Comments generated: 2
- Add validation that commandId exists in notification actions before emitting event - Guard mock service methods against deleted state to match real service behavior Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Giuspepe
previously approved these changes
Jun 18, 2026
benvillalobos
previously approved these changes
Jun 18, 2026
pwang347
reviewed
Jun 18, 2026
pwang347
reviewed
Jun 18, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
lramos15
approved these changes
Jun 19, 2026
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.
Closes #320996
Summary
Adds telemetry to track when users see and interact with Copilot chat consumption quota checkpoint notification banners.
Changes
Telemetry events added:
Implementation details:
Testing
pm run precommit passed (hygiene clean)
Validation
Samples of each banner being displayed:

Sample of one event being dismissed:

Sample of CTA click:
