feat(gui): show reset credit expiration time - #613
Conversation
|
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 (5)
📝 WalkthroughWalkthroughAdds cached locale-aware date and date-time formatting, exposes the new formatter through account-pool utilities, and passes locale data through credit displays and reset confirmation text. Existing invalid-date fallback, urgency styling, and day calculations remain unchanged. ChangesCredit date formatting
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e16c92eb8d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| year: "numeric", | ||
| }); | ||
|
|
||
| const CREDIT_DATE_TIME_FORMAT = new Intl.DateTimeFormat(undefined, { |
There was a problem hiding this comment.
Format the expiration time with the selected UI locale
When the user selects a dashboard language different from the browser language, this formatter still uses the browser default because it is constructed with undefined; for example, a German dashboard on an English browser embeds an English Jul 31, 2026, 02:34 PM timestamp in the German expiration text instead of the expected German date and 24-hour time. Pass the active I18nContext.locale through CodexCreditItem and cache or construct the formatter for that locale, as the quota reset formatters already do.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@gui/tests/intl-formatters.test.ts`:
- Around line 5-14: Update the tests around formatCreditDate and
formatCreditDateTime to derive the expected localized hour/minute component from
the test ISO value using the appropriate locale-aware formatter. Assert that
formatCreditDate excludes this component and formatCreditDateTime includes it,
while retaining the existing placeholder check and avoiding the hardcoded
"12:34" value.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 8652c8e3-7108-4399-bbbb-8d138ba6bcc8
📒 Files selected for processing (4)
gui/src/components/codex-account-pool-helpers.tsxgui/src/components/codex-account-pool-utils.tsgui/src/intl-formatters.tsgui/tests/intl-formatters.test.ts
Maintainer review (bug + security)Verdict: APPROVE (optional follow-ups below) SecurityNo medium+ XSS / locale-injection / sensitive-data issues. Dates go through Bug review / open bot threads
Non-blocking notes
Notes
|
|
Will get merged after interal code work lands on dev. |
Transition workflow completed
|
Summary
Verification
bun run typecheckbun run testChecklist
Summary by CodeRabbit
Improvements
Bug Fixes
—) for both date-only and date-time displays.Tests