Skip to content

fix(desktop): abort repos fetch on unmount + retry transient rate limits#168

Merged
oratis merged 1 commit into
mainfrom
ux/github-fetch-robustness
Jun 14, 2026
Merged

fix(desktop): abort repos fetch on unmount + retry transient rate limits#168
oratis merged 1 commit into
mainfrom
ux/github-fetch-robustness

Conversation

@oratis

@oratis oratis commented Jun 14, 2026

Copy link
Copy Markdown
Owner

The last two GitHub-dialog backlog items.

  • Repos fetch abort: "Your repositories" had no AbortController, so closing the dialog mid-fetch updated stale state and could flip the spinner after unmount. It now aborts on unmount and when superseded, and only the latest request owns the loading spinner.
  • Transient rate-limit retry: a new ghFetch() wrapper retries once on GitHub's secondary (abuse) rate limit — 403/429 with a short Retry-After (≤ 8 s) — used by openFile / enterDir / loadRepos. A primary rate limit (no / far-future Retry-After) still surfaces as an error with the sign-in hint instead of hanging.

tsc ✓ · vitest (3) ✓ · biome ✓ · build ✓.

🤖 Generated with Claude Code

… limits

Two robustness fixes for the GitHub dialog's fetches:

- The "Your repositories" fetch had no AbortController, so closing the dialog
  before it resolved updated stale state (and the spinner could flip after
  unmount). It now aborts on unmount and when superseded, and only the latest
  request owns the loading spinner.
- New ghFetch() wrapper retries once on GitHub's *secondary* (abuse) rate limit
  — 403/429 with a short Retry-After (≤ 8s) — used by openFile/enterDir/loadRepos.
  A *primary* rate limit (no/far Retry-After) still surfaces as an error with the
  sign-in hint rather than hanging.

tsc ✓ · vitest (3) ✓ · biome ✓ · build ✓.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@oratis oratis merged commit 3d4bd83 into main Jun 14, 2026
4 checks passed
@oratis oratis deleted the ux/github-fetch-robustness branch June 14, 2026 11:11
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.

1 participant