Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a343e51ba2
ℹ️ 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".
| if !self.hasInstalledWeeklyLimitResetObserver { | ||
| NotificationCenter.default.addObserver( | ||
| self, | ||
| selector: #selector(self.handleWeeklyLimitResetNotification(_:)), | ||
| name: .codexbarWeeklyLimitReset, | ||
| object: nil) | ||
| self.hasInstalledWeeklyLimitResetObserver = true |
There was a problem hiding this comment.
Register reset observer before refresh tasks start
Move this observer setup earlier in startup: UsageStore kicks off Task { await self.refresh() } during initialization (Sources/CodexBar/UsageStore.swift), which can post .codexbarWeeklyLimitReset before applicationDidFinishLaunching runs. On a cold launch right after a weekly reset, that first notification is dropped and the confetti event never appears even though the detector fired.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
is P2 all you got?!
also how can it post notif before applicationDidFinishLaunching 😱
|
@zats Please help fix the failing CI checks. |
Bringing some joy for the weekly limits reset with opt-in confetti setting
Screen.Recording.2026-04-21.at.6.20.59.PM.2.mp4
TLDR is every time we fetch usage we compare was the previous weekly usage was > 1% and new is ≤ 1% - if condition is met we fire confetti