Skip to content

enhance: do not refresh repositories in inactive tabs - #2864

Open
bertyhell wants to merge 2 commits into
sourcegit-scm:developfrom
bertyhell:perf/defer-refresh-inactive-tabs
Open

bertyhell wants to merge 2 commits into
sourcegit-scm:developfrom
bertyhell:perf/defer-refresh-inactive-tabs

Conversation

@bertyhell

Copy link
Copy Markdown

Every opened repository owns a file system watcher whose timer refreshes branches, commits and local changes whenever something changes on disk, even when its tab is not visible. With many tabs open, a build or a fetch in a background repository keeps running git status/git log for nothing.

  • The watcher of a repository that is not in the active tab keeps collecting changes but skips refreshing. Once the tab becomes active again, the pending changes are refreshed at the next tick.
  • While inactive, it runs a lightweight git status --porcelain once per batch of changes so the dirty indicator of the tab stays up to date.
  • Explicit refreshes made by the app itself (initial load, after operations) are not affected.

🤖 Generated with Claude Code

claude and others added 2 commits November 9, 2026 08:09
Every opened repository owns a file system watcher whose timer refreshes
branches, commits and local changes whenever something changes on disk,
even when its tab is not visible. With many tabs open, a build or a fetch in
a background repository keeps running `git status`/`git log` for nothing.

The watcher of a repository that is not in the active tab now keeps
collecting changes but skips refreshing. Once the tab becomes active again,
the pending changes are refreshed at the next tick. Explicit refreshes made
by the app itself (initial load, after operations) are not affected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KCxH1zwDXLd9kfAAkcf6PZ
While a repository is in an inactive tab, its watcher now runs a lightweight
`git status --porcelain` once per batch of changes and only updates the dirty
indicator of the tab. Local changes themselves are still refreshed once the
tab becomes active again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

2 participants