ui(pool): pick an account's users from its own Edit

Each account row in the Account pool card has a pencil: tick the users
whose sessions run on it (one moves off any other account, unticking sends
one back to the balancer). PUT /api/accounts/:name/users saves the set in one
transaction, audits each change and switches a Claude login into each added
user's home at once. The card-level switch button and pinned list are gone.
This commit is contained in:
2026-10-19 10:45:54 +07:00
parent 776ad6466f
commit c042adc51b
11 changed files with 305 additions and 232 deletions
+5 -3
View File
@@ -425,9 +425,11 @@ How a new session picks its account (`server/lib/claude-pool.js`):
- A token more than a year old is skipped.
- A resumed session picks an account again, like a new one.
- **Switching a user to one account.** An admin can take one user off the
ranking: **Switch a user's account** in the Account pool card (or
`agenthub accounts pin <account> <user> [--tool codex]`, `unpin <user>` for
automatic again; their own password again, audited). Every session in a
ranking: the pencil (**Edit**) on that account's row in the Account pool
card — tick the users who run on it, untick to send one back to automatic (or
`agenthub accounts pin <account> <user> [--tool codex]`, `unpin <user>`; their
own password again, each change audited). A user ticked on one account
moves off any other. Every session in a
workspace that user OWNS then runs on that account, even when it is full;
other users are not affected, and the account is not reserved for them.
- **A Claude login switches at once, without a restart.** The server first