Skip to content

refactor: simplify menu bar to weekly-only quota and drop Codex Radar - #29

Merged
lonewolfyx merged 1 commit into
mainfrom
simplify/weekly-only-quota
Jul 13, 2026
Merged

lonewolfyx merged 1 commit into
mainfrom
simplify/weekly-only-quota

Conversation

@lonewolfyx

@lonewolfyx lonewolfyx commented Jul 13, 2026 •

Copy link
Copy Markdown
Member

Reduce the menu bar to a single weekly quota window and remove the
Codex Radar (model/reasoning-level) data source, shrinking the status
item footprint and popover height.

  • QuotaSnapshot: merge primary/secondary windows into a single weekly
    window; remove ModelReasonEntry/ModelReasonSnapshot models
  • CodexRateLimitService: parse only the 10080-min (1w) window, drop the
    5h short window and selectMenuWindows; switch error to
    missingWeeklyQuotaWindow
  • Remove CodexRadarService and the radar refresh timer/scheduling in
    QuotaStore
  • MenuBarQuotaView: drop the 5h row, separator, and model/reason rows;
    switch to the system menu bar font; statusItem width 168 -> 76
  • QuotaPopoverView / TokenUsageSectionView: tighten popover and chart
    heights (popover 660/624 -> 520, chart 72 -> 56)
  • I18n: remove currentSession; rename resetCreditDefaultTitle to
    "Rate-limit reset" / "额度重置"
  • Package.swift: pin Sparkle to exact: "2.9.4"; sync Package.resolved

Summary by CodeRabbit

  • New Features

    • Simplified quota tracking to display a single weekly usage window.
    • Reduced menu bar and popover layouts for a more compact experience.
    • Updated quota and reset messaging in English and Simplified Chinese.
  • Bug Fixes

    • Improved quota parsing and weekly usage reporting.
    • Reduced the token usage section height for a more compact display.
  • Refactor

    • Removed model-reasoning and radar data from the app.
    • Pinned the Sparkle update framework to version 2.9.4.

  Reduce the menu bar to a single weekly quota window and remove the
  Codex Radar (model/reasoning-level) data source, shrinking the status
  item footprint and popover height.

  - QuotaSnapshot: merge primary/secondary windows into a single weekly
    window; remove ModelReasonEntry/ModelReasonSnapshot models
  - CodexRateLimitService: parse only the 10080-min (1w) window, drop the
    5h short window and selectMenuWindows; switch error to
    missingWeeklyQuotaWindow
  - Remove CodexRadarService and the radar refresh timer/scheduling in
    QuotaStore
  - MenuBarQuotaView: drop the 5h row, separator, and model/reason rows;
    switch to the system menu bar font; statusItem width 168 -> 76
  - QuotaPopoverView / TokenUsageSectionView: tighten popover and chart
    heights (popover 660/624 -> 520, chart 72 -> 56)
  - I18n: remove currentSession; rename resetCreditDefaultTitle to
    "Rate-limit reset" / "额度重置"
  - Package.swift: pin Sparkle to exact: "2.9.4"; sync Package.resolved
@lonewolfyx
lonewolfyx merged commit d9c3d4b into main Jul 13, 2026
1 check was pending
@coderabbitai

coderabbitai Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e88adeb2-85c2-43bb-8bd6-1aa734252752

📥 Commits

Reviewing files that changed from the base of the PR and between 38985d7 and eaf7cd1.

📒 Files selected for processing (11)
  • Package.resolved
  • Package.swift
  • Sources/AgentBar/App/AppDelegate.swift
  • Sources/AgentBar/Localization/I18n.swift
  • Sources/AgentBar/Models/QuotaModels.swift
  • Sources/AgentBar/Services/CodexRadarService.swift
  • Sources/AgentBar/Services/CodexRateLimitService.swift
  • Sources/AgentBar/Store/QuotaStore.swift
  • Sources/AgentBar/UI/MenuBarQuotaView.swift
  • Sources/AgentBar/UI/QuotaPopoverView.swift
  • Sources/AgentBar/UI/TokenUsageSectionView.swift

📝 Walkthrough

Walkthrough

The quota system now uses a single weekly window, removes Codex Radar model-reason tracking, simplifies quota displays, adjusts layout dimensions, updates localization, and pins Sparkle to version 2.9.4.

Changes

Weekly quota flow

Layer / File(s) Summary
Sparkle dependency pinning
Package.swift, Package.resolved
Sparkle is pinned exactly to 2.9.4 and its resolved revision is updated.
Quota model and refresh pipeline
Sources/AgentBar/Models/QuotaModels.swift, Sources/AgentBar/Services/CodexRateLimitService.swift, Sources/AgentBar/Store/QuotaStore.swift
QuotaSnapshot now contains one weekly window; rate-limit parsing and serialization use it, while Codex Radar models and refresh scheduling are removed.
Quota UI and localization
Sources/AgentBar/Localization/I18n.swift, Sources/AgentBar/UI/MenuBarQuotaView.swift, Sources/AgentBar/UI/QuotaPopoverView.swift, Sources/AgentBar/App/AppDelegate.swift
Menu bar and popover views render weekly quota data, Radar bindings are removed, quota wording is updated, and dimensions are reduced.
Token usage layout
Sources/AgentBar/UI/TokenUsageSectionView.swift
Token usage chart and unavailable-state heights are reduced from 72 to 56 points.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch simplify/weekly-only-quota

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant