Add quota warning controls and markers#852
Conversation
55dfc55 to
410a88d
Compare
410a88d to
4931dbb
Compare
4931dbb to
2edab0d
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2edab0d997
ℹ️ 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".
| self.handleQuotaWarningTransition(provider: provider, window: .session, rateWindow: snapshot.primary) | ||
| self.handleQuotaWarningTransition(provider: provider, window: .weekly, rateWindow: snapshot.secondary) |
There was a problem hiding this comment.
Map quota warning windows using provider-aware window selection
Do not hard-code .session to snapshot.primary and .weekly to snapshot.secondary for all providers. Some providers intentionally place non-weekly quotas in the secondary lane (for example Copilot chat-only plans keep chat in secondary), so this logic can mislabel chat/session depletion as a weekly warning and skip the real session warning path when primary is nil. This leads to incorrect/missed notifications whenever providers do not use primary/secondary as strict session/weekly windows.
Useful? React with 👍 / 👎.
2edab0d to
b50e0e4
Compare
steipete
left a comment
There was a problem hiding this comment.
Reviewed quota warning controls/markers, fixed startup-default seeding and local script-runner churn, rebased on main, and live-tested the rebuilt app. Thanks @Alekstodo!
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b50e0e4a8e
ℹ️ 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".
| warningMarkerPercents: Self.warningMarkerPercents( | ||
| thresholds: input.quotaWarningThresholds[.session], | ||
| showUsed: input.usageBarsShowUsed)) |
There was a problem hiding this comment.
Map warning markers using provider-aware window routing
The marker mapping in this metric path assumes primary is always the session window by hard-wiring .session thresholds here (with the inverse assumption for secondary in secondaryMetric). That breaks providers where window placement differs (for example, Copilot can expose session quota via secondary fallback), causing warning markers to appear on the wrong bar or not appear for the actual session lane. This makes the new quota markers misleading even when thresholds are configured correctly.
Useful? React with 👍 / 👎.
Summary
Tests