Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Add a setting to fully disable background PR state polling (causes editor to jump/scroll on focus regain)

Aberta
#9,077 0 comentários 0 reações 1 responsável Ver no GitHub

Mantenedores costumam responder em até 1 dia

@alexr00 já está trabalhando nisso.

Desde 20/10/2026.

Avaliação

Esta issue ainda não foi avaliada.

Descrição

Summary

ReviewManager polls for PR state changes on a hardcoded schedule with no way to disable it:

// src/view/reviewManager.ts
private static readonly MIN_POLL_INTERVAL_MS = 1000 * 60 * 5;   // 5 min
private static readonly MAX_POLL_INTERVAL_MS = 1000 * 60 * 30;  // 30 min

pollForStateChange() is started unconditionally in the constructor and re-armed on every onDidChangeWindowState focus event (with 15-60s jitter). There is no vscode.workspace.getConfiguration(...) check anywhere in this path - polling cannot be turned off short of patching the extension.

Impact

In a workspace with many git repositories (e.g. a monorepo with dozens of submodules - each gets its own FolderRepositoryManager/ReviewManager), regaining window focus causes every repo's poller to fire in a burst. For the repo with the actively checked-out PR, if hasNewPullRequests() reports activity, updateState() re-resolves the PR and re-applies CommentThreads on any currently open file with review comments. Recreating those comment threads forces VS Code to re-layout the editor, which visibly scrolls/jumps the cursor - repeatedly, every time focus returns and backoff hasn't kicked in yet.

This is a recurrence of the same user-visible symptom reported in #4159 (duplicate of #4031, fixed in 0.54.0 for a different repro involving GitLens) - but the underlying mechanism (periodic background refresh disturbing editor state) has no off switch today.

Request

Add a setting (e.g. githubPullRequests.disableBackgroundPolling or similar) to disable the automatic poll entirely, relying on the existing manual refresh command instead. Note that manual refresh already goes through a separate updateState() call path, not through doPoll(), so this wouldn't need to touch that.

Environment
  • VS Code: 1.141.1
  • Extension: GitHub Pull Requests and Issues
  • Workspace: multi-repo (submodules), Remote
Linguagem predominante
TypeScript
Estrelas
2.6k
Forks
804
Merge médio
1d 15h
PRs com merge (30d)
54

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de microsoft/vscode-pull-request-github

Todas as issues de microsoft/vscode-pull-request-github

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.