fix(gui): guard quota reset date formatting - #2405
Conversation
|
✅ Deterministic PR hygiene checks passed. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughQuota reset formatting now shares epoch normalization and invalid-date validation. Future reset formatting returns an empty string for out-of-range timestamps. Tests cover ChangesQuota reset validation
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This narrowly scoped change guards quota reset date formatting so malformed metadata cannot break the Providers page; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
⏳ DRAFT
What to do
Review readiness checklist
✅ 4/4 boxes ticked. This pull request was already a draft. Its draft status will be preserved after every issue above is resolved. |
|
Screenshot waiver requested: this is a defensive invalid-data formatting guard, not a new visual state. The only observable change is that an out-of-range reset timestamp no longer replaces the Providers page with the existing error boundary; normal quota rendering is unchanged, so a screenshot with valid data would be identical. Could a maintainer apply the |
리뷰 · 우선순위 48 / 80설명: 이 PR은 제공자 페이지의 할당량 리셋 시각이 자바스크립트 Date 가 못 담는 숫자일 때, 페이지 전체가 에러 경계로 바뀌지 않게 한다. 지금 CURRENT gui/src/components/QuotaBars.tsx 라인 352 - 지금 HEAD 의 formatResetAt 은 유한 숫자만 보고 Intl 에 바로 넣는다. Invalid Date 에서 RangeError 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
Summary
Date's representable range before callingIntl.DateTimeFormat.Verification
bun test --isolate tests/quota-bars-rows.test.ts— 13 passed, 0 failed, 41 assertions.bun test --isolate ./gui/tests/fr-localization.test.ts— 8 passed, 0 failed, 4,187 assertions.bun run typecheck— passed.bun x tsc -b— passed.oxlint src/components/QuotaBars.tsx— passed.bun run privacy:scan— passed.git diff --check— passed.f0db6a981386104d41f865a438bb6eb332db30d7, based directly ondevat46d41505cc702ce9248890202bb144f9ee2df6f7.Checklist
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit
Bug Fixes
Tests