Skip to content

feat(menubar): custom daily budget amount#506

Merged
iamtoruk merged 1 commit into
mainfrom
feat/menubar-custom-budget-entry
Jun 18, 2026
Merged

feat(menubar): custom daily budget amount#506
iamtoruk merged 1 commit into
mainfrom
feat/menubar-custom-budget-entry

Conversation

@iamtoruk

Copy link
Copy Markdown
Member

Follow-up to #505 (metric-aware daily budget for #497): the budget could only be a fixed preset. This adds manual entry.

Change (macOS menubar Settings)

  • Adds a "Custom…" option to the Daily budget picker. Selecting it reveals a text field:
    • Cost metric: dollars (with a $ prefix).
    • Token metrics: amount in millions of tokens (stored as value * 1_000_000).
  • The typed value is written to the same dailyBudget / dailyTokenBudget fields, so the flame tint and the "budget exceeded" banner use it with no further changes.
  • On opening Settings, a previously saved non-preset value reselects "Custom…" and pre-fills the field.
  • Empty/invalid input is treated as 0 (off); negatives are clamped.

Validation

  • swift build (mac package) passes.
  • macOS app, so not covered by the JS suite. Runtime check: pick "Custom…", type an amount, confirm it persists, the picker keeps showing "Custom…" after reopening, and the alert triggers at the typed threshold.

The daily budget could only be one of a few fixed presets. Add a "Custom…"
option to the budget picker that reveals a text field for an exact amount:
dollars for the cost metric, millions of tokens for the token metrics. The
typed value is stored in the same dailyBudget / dailyTokenBudget fields, so
the flame tint and banner pick it up unchanged. On open, a previously saved
non-preset value reselects "Custom…" and pre-fills the field.
@iamtoruk iamtoruk merged commit 8467b10 into main Jun 18, 2026
3 checks passed
@iamtoruk iamtoruk deleted the feat/menubar-custom-budget-entry branch June 18, 2026 11:17
@reneleonhardt

Copy link
Copy Markdown

Thank you so much for reacting super fast! ❤️

There are no automatic builds so there are no attachment artifacts to try myself.
If possible next time, please attach a screenshot so see the change in action.

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