Skip to content

Fix budget spend bar: show zero-spend, hide budgets without per-user … - #302

Merged
AarushiShah-db merged 2 commits into
mainfrom
show-budget-spend-bar
Aug 10, 2026
Merged

Fix budget spend bar: show zero-spend, hide budgets without per-user …#302
AarushiShah-db merged 2 commits into
mainfrom
show-budget-spend-bar

Conversation

@AarushiShah-db

Copy link
Copy Markdown
Collaborator

…threshold

Two fixes for the managed budget spend bar:

  • Treat an absent current_spend (with a threshold present) as $0, not "no budget". A developer with a per-user threshold but no spend yet this period gets effective_threshold set and current_spend omitted, and was seeing a blank instead of a $0 bar. A present-but-unparseable spend still counts as no spend so corrupt data isn't masked.
  • In ucode setup, only offer budgets that have a per-user alert threshold — spend routing measures against one, so a budget with only a shared alert leaves every tier inert. The listing can't reveal the alert's action, so this hides the clearly-unusable budgets and the server enforces the block action on create.

Also isolate ENABLE_MANAGED_AGENT_CONFIG in the test fixture so the dev's shell env can't change what the CLI does mid-test.

Co-authored-by: Isaac

…threshold

Two fixes for the managed budget spend bar:

- Treat an absent current_spend (with a threshold present) as $0, not "no
  budget". A developer with a per-user threshold but no spend yet this period
  gets effective_threshold set and current_spend omitted, and was seeing a
  blank instead of a $0 bar. A present-but-unparseable spend still counts as no
  spend so corrupt data isn't masked.
- In `ucode setup`, only offer budgets that have a per-user alert threshold —
  spend routing measures against one, so a budget with only a shared alert
  leaves every tier inert. The listing can't reveal the alert's action, so this
  hides the clearly-unusable budgets and the server enforces the block action
  on create.

Also isolate ENABLE_MANAGED_AGENT_CONFIG in the test fixture so the dev's shell
env can't change what the CLI does mid-test.

Co-authored-by: Isaac
@tt-le
tt-le self-requested a review August 10, 2026 15:40
@AarushiShah-db
AarushiShah-db enabled auto-merge (squash) August 10, 2026 15:55
@AarushiShah-db
AarushiShah-db merged commit 52d9152 into main Aug 10, 2026
2 checks passed
@AarushiShah-db
AarushiShah-db deleted the show-budget-spend-bar branch August 10, 2026 16:00
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