Skip to content

feat(remote): fetch every remote and report partial failures - #39

Merged
cheat2001 merged 3 commits into
cheat2001:mainfrom
ChrisLauinger77:codex/fetch-all-remotes
Sep 22, 2026
Merged

cheat2001 merged 3 commits into
cheat2001:mainfrom
ChrisLauinger77:codex/fetch-all-remotes

Conversation

@ChrisLauinger77

@ChrisLauinger77 ChrisLauinger77 commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fetch all configured remotes and surface any partial failures.

Changes

  • Updated remote fetching to process every configured remote.
  • Added reporting for remotes that fail while allowing successful fetches to complete.

@cheat2001 cheat2001 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ChrisLauinger77 ChrisLauinger77 changed the title Fetch every remote and report partial failures feat(remote): fetch every remote and report partial failures Sep 22, 2026
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.
@ChrisLauinger77

Copy link
Copy Markdown
Contributor Author

Addressed the review in 41453de and rebased the branch onto the latest main.

  • Auto fetch now attempts every configured remote on each run, so a failing remote does not stop healthy remotes from being fetched later. It retries on the configured interval and updates the fetched time when at least one remote succeeds.
  • Pull updates the fetched time again. The status bar keeps that time visible, removes the pending notice, and shows a faint incomplete hint with only the failed remote names. Manual Fetch still shows detailed errors in its toast.
  • The disabled Fetch button now explains when no remotes are configured. I updated CLAUDE.md and CHANGELOG.md and added unit and Playwright coverage for partial failure, offline failure, recovery, and the status bar behavior.

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
cheat2001 previously approved these changes Sep 22, 2026

@cheat2001 cheat2001 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@cheat2001
cheat2001 force-pushed the codex/fetch-all-remotes branch from 41453de to 9707d4d Compare September 22, 2026 16:25
@cheat2001
cheat2001 merged commit 9707d4d into cheat2001:main Sep 22, 2026
@ChrisLauinger77
ChrisLauinger77 deleted the codex/fetch-all-remotes branch September 22, 2026 16:27
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.

3 participants