Repository navigation
feat(qol): error boundaries + rate-limit aware fetching - #37
Merged
Merged
Conversation
Quality-of-life pair from the backlog: Error boundaries - New ErrorBoundary component (Try again / Reload, error message, console log). - App-level wrap on the root route, per-view wrap around the Home main column — keyed by scope/repo/slot so navigating away auto-resets, and the sidebar lives outside the boundary so a crashed scope leaves navigation usable. - The standalone /repos/:owner/:name route gets its own boundary. Rate-limit awareness (v1) - store/rateGate.ts: passive quota tracking — gql()/rest() report the x-ratelimit-* headers every response already carries (zero extra calls), and the dedicated rateLimit query feeds the graphql pool. The volatile per-minute 'search' pool is deliberately ignored. - When a tracked pool drops under 5% (min 100), react-query's focus/reconnect refetching pauses (queries.ts gate). Manual actions and initial loads are unaffected; the gate self-lifts once the window resets. - Dashboard topbar turns the quota readout red with ⚠ and a "background refresh paused until <reset>" tooltip while low. - 6 new tests (rateGate thresholds, header parsing, search-pool ignore, reset behavior) — suite now 35 tests / 8 files. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The two quality-of-life picks from the backlog.
🛟 Error boundaries
ErrorBoundary(friendly fallback: error message + Try again / Reload app)./repos/:owner/:nameroute gets its own.⏳ Rate-limit aware fetching (v1)
store/rateGate.ts— passive quota tracking:gql()/rest()report thex-ratelimit-*headers every response already carries (zero extra API calls), plus the dedicatedrateLimitquery feeds the graphql pool. The volatile per-minutesearchpool is deliberately ignored (it self-heals; gating on it would cause false alarms).Tests
6 new (thresholds, header parsing, search-pool ignore, reset behavior) → suite is now 35 tests / 8 files.
npm run checkgreen.Verify
Note: branched from
main— independent of the still-open #36 (no file overlap).🤖 Generated with Claude Code