Skip to content

feat(#567): admin UI for channel API keys - #608

Merged
Weegy merged 4 commits into
byte5ai:mainfrom
sneumannb5:feat/567-admin-ui-for-channel-api-keys
Aug 12, 2026
Merged

feat(#567): admin UI for channel API keys#608
Weegy merged 4 commits into
byte5ai:mainfrom
sneumannb5:feat/567-admin-ui-for-channel-api-keys

Conversation

@sneumannb5

@sneumannb5 sneumannb5 commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

What

Adds /admin/api-keys (create/list/revoke) for the channel API keys exposed by createAdminKeysRouter, which shipped in #438/#439 with no web-ui page. Closes #567 (follow-through from #550).

Why

Keys could only be minted via curl, and a public MCP key-binding (#550) is keyed on ApiKeyRecord.id - so an operator had to read that id out of the API by hand. Each key row now shows the id verbatim with a one-click copy, plus a reveal-once token, a scopes:[] guard, and a two-step revoke.

Test plan

  • npm run typecheck in web-ui
  • npx eslint app/admin/api-keys app/_lib/api.ts app/admin/page.tsx
  • npx vitest run app/admin/api-keys - 15/15 pass (incl. copy-id flow + 2 concurrency regression guards)
  • npm run i18n:check - en/de parity, 3379 keys
  • manual: create key → copy id → paste into an MCP binding; revoke → confirm row flips to Revoked

Risk / blast radius

Frontend only — the channel-api router is unchanged (no schema, no public API, no env-var). Auth inherits the existing /api operator-session gate. No rotate path by design (revoke + replace).

Naming-decisions still pending


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

sneumannb5 and others added 4 commits August 3, 2026 16:00
Merging current main into this branch surfaced three things the branch's
last CI run (2026-08-03) could not have caught:

- The raw-<button> lint gate added by byte5ai#616 on 2026-08-09 makes CopyIdButton
  a hard eslint error. It is a bespoke inline data chip whose own label is
  the key id in the mono-data register, so it takes the rule's documented
  escape hatch with a reason, matching the SlotEditor/graph precedent.
- The `reloadSeqRef` out-of-order guard was asserted by no test: deleting
  the sequence check left all 15 tests green. Added a regression test that
  resolves the mount fetch after a post-create reload and asserts the stale
  list is discarded — it fails without the guard and passes with it.
- Dropped the internal issue numbers from the admin card description
  (en + de). They mean nothing to an operator, and the catalog had only one
  other such reference in 3565 keys.

Also adds the CHANGELOG entry under [Unreleased] that the orphaned twin of
this work (byte5ai#551, merged into an already-squashed base and never reaching
main) carried.
@Weegy
Weegy merged commit fc976f7 into byte5ai:main Aug 12, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Admin UI for channel API keys (#438/#439 follow-through)

2 participants