Skip to content

Add weekly reset confetti#785

Open
zats wants to merge 1 commit intosteipete:mainfrom
zats:weekly-limit-confetti-clean
Open

Add weekly reset confetti#785
zats wants to merge 1 commit intosteipete:mainfrom
zats:weekly-limit-confetti-clean

Conversation

@zats
Copy link
Copy Markdown

@zats zats commented Apr 22, 2026

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

@zats zats changed the title Add weekly reset confetti overlay Add weekly reset confetti Apr 22, 2026
Copy link
Copy Markdown

@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: 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".

Comment on lines +313 to +319
if !self.hasInstalledWeeklyLimitResetObserver {
NotificationCenter.default.addObserver(
self,
selector: #selector(self.handleWeeklyLimitResetNotification(_:)),
name: .codexbarWeeklyLimitReset,
object: nil)
self.hasInstalledWeeklyLimitResetObserver = true
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Author

@zats zats Apr 22, 2026

Choose a reason for hiding this comment

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

is P2 all you got?!
also how can it post notif before applicationDidFinishLaunching 😱

@ratulsarna
Copy link
Copy Markdown
Collaborator

@zats Please help fix the failing CI checks.

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