Show a person their own use and what is left of their budgets

The account page (was "Your keys") shows the last thirty days of the
person's own use - requests, tokens, spend and tokens per day - and, for
each place they can spend, what they used there and a bar for every
budget that applies: their own, a per-member one, or a project's, team's
or organization's shared with others, named as such. Bars turn amber past
four-fifths and red when spent. It sits under the keys now, above the
password form.

Spend is read from the usage table for the pool each limit counts
against, from the start of its period.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5.5 committed 2026-09-28 22:51:13 +02:00
1 parent 6b1f8b0827
commit 16a1e8b4d8
8 files changed
+480 -20

No files matched your search

+10
View File
@@ -522,3 +522,13 @@ table.repo-files td:last-child .opt { display: block; margin-bottom: .2rem; }
.bubble.md table { width: auto; max-width: 100%; display: block; overflow-x: auto; font-size: .85rem; }
.bubble.md th, .bubble.md td { padding: .25rem .6rem; border-bottom: 1px solid var(--line); }
.bubble.md blockquote { border-left: 3px solid var(--line); padding-left: .75rem; color: var(--muted); }
/* How much of a budget is gone, on a person's own page. */
.budget { max-width: 34rem; margin: .4rem 0 .6rem; }
.budget-head { display: flex; justify-content: space-between; gap: 1rem; font-size: .85rem; color: var(--muted); }
.budget-head b { color: var(--fg); font-variant-numeric: tabular-nums; }
.budget-bar { height: .5rem; border-radius: 999px; background: var(--card); border: 1px solid var(--line); overflow: hidden; margin-top: .25rem; }
.budget-bar > span { display: block; height: 100%; background: var(--accent); }
.budget.near .budget-bar > span { background: var(--warn); }
.budget.over .budget-bar > span { background: var(--bad); }
.budget.over .budget-head b { color: var(--bad); }
.own-use .tile { min-width: 9rem; }