From 5533bdb8b63ecfef2685ef67892ead83f8c54fb3 Mon Sep 17 00:00:00 2001
From: Lee Jackson <130007945+Imagineer99@users.noreply.github.com>
Date: Mon, 4 May 2026 14:56:38 +0100
Subject: [PATCH] Studio: Change API Keys settings to API Access (#5268)
* chore: change API Keys settings to API Access
* chore: replace key with plug svg
* chore: replace API access with developer and related SVG
* chore: rename API keys menu to developer
* fix: focus active settings tab on open
* fix: prevent settings autofocus on open
* Revert "fix: prevent settings autofocus on open"
This reverts commit 4b64d73edaf696f07b1c52e4c76a6868ab703303.
---
.../frontend/src/components/app-sidebar.tsx | 6 ++---
.../src/features/settings/api/api-keys.ts | 6 ++---
.../settings/components/api-key-row.tsx | 2 +-
.../settings/components/create-key-form.tsx | 8 +++----
.../settings/components/key-reveal-card.tsx | 4 ++--
.../src/features/settings/settings-dialog.tsx | 24 +++++++++++++++++--
.../features/settings/tabs/api-keys-tab.tsx | 14 +++++------
.../features/settings/tabs/general-tab.tsx | 4 ++--
8 files changed, 44 insertions(+), 24 deletions(-)
diff --git a/studio/frontend/src/components/app-sidebar.tsx b/studio/frontend/src/components/app-sidebar.tsx
index 88a0b03a21..171b4eb92d 100644
--- a/studio/frontend/src/components/app-sidebar.tsx
+++ b/studio/frontend/src/components/app-sidebar.tsx
@@ -37,12 +37,12 @@ import {
Delete02Icon,
Download03Icon,
GemIcon,
- Key01Icon,
Search01Icon,
PowerIcon,
PencilEdit02Icon,
LayoutAlignLeftIcon,
Settings02Icon,
+ SourceCodeSquareIcon,
ZapIcon,
} from "@hugeicons/core-free-icons";
import {
@@ -548,8 +548,8 @@ export function AppSidebar() {
useSettingsDialogStore.getState().openDialog("api-keys")}
>
-
- API Keys
+
+ Developer
New
diff --git a/studio/frontend/src/features/settings/api/api-keys.ts b/studio/frontend/src/features/settings/api/api-keys.ts
index 73d7b50def..5bf3f2825b 100644
--- a/studio/frontend/src/features/settings/api/api-keys.ts
+++ b/studio/frontend/src/features/settings/api/api-keys.ts
@@ -15,7 +15,7 @@ export interface ApiKey {
export async function fetchApiKeys(): Promise {
const res = await authFetch("/api/auth/api-keys");
- if (!res.ok) throw new Error("Failed to load API keys");
+ if (!res.ok) throw new Error("Failed to load API access");
const data = (await res.json()) as { api_keys: ApiKey[] };
return data.api_keys.filter((k) => k.is_active);
}
@@ -29,7 +29,7 @@ export async function createApiKey(
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ name, expires_in_days: expiresInDays }),
});
- if (!res.ok) throw new Error("Failed to create API key");
+ if (!res.ok) throw new Error("Failed to create access token");
return res.json();
}
@@ -37,5 +37,5 @@ export async function revokeApiKey(keyId: number): Promise {
const res = await authFetch(`/api/auth/api-keys/${keyId}`, {
method: "DELETE",
});
- if (!res.ok) throw new Error("Failed to revoke API key");
+ if (!res.ok) throw new Error("Failed to revoke access token");
}
diff --git a/studio/frontend/src/features/settings/components/api-key-row.tsx b/studio/frontend/src/features/settings/components/api-key-row.tsx
index f121045e1e..ced6de17d1 100644
--- a/studio/frontend/src/features/settings/components/api-key-row.tsx
+++ b/studio/frontend/src/features/settings/components/api-key-row.tsx
@@ -92,7 +92,7 @@ export function ApiKeyRow({
className="text-destructive focus:text-destructive"
>
- Revoke key
+ Revoke token
diff --git a/studio/frontend/src/features/settings/components/create-key-form.tsx b/studio/frontend/src/features/settings/components/create-key-form.tsx
index 2166abf3cf..a0f2d7f82d 100644
--- a/studio/frontend/src/features/settings/components/create-key-form.tsx
+++ b/studio/frontend/src/features/settings/components/create-key-form.tsx
@@ -34,7 +34,7 @@ export function CreateKeyForm({
onCreated(result.key);
setName("");
} catch (err) {
- onError(err instanceof Error ? err.message : "Couldn't create key.");
+ onError(err instanceof Error ? err.message : "Couldn't create access token.");
} finally {
setLoading(false);
}
@@ -49,9 +49,9 @@ export function CreateKeyForm({
setName(e.target.value)}
- placeholder="Key name (e.g. production)"
+ placeholder="Token name (e.g. production)"
className="h-8 min-w-[180px] flex-1 text-sm"
- aria-label="New key name"
+ aria-label="New access token name"
/>
{EXPIRY_PRESETS.map((p) => {
@@ -75,7 +75,7 @@ export function CreateKeyForm({
})}
diff --git a/studio/frontend/src/features/settings/components/key-reveal-card.tsx b/studio/frontend/src/features/settings/components/key-reveal-card.tsx
index ab258537da..2b589e88fe 100644
--- a/studio/frontend/src/features/settings/components/key-reveal-card.tsx
+++ b/studio/frontend/src/features/settings/components/key-reveal-card.tsx
@@ -32,7 +32,7 @@ export function KeyRevealCard({
className="size-3.5 text-emerald-600 dark:text-emerald-500"
/>
- New key created
+ New access token created