Show on the quotas page the limits that actually apply

A branch with no limit of its own read "—" in every column while its
organization held it to sixty requests a minute. Each cell now shows
the strictest value from above, muted and marked with an arrow, naming
its source on hover and in the form's placeholders. A larger value set
under a stricter one says what caps it, for rate and token limits as
well as budgets; only budgets were checked before.

The table follows the people page: indented tree, tinted organizations,
spend with a meter that turns red past 90%, a form that opens and saves
without reloading (htmx, falling back to plain links), and the
explanations folded under "How limits combine".

Rows are built from the store's Tree, so a project sits under its team
by id. Matching the start of its path put projects under the wrong team
when two organizations shared a name.

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 18:19:49 +02:00
1 parent be9f45aa94
commit 429c05a319
5 files changed
+283 -133

No files matched your search

+34
View File
@@ -396,3 +396,37 @@ form.narrow, .narrow-form form { max-width: 30rem; }
.capacity-cpu { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; margin: .2rem 0 1rem; }
.capacity-cpu b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.capacity-cpu span { color: var(--muted); font-size: .85rem; }
/* Quotas: the tenancy tree as a table. Depth is indentation and a guide line,
organizations are tinted, and a limit held from above is muted and arrowed. */
table.quota-tree td { vertical-align: top; }
table.quota-tree .q-where { padding-left: .8rem; }
table.quota-tree tr.q-depth-1 .q-where { padding-left: 2rem; }
table.quota-tree tr.q-depth-2 .q-where { padding-left: 3.2rem; }
table.quota-tree tr.q-depth-0 > td { background: color-mix(in srgb, var(--accent) 5%, var(--card)); }
table.quota-tree tr.q-depth-0 .q-name { font-weight: 600; }
.q-kind { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-left: .3rem; }
.q-sub { font-size: .78rem; color: var(--muted); margin-top: .15rem; }
.q-warn { color: var(--warn); }
.q-up { color: var(--muted); font-style: italic; cursor: help; }
.q-none { color: var(--line); }
.q-per { color: var(--muted); font-size: .8em; }
.q-spent { white-space: nowrap; }
.q-spend { font-variant-numeric: tabular-nums; display: inline-block; min-width: 3.5rem; text-align: right; }
.q-meter { display: inline-block; width: 5rem; height: .45rem; background: var(--line); border-radius: 3px;
margin: 0 .4rem 0 .6rem; vertical-align: middle; overflow: hidden; }
.q-meter i { display: block; height: 100%; background: var(--accent); }
.q-meter.hot i { background: var(--bad); }
.q-pct { font-size: .78rem; color: var(--muted); }
.q-act { text-align: right; white-space: nowrap; }
.q-form { max-width: 46rem; }
.q-form .field-row { align-items: flex-end; }
.q-form .field-row label { flex: 1 1 8rem; }
.q-form .field-row label.q-period { flex: 0 0 auto; }
.q-form-title { margin: .2rem 0 .4rem; font-size: .88rem; }
.q-form-actions { display: flex; gap: 1rem; align-items: center; margin-top: .6rem; }
.q-form-actions .danger { margin-left: auto; }
.q-legend { font-size: .8rem; color: var(--muted); margin: .5rem 0 0; }
details.explain { margin-top: 1.5rem; font-size: .88rem; color: var(--muted); }
details.explain > summary { cursor: pointer; color: var(--accent); }
details.explain p { max-width: 48rem; }