Skip to content

fix(server): a zero Git fetch interval also stops the fetch on window focus - #89

Closed
macodev00 wants to merge 762 commits into
mainfrom
cursor/git-fetch-interval-zero-focus-7598
Closed

macodev00 wants to merge 762 commits into
mainfrom
cursor/git-fetch-interval-zero-focus-7598

Conversation

@macodev00

Copy link
Copy Markdown
Owner

Fixes pingdotgg#13235

Problem

Settings → Source Control → Git fetch interval 0 is documented as avoiding automatic Git prompts. That only stopped the periodic remote poller. Focusing the window, or making it visible again, still ran git fetch --quiet --no-tags <remote> through vcs.refreshStatus.

Change

refreshStatus now takes the same fetch interval the status stream already uses. When the interval is zero it reads remote status with refreshUpstream: false and skips the automatic pull, so the refresh still re-reads local status without contacting the remote. The focus and visibility RPC, the status refresh after git mutations, and the worktree handoff refresh all pass the configured interval. Any other interval, including the default, still fetches. Explicit pull, push, and fetch are unchanged.

Scope and approval

Accepted bug pingdotgg#13235. The triage asked for refreshStatus to pass refreshUpstream: false when the Git fetch interval is zero, including the other callers of that refresh.

Verification

vp test run apps/server/src/vcs/VcsStatusBroadcaster.test.ts apps/server/src/mcp/WorktreeMcpService.test.ts — 75 passed.

  • A zero-interval refresh calls remoteStatus with refreshUpstream: false and still invalidates the status cache. A one-minute interval and the default interval pass true.
  • With auto-pull enabled and a cached behind upstream, a zero-interval refresh does not pull. A default refresh does.
  • A status stream at interval zero with auto-pull enabled loads remote status once and does not pull.
  • A worktree handoff refresh passes the configured interval. Zero stays zero. Unset resolves to 30 seconds.

vp run --filter t3 typecheck completed with no errors.

Not checked: a live window-focus session against an SSH agent that prompts. The focus listener still calls vcs.refreshStatus; the server now skips the fetch when the interval is zero.

Model and harness: Grok 4.7 (high effort) in a Cursor Cloud Agent.

Open in Web Open in Cursor 

juliusmarminge and others added 30 commits October 10, 2026 00:36
…editor is a Windows command shim (pingdotgg#17749)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…utput (pingdotgg#17376)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
… again (pingdotgg#17379)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…its thread (pingdotgg#17327)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…a check is still going (pingdotgg#17344)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Yash Singh <saiansh2525@gmail.com>
…dotgg#17223)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Yash Singh <saiansh2525@gmail.com>
…ingdotgg#17843)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…g#17724)

Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
… full-access MCP grants (pingdotgg#17772)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…pull request (pingdotgg#12223)

Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com>
Co-authored-by: Julius Marminge <jmarminge@gmail.com>
Signed-off-by: Loïs Postula <lois@postu.la>
Yash-Singh1 and others added 28 commits October 12, 2026 15:30
…g#18608)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…page (pingdotgg#18666)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ingdotgg#16554)

Co-authored-by: PR Batch Tester <agent@local.test>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… you to a new draft (pingdotgg#18672)

Co-authored-by: PR Batch Tester <agent@local.test>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ct (pingdotgg#18824)

Co-authored-by: PR Batch Tester <agent@local.test>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…stead of crash-looping (pingdotgg#15925)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: PR Batch Tester <agent@local.test>
… resync after a downgrade (pingdotgg#15937)

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: PR Batch Tester <agent@local.test>
… MCP servers (pingdotgg#17058)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Yash Singh <saiansh2525@gmail.com>
…ught (pingdotgg#18887)

Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
…is offline (pingdotgg#18698)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…18853)

Co-authored-by: SAPHID <saphid@users.noreply.github.com>
Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
pingdotgg#18900)

Co-authored-by: Pawel Mikolajczuk <pmikolajczuk@atlassian.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
… focus

Setting the interval to 0 only stopped the periodic poller. Focusing the
window or making it visible still refreshed status with a git fetch.

refreshStatus now takes that interval. At zero it reads the cached
upstream and skips the automatic pull. Any other interval still fetches.
@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Oct 13, 2026
@macodev00 macodev00 closed this Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Window focus runs git fetch even with Git fetch interval set to 0