feat: handle GitHub API rate limits with user-visible feedback (#93)#404
feat: handle GitHub API rate limits with user-visible feedback (#93)#404Harsh-Codes-77 wants to merge 6 commits into
Conversation
|
@Harsh-Codes-77 is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel. A member of the Team first needs to authorize it. |
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
1. Hardcoded Tailwind colors in RateLimitBanner.tsx — border-amber-500/25, bg-amber-50, text-amber-700 don't respect the theming system. Use border-[var(--warning)]/25 or var(--destructive) variants, or define a --warning CSS var.
2. Missing EOF newlines on githubFetch.ts and RateLimitBanner.tsx.
3. 403 + X-RateLimit-Remaining: 0 not handled — GitHub often returns 403 before ever sending 429 when limits are exhausted. Add detection: if response.status === 403 && response.headers.get('X-RateLimit-Remaining') === '0', treat as rate-limited.
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
Issues found in this PR:
- Raw Tailwind color classes — replace
text-red-*/bg-red-*withtext-[var(--destructive)]/ appropriate CSS var equivalents. All colors must use CSS variables for theme support.
…riables, and resolve missing imports in StreakTracker
|
Merge conflict with current main. Please rebase against main to resolve before this can be merged. |
|
This PR has merge conflicts with |
|
This PR has merge conflicts with Resolve conflicts and force-push. Will be merged once clean and CI passes. |
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
This PR has significant merge conflicts with current main — it appears to be based on an older version of the codebase. Please rebase onto current main and resolve all conflicts before this can be merged.
|
This PR has conflicts with the current |
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
This PR has merge conflicts with main. Please rebase onto the latest main branch and resolve conflicts to proceed with merging.
|
This PR has merge conflicts with |
|
This PR has merge conflicts with the current |
|
This PR has merge conflicts with |
|
This PR has merge conflicts with the current main branch. Please rebase on the latest main to resolve them — your contribution is labeled for GSSoC scoring. |
Handle GitHub API rate limits with user-visible feedback
Implements graceful rate limit handling for GitHub API 429 responses:
githubFetchwrapper utility centralizes 429 detection and throws typedRateLimitErrorRateLimitBannercomponent displays rate limit status with countdown to resetUsers now get immediate, friendly feedback when hitting GitHub API limits instead of confusing error messages.