Skip to content

Add configurable quota warning notifications#433

Open
DaddioTime wants to merge 3 commits intosteipete:mainfrom
DaddioTime:main
Open

Add configurable quota warning notifications#433
DaddioTime wants to merge 3 commits intosteipete:mainfrom
DaddioTime:main

Conversation

@DaddioTime
Copy link

Notifies users before quota depletion at configurable thresholds (default 50% and 20% remaining). Tracks primary (session) and secondary (weekly) windows independently per provider. Warnings fire once per threshold crossing and auto-reset when quota recovers.

Notifies users before quota depletion at configurable thresholds
(default 50% and 20% remaining). Tracks primary (session) and
secondary (weekly) windows independently per provider. Warnings
fire once per threshold crossing and auto-reset when quota recovers.
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0caa0aa4f7

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@DaddioTime DaddioTime marked this pull request as draft February 25, 2026 21:33
Move lastKnownSecondaryRemaining update into a defer block so it
always runs — even on early return when notifications are disabled —
while still executing after processWarningWindow during normal flow.
@DaddioTime DaddioTime marked this pull request as ready for review February 25, 2026 21:52
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e95004f0b6

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

scoped
}
await MainActor.run {
self.handleQuotaWarningTransition(provider: provider, snapshot: labeled)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reset warning state when selected token account changes

This path applies quota-warning transitions to whichever token account is currently selected, but the warning baselines/fired-threshold state in UsageStore are keyed only by provider/window. If a user switches from one account to another with a very different remaining quota, the first refresh can look like a large downward crossing and emit false warning notifications even though no quota was consumed on the newly selected account.

Useful? React with 👍 / 👎.

@bald-ai
Copy link
Contributor

bald-ai commented Feb 25, 2026

Is this optional? I dont want this anywhere near me.

@DaddioTime
Copy link
Author

@bald-ai Yes, completely optional. Default is false.

Prevents false warning notifications when switching between accounts
with different remaining quotas by clearing baselines and fired
thresholds on account change.
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.

2 participants