Repository navigation
Description
Summary
The API Keys section on the Settings page (Settings.vue:93-296) lets users save and test an Anthropic API Key and a GitHub PAT, but exposes no way to remove either once saved. The only way to delete a saved key today is to call the backend DELETE endpoint directly or edit the DB. Other Settings sections that store secrets/configuration may have the same gap.
Context
Backend DELETE endpoints already exist:
DELETE /api/settings/anthropic-api-key→src/backend/routers/settings.py:202(db.delete_setting('anthropic_api_key'))DELETE /api/settings/github-pat→src/backend/routers/settings.py:368(db.delete_setting('github_pat'))- Generic
DELETE /api/settings/{key}→settings.py:1315
The frontend simply never exposes them. In src/frontend/src/views/Settings.vue:93-296, the section renders only Test + Save buttons. There is no Delete/Clear/Remove control, even when the key is already configured (anthropicKeyStatus.configured === true / githubPatStatus.configured === true).
This is not the per-user MCP API Keys page (src/frontend/src/views/ApiKeys.vue) — that one does have revoke/delete (ApiKeys.vue:120, 126). The bug is specifically the platform settings "API Keys" section on /settings.
User impact:
- Cannot rotate by deletion + re-add (must overwrite, which works for valid keys but doesn't help when the user wants to unconfigure the platform — e.g., move to per-agent subscription auth)
- Cannot recover from "key saved but I want it gone" without DB access
- Inconsistent with sibling sections (Subscriptions, Email Whitelist, GitHub Templates) which all expose Remove/Delete
The reporter also suspects similar gaps in other Settings sections — worth a sweep as part of this fix.
Reproduction
- Open
/settingsas an admin user - Scroll to the API Keys section
- Save an Anthropic API Key (or GitHub PAT)
- Status shows "Configured" — but there is no button anywhere on the row to remove it
Acceptance Criteria
- API Keys section: Anthropic API Key row shows a Remove/Clear button when
anthropicKeyStatus.configured === true, wired toDELETE /api/settings/anthropic-api-key - API Keys section: GitHub PAT row shows a Remove/Clear button when
githubPatStatus.configured === true, wired toDELETE /api/settings/github-pat - Confirmation dialog before deletion (consistent with
revokeKey/deleteKeypattern inApiKeys.vue) - After deletion, status returns to "Not configured" without a page reload
- Audit other Settings sections (
Settings.vue) for the same pattern — any section that lets you save a singleton config value but never lets you clear it. Candidates to review:- MCP Server URL (
#1113) — copy says "Leave empty to auto-detect", which implies clearable; verify it actually is - Trinity Prompt (
#872) — verify saving an empty value works - SSH Access (
#1295) - Agent Quotas (
#1335) - Slack Integration tokens (
#318) if they're stored as secrets
- MCP Server URL (
- Any other section with the same gap gets the same Remove treatment
Technical Notes
Files:
src/frontend/src/views/Settings.vue:93-296— the API Keys section markupsrc/backend/routers/settings.py:202, 368— existing DELETE endpoints (no backend work needed for the two known cases)src/frontend/src/views/ApiKeys.vue:120-126, 482-525— reference pattern for confirm-then-delete UX
Suggested implementation: copy the confirm-dialog + fetch DELETE pattern from ApiKeys.vue::revokeKey / deleteKey. Add a third button Remove next to Test/Save in each row, conditionally rendered when the key is configured. Reset local state (anthropicKey = '', refresh anthropicKeyStatus) after successful DELETE.
Out of scope: the per-user MCP API Keys page (ApiKeys.vue) — that already has working revoke/delete.
Activity
feat(settings): add Remove buttons for stored API keys + Slack (#459)
feat(settings): add Remove buttons for stored API keys + Slack (#459) (…
Release: v0.5.0 (Abilityai#608)