Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

feat: flatten secrets nav into sibling LLM API Keys and Subscriptions tabs

Miguelon Peluchon5f8e290ab6a5
diff --git a/control-ui/components/CodexSubscriptionHub/index.tsx b/control-ui/components/CodexSubscriptionHub/index.tsx
index 7a1d720dc..ec0f18b3f 100644
--- a/control-ui/components/CodexSubscriptionHub/index.tsx
+++ b/control-ui/components/CodexSubscriptionHub/index.tsx
@@ -25,7 +25,6 @@ import {
} from '../CodexSubscriptionConnection/types'
import { useConfirmDialog } from '../ConfirmDialog'
import { LlmProviderIcon } from '../LlmProviderIcon'
-import { LlmSecretsSubTabs } from '../LlmSecretsSubTabs'
import { RowActionsMenu } from '../RowActionsMenu'
import { SecretsScopeTabs } from '../SecretsScopeTabs'
import { SectionSearchInput } from '../SectionSearchInput'
@@ -301,8 +300,7 @@ export function CodexSubscriptionHub() {
subtitle="Manage LLM, connector, and recipe credentials in one place."
/>
<div className="cu-card__body cu-card__body--auto cu-secrets-strip">
- <SecretsScopeTabs activeValue="llm" />
- <LlmSecretsSubTabs activeValue="subscriptions" />
+ <SecretsScopeTabs activeValue="llm-subscriptions" />
</div>
<div className="cu-empty">
{capability.error || error || 'ChatGPT subscriptions are disabled.'}
@@ -363,8 +361,7 @@ export function CodexSubscriptionHub() {
/>
<div className="cu-card__body cu-card__body--auto cu-secrets-strip">
- <SecretsScopeTabs activeValue="llm" />
- <LlmSecretsSubTabs activeValue="subscriptions" />
+ <SecretsScopeTabs activeValue="llm-subscriptions" />
</div>
{error && !creating && !editing ? (
diff --git a/control-ui/components/LlmSecretsSubTabs/index.tsx b/control-ui/components/LlmSecretsSubTabs/index.tsx
deleted file mode 100644
index 17460be03..000000000
--- a/control-ui/components/LlmSecretsSubTabs/index.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-'use client'
-
-import { CONTROL_ROUTES } from '@constants/routes'
-import { TabBar } from '../TabBar'
-
-export type LlmSecretsSubTab = 'api-key' | 'subscriptions'
-
-export function LlmSecretsSubTabs({ activeValue }: { activeValue: LlmSecretsSubTab }) {
- return (
- <TabBar<LlmSecretsSubTab>
- ariaLabel="LLM secret kinds"
- activeValue={activeValue}
- className="cu-tabs--flush cu-tabs--nested"
- options={[
- { value: 'api-key', href: CONTROL_ROUTES.secrets.llm, label: 'API-KEY' },
- {
- value: 'subscriptions',
- href: CONTROL_ROUTES.secrets.llmSubscriptions,
- label: 'Subscriptions',
- },
- ]}
- />
- )
-}
diff --git a/control-ui/components/SecretsScopeTabs/index.tsx b/control-ui/components/SecretsScopeTabs/index.tsx
index d50dbb64e..cfd1eee3d 100644
--- a/control-ui/components/SecretsScopeTabs/index.tsx
+++ b/control-ui/components/SecretsScopeTabs/index.tsx
@@ -3,7 +3,7 @@
import { CONTROL_ROUTES } from '@constants/routes'
import { TabBar } from '../TabBar'
-export type SecretsTabScope = 'llm' | 'mcp' | 'recipe'
+export type SecretsTabScope = 'llm' | 'llm-subscriptions' | 'mcp' | 'recipe'
export function SecretsScopeTabs({ activeValue }: { activeValue: SecretsTabScope }) {
return (
@@ -12,7 +12,12 @@ export function SecretsScopeTabs({ activeValue }: { activeValue: SecretsTabScope
activeValue={activeValue}
className="cu-tabs--flush"
options={[
- { value: 'llm', href: CONTROL_ROUTES.secrets.llm, label: 'LLM' },
+ { value: 'llm', href: CONTROL_ROUTES.secrets.llm, label: 'LLM API Keys' },
+ {
+ value: 'llm-subscriptions',
+ href: CONTROL_ROUTES.secrets.llmSubscriptions,
+ label: 'LLM Subscriptions',
+ },
{ value: 'mcp', href: CONTROL_ROUTES.secrets.connector, label: 'Connector' },
{ value: 'recipe', href: CONTROL_ROUTES.secrets.recipe, label: 'Recipe' },
]}
diff --git a/control-ui/components/SecretsTable.tsx b/control-ui/components/SecretsTable.tsx
index 9ff31854c..d5fd08c2d 100644
--- a/control-ui/components/SecretsTable.tsx
+++ b/control-ui/components/SecretsTable.tsx
@@ -16,7 +16,6 @@ import { collectWorkflowRecipeSecretRefs } from '../lib/workflowRecipeSecretRefs
import { useConfirmDialog } from './ConfirmDialog'
import { LlmProviderIcon } from './LlmProviderIcon'
import { LlmSecretUpdateModal } from './LlmSecretUpdateModal'
-import { LlmSecretsSubTabs } from './LlmSecretsSubTabs'
import { RowActionsMenu } from './RowActionsMenu'
import { SecretsScopeTabs } from './SecretsScopeTabs'
import { SectionSearchInput } from './SectionSearchInput'
@@ -42,10 +41,7 @@ type McpSecretRow = {
}
type RecipeSecretStatus = 'provisioned' | 'missing'
type RecipeSecretRowOwnership =
- | { kind: 'shared' }
- | { kind: 'owner-recipe'; recipeName: string }
- | { kind: 'unlabeled' }
- | null // missing rows: not yet provisioned, ownership chosen at create time.
+ { kind: 'shared' } | { kind: 'owner-recipe'; recipeName: string } | { kind: 'unlabeled' } | null // missing rows: not yet provisioned, ownership chosen at create time.
type RecipeSecretRow = {
name: string
namespace: string
@@ -469,7 +465,6 @@ export function SecretsTable({
<div className="cu-card__body cu-card__body--auto cu-secrets-strip">
<SecretsScopeTabs activeValue={scope} />
- {scope === 'llm' ? <LlmSecretsSubTabs activeValue="api-key" /> : null}
</div>
{scope === 'llm' && error && (
diff --git a/control-ui/components/__tests__/CodexSubscriptionHub.test.tsx b/control-ui/components/__tests__/CodexSubscriptionHub.test.tsx
index 66965db3a..89f5e2169 100644
--- a/control-ui/components/__tests__/CodexSubscriptionHub.test.tsx
+++ b/control-ui/components/__tests__/CodexSubscriptionHub.test.tsx
@@ -115,8 +115,11 @@ describe('CodexSubscriptionHub', () => {
expect(await screen.findByText('Team A')).toBeInTheDocument()
expect(screen.getByRole('columnheader', { name: 'Name' })).toBeInTheDocument()
expect(screen.getByRole('columnheader', { name: 'Status' })).toBeInTheDocument()
- expect(screen.getByRole('tab', { name: 'API-KEY' })).toHaveAttribute('href', '/secrets/llm')
- expect(screen.getByRole('tab', { name: 'Subscriptions' })).toHaveAttribute(
+ expect(screen.getByRole('tab', { name: 'LLM API Keys' })).toHaveAttribute(
+ 'href',
+ '/secrets/llm'
+ )
+ expect(screen.getByRole('tab', { name: 'LLM Subscriptions' })).toHaveAttribute(
'href',
'/secrets/llm/subscriptions'
)
diff --git a/control-ui/components/__tests__/SecretsTable.test.tsx b/control-ui/components/__tests__/SecretsTable.test.tsx
index 805d8b4aa..22268a193 100644
--- a/control-ui/components/__tests__/SecretsTable.test.tsx
+++ b/control-ui/components/__tests__/SecretsTable.test.tsx
@@ -516,7 +516,7 @@ describe('SecretsTable — recipe pending refs', () => {
})
describe('SecretsTable — LLM empty state', () => {
- it('keeps LLM nested under API-KEY without a sibling Subscription scope', async () => {
+ it('shows LLM API Keys and LLM Subscriptions as sibling top-level scopes', async () => {
rtlRender(
<ToastProvider>
<SecretsTable
@@ -531,12 +531,16 @@ describe('SecretsTable — LLM empty state', () => {
</ToastProvider>
)
expect(await screen.findByText('No LLM secrets found.')).toBeInTheDocument()
- expect(screen.getByRole('tab', { name: 'API-KEY' })).toHaveAttribute('aria-selected', 'true')
- expect(screen.getByRole('tab', { name: 'Subscriptions' })).toHaveAttribute(
+ expect(screen.getByRole('tab', { name: 'LLM API Keys' })).toHaveAttribute(
+ 'aria-selected',
+ 'true'
+ )
+ expect(screen.getByRole('tab', { name: 'LLM Subscriptions' })).toHaveAttribute(
'href',
'/secrets/llm/subscriptions'
)
- expect(screen.getByRole('tab', { name: 'LLM' })).toBeInTheDocument()
- expect(screen.queryByRole('tab', { name: /^Subscription$/ })).not.toBeInTheDocument()
+ expect(screen.getByRole('tab', { name: 'Connector' })).toBeInTheDocument()
+ expect(screen.getByRole('tab', { name: 'Recipe' })).toBeInTheDocument()
+ expect(screen.queryByRole('tab', { name: 'API-KEY' })).not.toBeInTheDocument()
})
})
diff --git a/control-ui/package-lock.json b/control-ui/package-lock.json
index ecb75d0c5..493cbc400 100644
--- a/control-ui/package-lock.json
+++ b/control-ui/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-ui",
- "version": "0.1.478",
+ "version": "0.1.479",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-ui",
- "version": "0.1.478",
+ "version": "0.1.479",
"dependencies": {
"@clerum/display-field": "file:../packages/display-field",
"@clerum/llm-providers": "file:../packages/llm-providers",
diff --git a/control-ui/package.json b/control-ui/package.json
index ee6d9dd88..79200bdfe 100644
--- a/control-ui/package.json
+++ b/control-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-ui",
- "version": "0.1.478",
+ "version": "0.1.479",
"private": true,
"scripts": {
"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",