Skip to content

fix(kimi): prioritize 5-hour window in automatic mode#390

Open
ratulsarna wants to merge 4 commits intomainfrom
codex/pr-310-audit
Open

fix(kimi): prioritize 5-hour window in automatic mode#390
ratulsarna wants to merge 4 commits intomainfrom
codex/pr-310-audit

Conversation

@ratulsarna
Copy link
Collaborator

@ratulsarna ratulsarna commented Feb 17, 2026

Summary

  • Keep Kimi usage snapshot semantics aligned with main.
  • In Automatic metric mode, prefer Kimi 5-hour rate-limit data when available.
  • Align highest-usage provider selection with the same Kimi window preference.
  • Add focused coverage for Kimi automatic metric selection and highest-usage selection.

Validation

  • pnpm check
  • swift test --filter StatusItemAnimationTests --filter UsageStoreCoverageTests --filter KimiUsageSnapshotConversionTests
  • ./Scripts/compile_and_run.sh

Thanks @ajaxjiang96 for the original Kimi changes.

ajaxjiang96 and others added 4 commits February 17, 2026 13:18
Following the data swap in commit f14971a where rate limit became primary
and weekly became secondary, update the UI labels to match:
- sessionLabel (shown for primary): "Weekly" → "Rate Limit"
- weeklyLabel (shown for secondary): "Rate Limit" → "Weekly"

This ensures the UI displays:
- "Rate Limit" label with rate limit data
- "Weekly" label with weekly data

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
When rateLimitWindow is nil, set secondary to nil instead of weeklyWindow
to prevent showing the same weekly metric twice under different labels.

Before:
- No rate limit → primary: weekly, secondary: weekly (duplicate)
After:
- No rate limit → primary: weekly, secondary: nil (correct)
- Has rate limit → primary: rate limit, secondary: weekly (correct)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@ratulsarna ratulsarna changed the title fix(kimi): align labels across usage surfaces fix(kimi): prioritize 5-hour window in automatic mode Feb 17, 2026
@ratulsarna ratulsarna marked this pull request as ready for review February 17, 2026 17:07
@ratulsarna
Copy link
Collaborator Author

@ajaxjiang96 Can you verify this fixes the issue?

@ratulsarna ratulsarna added the question Further information is requested label Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

question Further information is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments