Backoff on refresh when no changes found by alexr00 · Pull Request #8811 · microsoft/vscode-pull-request-github · GitHub
Skip to content

Backoff on refresh when no changes found#8811

Open
alexr00 wants to merge 1 commit into
mainfrom
alexr00/crowded-otter
Open

Backoff on refresh when no changes found#8811
alexr00 wants to merge 1 commit into
mainfrom
alexr00/crowded-otter

Conversation

@alexr00

@alexr00 alexr00 commented Jun 25, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings June 25, 2026 13:56
@alexr00 alexr00 enabled auto-merge (squash) June 25, 2026 13:56
@alexr00 alexr00 self-assigned this Jun 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 ReviewManager’s periodic polling to use an exponential backoff when refreshes don’t detect state changes, reducing unnecessary work over time while still resetting to a minimum interval when changes are observed.

Changes:

  • Introduces a backoff-based polling interval (min/max + multiplier) and applies it across poll cycles.
  • Updates polling to detect “change” based on PR number / head SHA and avoids false positives by preserving the previous commit SHA in a no-op validate path.
  • Adds a new test suite covering backoff behavior, focus-triggered refresh behavior, and max-interval capping.
Show a summary per file
File Description
src/view/reviewManager.ts Implements polling backoff logic, adjusts focus-triggered polling behavior, and refines “no meaningful change” handling to stabilize change detection.
src/test/view/reviewManager.test.ts Adds unit tests validating backoff growth/reset, focus-triggered polling behavior, and maximum interval cap.

Copilot's findings

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

Comment thread src/view/reviewManager.ts
Comment thread src/test/view/reviewManager.test.ts
Comment thread src/view/reviewManager.ts
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