fix: show rate limit error with reset time in CI Analytics (#244)#602
fix: show rate limit error with reset time in CI Analytics (#244)#602mallya-m wants to merge 2 commits into
Conversation
…-byte-coder#244) - Check for 403 status before generic error handling - Parse X-RateLimit-Reset header and convert to local time - Show yellow warning with reset time instead of silent failure - Disable Refresh button until rate limit resets - Auto-clears error and re-enables button after reset time passes
|
@mallya-m 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. |
GSSoC Label Checklist 🏷️@Priyanshu-byte-coder — please apply the appropriate labels before merging: Difficulty (pick one):
Quality (optional):
Validation (required to score):
|
|
PR is ready for review. Here's what was fixed:
Could you please add:
Thanks! |
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
Please fix before merging:
- Missing EOF newline — all changed files must end with
\n - Hardcoded Tailwind colors — replace with CSS vars:
text-yellow-400→text-[var(--warning)]ortext-[var(--muted-foreground)]border-yellow-500/20→border-[var(--border)]text-red-400→text-[var(--destructive)]border-red-500/30→border-[var(--border)]
The rate limit display feature itself looks good — just needs these polish fixes.
|
@Priyanshu-byte-coder both issues fixed:
Ready for merge! |
|
@Priyanshu-byte-coder the E2E failure is the same pre-existing |
Summary
Closes #244
Fixes the CI Analytics refresh button silently failing when GitHub API is rate-limited (403). Users now see a clear yellow warning with the exact reset time, and the button is disabled until the rate limit resets automatically.
Type of Change
Changes Made
res.status === 403before generic error handling inCIAnalytics.tsxX-RateLimit-Resetheader and convert Unix timestamp to local HH:MM usingtoLocaleTimeString()setTimeoutwhen reset time passesHow to Test
npm run devChecklist
npm run lintpasses locallynpm run type-check)