Skip to content

feat(mac): add balanced quota peek and ring-to-bar motion - #101

Open
ericjypark wants to merge 1 commit into
mainfrom
codex/mac-quota-peek
Open

ericjypark wants to merge 1 commit into
mainfrom
codex/mac-quota-peek

Conversation

@ericjypark

@ericjypark ericjypark commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Selecting one provider now uses both notch tabs: its logo stays on the left and a compact quota ring appears on the right. Hovering unfolds the ring into a usage bar while revealing the reset countdown. With two providers, each side shows the percentage above the reset time.

  • Keep equal, fixed side widths as readings and provider selections change; retain space between long countdowns and provider logos.
  • Synchronize the countdown reveal with the gauge transition, including interrupted opening and closing. The peek transition intentionally remains animated when macOS Reduce Motion is enabled.
  • Preserve Used/Remaining mode, weekly fallback, and the distinction between unavailable readings and a measured zero. A refresh no longer replaces a real zero with a loading dot.
  • Add localized captions and geometry regression coverage. This PR does not change VERSION or the update configuration.

Validation: the full Swift regression runner, including 1,228 gauge geometry checks; universal build and demo smoke launch; native 24 pt and 38 pt layouts, one/two providers, long countdowns, zero/missing readings, and interrupted transitions. Native captures verify layout and endpoints; physical hover frame pacing was not measured.

Summary by CodeRabbit

  • New Features

    • Added compact quota gauges showing usage, remaining quota, percentages, reset information, and quota windows.
    • Added animated quota visuals that transition between circular and bar-style indicators.
    • Added Simplified Chinese translations for quota and reset labels.
  • Improvements

    • Updated peek-state overlays to display more relevant quota information.
    • Narrowed the peek-state layout for a more compact appearance.
    • Improved loading, fallback, accessibility, and reduced-motion behavior for quota indicators.
  • Tests

    • Added coverage to verify quota gauge rendering and animation geometry.

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: ad9c1ae4-48a5-4e1b-9816-c4445f123556

📥 Commits

Reviewing files that changed from the base of the PR and between 1a0634d and d147f6e.

📒 Files selected for processing (9)
  • Resources/en.lproj/Localizable.strings
  • Resources/zh-Hans.lproj/Localizable.strings
  • Sources/Model/IslandModel.swift
  • Sources/Views/CompactQuotaGauge.swift
  • Sources/Views/IslandRootView.swift
  • Sources/Views/NotchPeekPill.swift
  • Sources/Views/UnrollingQuotaShape.swift
  • Tests/QuotaGaugeGeometryTests.swift
  • scripts/run-tests.sh

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

Changes

Quota gauge and peek pill

Layer / File(s) Summary
Quota gauge geometry and rendering
Sources/Views/UnrollingQuotaShape.swift, Sources/Views/CompactQuotaGauge.swift
Adds an animated quota shape and a compact gauge with usage percentage, progress, fallback rendering, and localized labels.
Peek pill content modes
Sources/Views/NotchPeekPill.swift
Adds gauge, ring, stacked, reset, and percentage content modes. Updates loading, fallback, animation, and accessibility-related display behavior.
Peek overlay integration and layout
Sources/Model/IslandModel.swift, Sources/Views/IslandRootView.swift, Resources/*/Localizable.strings
Updates peek overlay selection, sizing, reveal progress, accessibility state, and localized quota labels.
Quota gauge geometry validation
Tests/QuotaGaugeGeometryTests.swift, scripts/run-tests.sh
Adds path geometry checks and compiles and runs them from the test script.

Priority: ➖ Normal

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

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant IslandRootView
  participant PeekPillOverlay
  participant NotchPeekPill
  participant CompactQuotaGauge
  IslandRootView->>PeekPillOverlay: configure gauge content and reveal progress
  PeekPillOverlay->>NotchPeekPill: pass content mode and gauge dimensions
  NotchPeekPill->>CompactQuotaGauge: render gauge mode
  CompactQuotaGauge-->>NotchPeekPill: display quota path and text
  NotchPeekPill-->>PeekPillOverlay: return rendered pill
  PeekPillOverlay-->>IslandRootView: display peek overlay
Loading

Suggested reviewers: keepsilence233

Merge Risk: ⚪ Minimal · up to d147f

This change reworks how quota information is shown in the notch peek area, adds localized labels, and narrows the peek silhouette. The concerns raised during review did not hold up: the quota views compile as written, and screen-reader users still receive quota and reset information in the states where it is visible. No merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 7 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: balanced quota peek behavior and ring-to-bar motion for macOS.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 7 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/mac-quota-peek

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