Skip to content

fix: use global Left/Used mode in usage notifications - #10

Merged
poweruserz merged 2 commits into
poweruserz:mainfrom
ElliotDrel:fix/usage-notifications-display-mode
Oct 20, 2026
Merged

poweruserz merged 2 commits into
poweruserz:mainfrom
ElliotDrel:fix/usage-notifications-display-mode

Conversation

@ElliotDrel

Copy link
Copy Markdown
Contributor

What changed

  • Pass the existing displayMode setting into the usage-alert path, so Windows notifications show the selected remaining/consumed percentage.
  • Share one small getDisplayedUsage calculation between cards, tray/taskbar percentages and notifications, instead of duplicating the Left/Used conversion.
  • Use existing locale labels, with no additional preference or storage migration.
  • Add unit tests for both modes, invalid limits and mode-independent alert thresholds/deduplication.

Thresholds and pace/reset logic still operate on raw used quota (e.g. 80% used triggers a toast showing 20% left in Left mode).

Closes #8

CI: bun run build + bun run test on pull request.

@github-actions github-actions Bot added the core label Oct 20, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T16:13:58.838974Z da0e5a8 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Copy link
Copy Markdown

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: da0e5a87f6

ℹ️ 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 thread src/lib/usage-alerts.ts Outdated
Comment thread src/lib/usage-alerts.ts Outdated

Copy link
Copy Markdown
Contributor Author

@poweruserz Could you review this PR when you have a chance? It makes usage notifications follow the existing Left/Used preference, with a shared formatter and regression tests. I also addressed both automated review findings in 453f036 (test assertion and all 11 locales). Thanks!

@poweruserz

Copy link
Copy Markdown
Owner

Thanks, this is a real bug and a clean fix! Our AI review skips pull requests from forks, so I pushed your two commits unchanged to a branch here and opened #11 for the review. Once #11 merges, GitHub will mark this PR as merged too. If you push more changes, push them here and I'll sync the branch.

poweruserz added a commit that referenced this pull request Oct 20, 2026
fix: use global Left/Used mode in usage notifications (#10)
@poweruserz
poweruserz merged commit 453f036 into poweruserz:main Oct 20, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: use one canonical Left/Used preference across UI, tray and usage notifications

2 participants