Approve accounts from the browser, and draw the traffic
CI / test (push) Successful in 1m19s

Two things the dashboard was missing: it could not act, and it was a column of
numbers.

Account administration moves to /admin/users — approving into a project,
suspending, reinstating. That is the work an operator does constantly and it
should not need a terminal. Three things stay on the CLI, and the line is not
arbitrary: promoting someone to admin, resetting a password, and issuing a key
on another person's behalf each turn a stolen admin session into more than it
was — permanent access, or somebody else's account. Approving and suspending
do not. Suspending signs the account out everywhere, or suspension is advisory
until the session happens to expire, and an admin cannot suspend themselves,
which is not a thing an interface should let you do by misclicking.

The charts are inline SVG generated in Go. A charting library would mean a
JavaScript toolchain in CI and a megabyte of bundle for what is a list of
rectangles, and the single-binary goal rules that out. Hourly over a day: fine
enough to show a working day, coarse enough that one slow minute is not an
incident. Empty hours are filled in, because a chart with hours missing where
nothing happened reads as a chart with hours missing from the data.

The SVG is marked as trusted HTML, so everything that reaches it is either a
number this package computed or escaped explicitly, and a bar's colour can only
be one of four names — a colour that could be anything is a way to write CSS
into every page the chart appears on. There are tests for both.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5 committed 2026-09-16 12:01:42 +02:00
1 parent e519dc587c
commit 859f08da9b
13 files changed
+687 -5

No files matched your search

+23 -3
View File
@@ -261,9 +261,29 @@ llmgw users promote usr-k4mq… --store …
```
Someone without the flag gets a 404 rather than a 403, because 403 confirms the
page exists. The dashboard is read-only in both places: everything that changes
the cluster or issues a credential stays on the CLI, which keeps the worst case
of a stolen admin cookie to "saw the cluster".
page exists.
## Managing accounts from the browser
`/admin/users` lists who is waiting and who is active. Approving (into a project)
and suspending are there, because that is the work an operator does constantly
and it should not need a terminal.
Three things are deliberately not there:
| | Why |
|---|---|
| `llmgw users promote` | An admin who can make admins turns a stolen session into permanent access |
| `llmgw users reset-password` | Setting someone's password is taking over their account |
| `llmgw keys create` | Issuing a credential on another person's behalf |
Each of those turns a stolen admin cookie into more than it was, and each is
rare enough that a shell is no hardship. Cordon, drain and everything else that
touches the cluster are also CLI-only for the same reason: the dashboard shows
the cluster, it does not steer it.
Every administrative action is logged with who did it, including the ones that
were refused.
## What this does not do