Compare commits

..
2 changed files with 2 additions and 5 deletions

View file

@ -214,7 +214,7 @@ title). Its own esbuild bundle (`matrix-accounts.js`); no SSE — it reads
`/api/state` once for the agent picker and otherwise works off two
purpose-built endpoints.
An agent picker (populated from `state.containers`, the live roster) drives a list of that
An agent picker (populated from `state.agents`) drives a list of that
agent's configured accounts — name, homeserver, and a token-status dot —
read from `GET /api/matrix-accounts?agent=<name>`
`{ accounts: [ { name, homeserver, token_present } ] }`. The status

View file

@ -31,10 +31,7 @@ async function loadState() {
if (!resp.ok) return;
const s = await resp.json();
renderServerWarnings(s.server_warnings);
// `/api/state` exposes the live roster under `containers` (each entry an
// object carrying `.name`); there is no top-level `agents` field, so the
// picker stays compatible with both string + object shapes defensively.
agents = (s.containers || [])
agents = (s.agents || [])
.map((a) => (typeof a === 'string' ? a : a && a.name))
.filter(Boolean)
.sort();