Problem
A passive git fetch started by an ordinary refresh (subscription, window focus, or a file-modifying tool) never triggers a status re-read after it settles. GitStatusStore.updateGitStatus() starts the fetch in the background (tryFetchWorkspaces → fetchWorkspace) and reads status at the same time. When the fetch, or one of its delayed secondary-repo fetches, brings new remote refs, the footer's ahead/behind and incoming counts keep showing the pre-fetch refs until the next trigger.
This behavior already exists on main. Before #5566, unrelated workspace metadata events re-read status on every event, which hid the problem in busy sessions. #5566 removes that churn on purpose. It adds a post-fetch re-read only for fetches forced by a checkout change.
Reproduction
- Open workspace A whose branch tracks a remote.
- Push a new commit to A's upstream from another clone.
- Focus the Xum window. Xum reads status and starts a passive fetch at the same time.
- Wait for the fetch to finish. The footer still shows the old behind count until the next focus, workspace switch, or file edit.
Desired behavior
After a passive fetch (and its secondary-repo fetches) succeeds, read status once more, with a bound. Constraints:
lastFetch is recorded before the secondary fetches settle, and a completion-triggered refresh can wait through the 3 s debounce. Either delay can make the fetch key due again. A naive "refresh after every fetch" can then loop: fetch → refresh → fetch.
- Do not double the status runs for every focus or file trigger when no refs changed. Consider comparing ref state, or re-reading only when the fetch output reports updated refs.
Tests: one status re-read after a fetch that updated refs, no loop across the debounce and backoff windows, and no extra runs when nothing changed.
Owner and trigger
Owner: @ThomasK33 (perf owner). Follow-up trigger: after #5566 lands.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high
Problem
A passive
git fetchstarted by an ordinary refresh (subscription, window focus, or a file-modifying tool) never triggers a status re-read after it settles.GitStatusStore.updateGitStatus()starts the fetch in the background (tryFetchWorkspaces→fetchWorkspace) and reads status at the same time. When the fetch, or one of its delayed secondary-repo fetches, brings new remote refs, the footer's ahead/behind and incoming counts keep showing the pre-fetch refs until the next trigger.This behavior already exists on
main. Before #5566, unrelated workspace metadata events re-read status on every event, which hid the problem in busy sessions. #5566 removes that churn on purpose. It adds a post-fetch re-read only for fetches forced by a checkout change.Reproduction
Desired behavior
After a passive fetch (and its secondary-repo fetches) succeeds, read status once more, with a bound. Constraints:
lastFetchis recorded before the secondary fetches settle, and a completion-triggered refresh can wait through the 3 s debounce. Either delay can make the fetch key due again. A naive "refresh after every fetch" can then loop: fetch → refresh → fetch.Tests: one status re-read after a fetch that updated refs, no loop across the debounce and backoff windows, and no extra runs when nothing changed.
Owner and trigger
Owner: @ThomasK33 (perf owner). Follow-up trigger: after #5566 lands.
Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high