summaryrefslogtreecommitdiff
path: root/web/style.css
diff options
context:
space:
mode:
authorClaude <noreply@anthropic.com>2026-05-26 20:34:09 +0000
committerClaude <noreply@anthropic.com>2026-05-26 20:34:09 +0000
commitab4b364954af08fa602388495ca425eaef0abf74 (patch)
treec0806a57295270b4d86f097c3d0b6a0e1d631201 /web/style.css
parent32715355fe2eed321df4f7083dfe580d35f8a62a (diff)
feat(api,web): budget headroom endpoint + UI chips (Phase 6)
Adds GET /api/budget returning per-provider rolling-window headroom (empty when budget gating is unconfigured), wired from serve.go via SetBudget. The web UI polls it and renders a chip per limited provider in the header, flagging any under 20% remaining. New pure JS helpers formatBudgetHeadroom/ renderBudgetHeadroom are unit-tested; the endpoint is covered by Go handler tests (empty/reports/500). UI render not browser-verified in this environment. Completes Phase 6: spend accounting + dispatcher gating + observability surface. https://claude.ai/code/session_01SESwn7kQ7oP62trWw6pc39
Diffstat (limited to 'web/style.css')
-rw-r--r--web/style.css21
1 files changed, 21 insertions, 0 deletions
diff --git a/web/style.css b/web/style.css
index f4a9d91..b6f0484 100644
--- a/web/style.css
+++ b/web/style.css
@@ -2034,3 +2034,24 @@ dialog label select:focus {
font-size: 0.85rem;
padding: 6px 10px;
}
+
+/* Budget headroom chips */
+.budget-bar {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 6px;
+ align-items: center;
+}
+.budget-chip {
+ font-size: 0.72rem;
+ padding: 2px 8px;
+ border-radius: 999px;
+ background: var(--bg);
+ border: 1px solid var(--border);
+ color: var(--text-muted);
+ white-space: nowrap;
+}
+.budget-chip--low {
+ border-color: var(--state-budget-exceeded);
+ color: var(--state-budget-exceeded);
+}