Fix budget spend bar: show zero-spend, hide budgets without per-user … - #302
Merged
Conversation
…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
self-requested a review
August 10, 2026 15:40
tt-le
approved these changes
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…threshold
Two fixes for the managed budget spend bar:
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