Skip to content

Try avoiding extra refreshes of github repos#312040

Merged
mjbvz merged 1 commit intomicrosoft:mainfrom
mjbvz:dev/mjbvz/key-warbler
Apr 23, 2026
Merged

Try avoiding extra refreshes of github repos#312040
mjbvz merged 1 commit intomicrosoft:mainfrom
mjbvz:dev/mjbvz/key-warbler

Conversation

@mjbvz
Copy link
Copy Markdown
Collaborator

@mjbvz mjbvz commented Apr 22, 2026

onDidAuthenticationChange seems to be getting fired very often in some cases, but that doesn't mean we should always make requests

`onDidAuthenticationChange`seems to be getting fired very often in some cases, but that doesn't mean we should always make requests

Co-authored-by: Copilot <copilot@github.com>
Copilot AI review requested due to automatic review settings April 22, 2026 23:39
@mjbvz mjbvz enabled auto-merge April 22, 2026 23:39
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

Reduces unnecessary GitHub code search repo status refreshes triggered by frequent onDidAuthenticationChange events by only refreshing when the cached GitHub session identity actually changes.

Changes:

  • Track last-seen anyGitHubSession and permissiveGitHubSession IDs and short-circuit if unchanged.
  • Limit auth-change-triggered status refreshes to GitHub repos (instead of all repo types).
Show a summary per file
File Description
extensions/copilot/src/platform/workspaceChunkSearch/node/codeSearch/codeSearchChunkSearch.ts Avoids redundant repo status refreshes on auth-change events by comparing GitHub session IDs before refreshing.

Copilot's findings

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

@mjbvz mjbvz merged commit c56018b into microsoft:main Apr 23, 2026
30 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.118.0 milestone Apr 23, 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.

3 participants