feat(remote): fetch every remote and report partial failures - #39
Conversation
cheat2001
left a comment
There was a problem hiding this comment.
Thanks Chris, continuing past a failing remote is the right call and the fetchRemotes helper with its test is good. The auto fetch rewrite has a bug I can't ship though, and a couple of the UI choices go against how the status bar works today.
The big one: once a remote fails, pending keeps only the failed names and only empties when every remote succeeds. So with one dead remote (a stale fork upstream is the usual case) origin never gets auto fetched again, and the red "Fetch incomplete" stays up for good. I'd drop the pending set: fetch all remotes on every tick, mark fetched when at least one succeeded, and carry the failed names in the hint.
Pull needs to keep calling markFetched. A pull does fetch, and "Fetched 2m ago" updating after a pull is what #18 asked for. The CLAUDE.md line was describing that on purpose.
The "Fetch pending" notice replaces "Fetched 2m ago" and can go stale: the hidden/busy branch sets it, then the 30 second guard returns early without clearing it. I'd rather not show it at all. The old text is the fact people want, pending is an internal state.
Offline: every remote fails, so the status bar goes red with raw libgit2 text in the hint for the whole session. Before this a failed auto fetch was silent. Keep it faint, name the remotes that failed, and leave the error text to the toast from a manual Fetch.
Smaller: the retry is a hardcoded 4 minutes regardless of the Auto fetch setting. The Fetch button is disabled with no remotes but the hint still says "Fetch origin", say why instead. Put the CLAUDE.md note in the StatusBar and RepositoryPage entries rather than under G42, add a CHANGELOG line, and an e2e for the new status bar state would be good since the existing one only covers the success path. Title it as a conventional commit (feat(remote): ...) so the squash lands clean.
libgit2 Remote::push looks up the glob as a literal ref. Enumerate local tags
and push refs/tags/{name}:refs/tags/{name} so Push with tags works.
f89bc15 to
41453de
Compare
|
Addressed the review in
All six CI checks pass on the rebased PR. |
A failing remote used to stop the loop, so the remotes after it were never fetched. Every remote is tried on each run, the fetched time updates when any succeeds, and the failed names show as a faint status bar hint. Pull marks the repository fetched again.
cheat2001
left a comment
There was a problem hiding this comment.
Thanks Chris, this is exactly what I asked for. Every remote on every tick, the fetched time survives a partial failure, and the incomplete hint stays quiet. The two Playwright tests cover the cases I was worried about, nice.
I'm folding it into 0.17.0, which goes out today, so no rebase needed from you. Your two commits land squashed as one under your name.
41453de to
9707d4d
Compare
Summary
Fetch all configured remotes and surface any partial failures.
Changes