Skip to content

Add quota warning thresholds#831

Closed
Alekstodo wants to merge 1 commit intosteipete:mainfrom
Alekstodo:codex/quota-warning-thresholds
Closed

Add quota warning thresholds#831
Alekstodo wants to merge 1 commit intosteipete:mainfrom
Alekstodo:codex/quota-warning-thresholds

Conversation

@Alekstodo
Copy link
Copy Markdown
Contributor

Summary

  • Closes Allow configurable alert thresholds with notification bubbles and sounds. #617 by adding opt-in quota warning notifications for session and weekly quota windows.
  • Adds sanitized global threshold settings with defaults of 50% and 20% remaining, plus a global notification sound toggle.
  • Adds provider/window overrides that live in ProviderConfig and inherit global settings until customized.
  • Reuses the existing SessionQuotaNotifier / UsageStore notification path and keeps depleted/restored 0% behavior unchanged.

Notes

Testing

  • DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer swift test --filter QuotaWarning
  • DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer swift test --filter UsageStoreSessionQuotaTransitionTests
  • DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer swift test --filter SettingsStoreTests
  • DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer swift test --filter CodexActiveSourceConfigTests
  • DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer ./Scripts/lint.sh lint
  • DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer swift test builds and runs, but the full suite currently reports 4 failures in existing HistoricalUsagePace tests unrelated to this change.
  • DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer ./Scripts/compile_and_run.sh builds the release binary, then fails during ad-hoc codesigning/packaging because the generated CodexBar.app / bundled Sparkle.framework has macOS resource-fork/Finder metadata.

@Alekstodo
Copy link
Copy Markdown
Contributor Author

Closing for now while we continue local validation before opening the upstream PR.

@Alekstodo Alekstodo closed this May 3, 2026
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.

Allow configurable alert thresholds with notification bubbles and sounds.

1 participant