fix(console): render unknown utilisation as unknown - #18
Merged
Conversation
`BudgetBar` learned to render an absent value as unknown and `BudgetHistory` was updated to stop coercing one, but `SharedBudgets` still passed `b.used ?? 0`. A shared per-key budget with no single live counter therefore kept drawing a bar at 0% in that view — the exact reading this change exists to remove, and the one place an operator goes to compare counters across graphs. `Targets.vue` and `Overview.vue` already pass `worst_used` through untouched, and that field is never null, so they needed nothing. Claude-Session: https://claude.ai/code/session_012K8u7BEJyd6nDNMCQAgH3z
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.
Problem
The API deliberately returns
utilisation: nullfor scoped budgets because there is no single live counter. The shared Vue helper fell back to(value ?? 0) / ceiling, turning that explicit unknown into0%. Budget History then displayed an empty green bar as if nothing had been spent.Fix
valuenorusedexists or the ceiling is unusable;BudgetBarto receive a nullusedvalue;Review notes for Alice
Known zero remains
0%; only missing/null data becomes—. Existing overview and shared-budget bars continue to pass numeric values. The helper change centralizes the semantic distinction already documented in the API code.Verification
npm run build