[Relay] Admin Panel — Event Queue + Account Whitelist Dashboard #49
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What & Why
Timmy's relay operator needs a dashboard to oversee the relay without touching a CLI or SQL. This panel surfaces the event moderation queue, the account whitelist, and key relay health stats inside the existing Matrix workshop UI — scoped behind a simple admin gate.
Done looks like
/admin/relayroute), visible only whenADMIN_TOKENenv var is set and user supplies it on first loadADMIN_TOKENas Bearer header; token stored in localStorage after first entryOut of scope
Tasks
/admin/relay, prompt for token, store in localStorage, include as Bearer on all admin API calls. API server validates againstADMIN_TOKENenv var.GET /api/admin/relay/queue?status=pending; render event list with Approve/Reject buttons; refresh every 15 s.GET /api/admin/relay/accounts; render whitelist table with Revoke button; pubkey input form for manual grants.GET /api/admin/relay/stats(event counts by status today, account count); render as metric cards at top of panel.Relevant files
artifacts/api-server/src/routes/index.tsthe-matrix/js/ui.jsthe-matrix/index.htmlPR #75 created. The admin panel (auth gate, stats bar, queue tab, accounts tab) was already fully implemented in
admin-relay-panel.tswith supporting APIs inadmin-relay.tsandadmin-relay-queue.ts. This PR wires it into the Matrix UI by adding a "RELAY ADMIN" button to the top action bar, visible only when the admin token is in localStorage.