Skip to content

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

TypeScript

refactor(control-ui): order table toolbar controls

Josuéee9fce0a1d82
diff --git a/control-ui/app/plugin-workload-sdk/page.tsx b/control-ui/app/plugin-workload-sdk/page.tsx
index 35cf72001..b2d0fca36 100644
--- a/control-ui/app/plugin-workload-sdk/page.tsx
+++ b/control-ui/app/plugin-workload-sdk/page.tsx
@@ -308,32 +308,16 @@ export default function PluginWorkloadSdkPage() {
</>
}
subtitle="Per-recipe capability grants, quota, and invocation audit for promptBridge and clientNotifications."
- actions={
+ secondaryActions={
view === 'grants' ? (
- <>
- <Button
- type="button"
- size="sm"
- variant="ghost"
- onClick={() => setView('invocations')}
- >
- Invocations
- </Button>
- <Button
- type="button"
- variant="primary"
- size="sm"
- onClick={() => setEditing('new')}
- disabled={
- grantsInitialLoad ||
- legacyInventoryLoading ||
- Boolean(legacyInventoryError) ||
- Boolean(grantsError)
- }
- >
- New grant
- </Button>
- </>
+ <Button
+ type="button"
+ size="sm"
+ variant="ghost"
+ onClick={() => setView('invocations')}
+ >
+ Invocations
+ </Button>
) : undefined
}
refreshAction={
@@ -383,6 +367,24 @@ export default function PluginWorkloadSdkPage() {
/>
) : undefined
}
+ primaryAction={
+ view === 'grants' ? (
+ <Button
+ type="button"
+ variant="primary"
+ size="sm"
+ onClick={() => setEditing('new')}
+ disabled={
+ grantsInitialLoad ||
+ legacyInventoryLoading ||
+ Boolean(legacyInventoryError) ||
+ Boolean(grantsError)
+ }
+ >
+ New grant
+ </Button>
+ ) : undefined
+ }
/>
{view === 'grants' ? (
diff --git a/control-ui/app/shared-filesystems/page.tsx b/control-ui/app/shared-filesystems/page.tsx
index 5341b36f4..5e274b398 100644
--- a/control-ui/app/shared-filesystems/page.tsx
+++ b/control-ui/app/shared-filesystems/page.tsx
@@ -199,7 +199,7 @@ export default function SharedFileSystemsPage() {
</>
}
subtitle="Workspace volumes that Contexts can mount read-only into agent pods."
- actions={
+ primaryAction={
<button
type="button"
className="cu-btn cu-btn--primary cu-btn--sm"
diff --git a/control-ui/components/CodexSubscriptionHub/index.tsx b/control-ui/components/CodexSubscriptionHub/index.tsx
index 707a08aa3..68adaa9b5 100644
--- a/control-ui/components/CodexSubscriptionHub/index.tsx
+++ b/control-ui/components/CodexSubscriptionHub/index.tsx
@@ -409,7 +409,7 @@ export function CodexSubscriptionHub() {
</>
}
subtitle="Manage LLM, connector, and recipe credentials in one place."
- actions={
+ primaryAction={
<button
type="button"
className="cu-btn cu-btn--primary cu-btn--sm"
diff --git a/control-ui/components/CommunicationChannelsTable.tsx b/control-ui/components/CommunicationChannelsTable.tsx
index c3be0c2a8..e20b6cbff 100644
--- a/control-ui/components/CommunicationChannelsTable.tsx
+++ b/control-ui/components/CommunicationChannelsTable.tsx
@@ -194,7 +194,7 @@ export function CommunicationChannelsTable({
</>
}
subtitle="Route channel messages to the selected agent."
- actions={
+ primaryAction={
<button
type="button"
className="cu-btn cu-btn--primary cu-btn--sm"
diff --git a/control-ui/components/ContextTable.tsx b/control-ui/components/ContextTable.tsx
index 1f1902264..065b11926 100644
--- a/control-ui/components/ContextTable.tsx
+++ b/control-ui/components/ContextTable.tsx
@@ -110,7 +110,7 @@ export function ContextTable({
</>
}
subtitle="Group connectors into reusable access scopes."
- actions={
+ primaryAction={
<button
type="button"
className="cu-btn cu-btn--primary cu-btn--sm"
diff --git a/control-ui/components/GovernedTraceSurface/GovernedEventExplorer/index.tsx b/control-ui/components/GovernedTraceSurface/GovernedEventExplorer/index.tsx
index 2ced53f59..3411453aa 100644
--- a/control-ui/components/GovernedTraceSurface/GovernedEventExplorer/index.tsx
+++ b/control-ui/components/GovernedTraceSurface/GovernedEventExplorer/index.tsx
@@ -136,7 +136,7 @@ export function GovernedEventExplorer({ family, subtitle, title }: GovernedEvent
<section className="cu-trace-layout">
<div className="cu-card cu-card--viewport-fill">
<TablePanelHeader
- actions={<TraceTimeWindowControl onChange={updateState} state={state} />}
+ secondaryActions={<TraceTimeWindowControl onChange={updateState} state={state} />}
refreshAction={
<button
aria-label={loading ? 'Refreshing governed events' : 'Refresh governed events'}
diff --git a/control-ui/components/GovernedTraceSurface/SessionReplay/index.tsx b/control-ui/components/GovernedTraceSurface/SessionReplay/index.tsx
index 80de8cf4d..7ee40d9b7 100644
--- a/control-ui/components/GovernedTraceSurface/SessionReplay/index.tsx
+++ b/control-ui/components/GovernedTraceSurface/SessionReplay/index.tsx
@@ -138,7 +138,7 @@ export function SessionReplay({
<section className="cu-trace-layout">
<div className="cu-card cu-card--viewport-fill">
<TablePanelHeader
- actions={<TraceTimeWindowControl onChange={updateState} state={state} />}
+ secondaryActions={<TraceTimeWindowControl onChange={updateState} state={state} />}
refreshAction={
<button
aria-label={loading ? 'Refreshing sessions' : 'Refresh sessions'}
diff --git a/control-ui/components/GovernedTraceSurface/index.tsx b/control-ui/components/GovernedTraceSurface/index.tsx
index 9414718be..11138cf92 100644
--- a/control-ui/components/GovernedTraceSurface/index.tsx
+++ b/control-ui/components/GovernedTraceSurface/index.tsx
@@ -314,7 +314,7 @@ export function GovernedTraceSurface({
<TablePanelHeader
title={title}
subtitle={subtitle}
- actions={
+ secondaryActions={
!detail ? (
<SelectInput
aria-label="Trace time window"
diff --git a/control-ui/components/GuardrailHooksTable.tsx b/control-ui/components/GuardrailHooksTable.tsx
index 7a52d101c..4b09b41c7 100644
--- a/control-ui/components/GuardrailHooksTable.tsx
+++ b/control-ui/components/GuardrailHooksTable.tsx
@@ -166,7 +166,7 @@ export function GuardrailHooksTable({
</>
}
subtitle="Installed LLM guardrail hooks across the cluster."
- actions={
+ primaryAction={
onInstall ? (
<button
type="button"
diff --git a/control-ui/components/HostTable.tsx b/control-ui/components/HostTable.tsx
index f35d67544..5eb3e87da 100644
--- a/control-ui/components/HostTable.tsx
+++ b/control-ui/components/HostTable.tsx
@@ -200,7 +200,7 @@ export function HostTable({
</>
}
subtitle="Manage available agents and their host mappings."
- actions={
+ primaryAction={
<button
type="button"
className="cu-btn cu-btn--primary cu-btn--sm"
diff --git a/control-ui/components/LlmDiscoveryPanel/index.tsx b/control-ui/components/LlmDiscoveryPanel/index.tsx
index b83cb6056..391196e05 100644
--- a/control-ui/components/LlmDiscoveryPanel/index.tsx
+++ b/control-ui/components/LlmDiscoveryPanel/index.tsx
@@ -289,7 +289,7 @@ export function LlmDiscoveryPanel({
</>
}
subtitle="Newly synced models land here disabled. Enable only the models you want available to agents and runtime."
- actions={
+ primaryAction={
<button
type="button"
className="cu-btn cu-btn--primary cu-btn--sm"
diff --git a/control-ui/components/LlmModelTable.tsx b/control-ui/components/LlmModelTable.tsx
index 1f6f8ba4f..409093a81 100644
--- a/control-ui/components/LlmModelTable.tsx
+++ b/control-ui/components/LlmModelTable.tsx
@@ -227,7 +227,7 @@ export function LlmModelTable({
</>
}
subtitle="The authoritative allowlist of manual and discovered models. Only enabled rows can be selected for agents and runtime."
- actions={
+ secondaryActions={
<>
{providerOptions.length > 1 ? (
<FilterSelect
@@ -263,14 +263,6 @@ export function LlmModelTable({
<option value="discovery">Discovered</option>
</SelectInput>
) : null}
- <button
- type="button"
- className="cu-btn cu-btn--primary cu-btn--sm"
- onClick={onCreate}
- disabled={isInitialLoad}
- >
- Add model
- </button>
</>
}
refreshAction={
@@ -293,6 +285,16 @@ export function LlmModelTable({
disabled={isInitialLoad}
/>
}
+ primaryAction={
+ <button
+ type="button"
+ className="cu-btn cu-btn--primary cu-btn--sm"
+ onClick={onCreate}
+ disabled={isInitialLoad}
+ >
+ Add model
+ </button>
+ }
/>
{navigation}
<div className="eft-table-viewport cu-table-wrap cu-table-wrap--sticky-header">
diff --git a/control-ui/components/LlmPriceTable.tsx b/control-ui/components/LlmPriceTable.tsx
index 3e2ed9fdd..fa7de5191 100644
--- a/control-ui/components/LlmPriceTable.tsx
+++ b/control-ui/components/LlmPriceTable.tsx
@@ -159,7 +159,7 @@ export function LlmPriceTable({
</>
}
subtitle="Per-model token prices that back cost-unit budgets. Prices are per 1M tokens."
- actions={
+ primaryAction={
<button
type="button"
className="cu-btn cu-btn--primary cu-btn--sm"
diff --git a/control-ui/components/McpServerTable.tsx b/control-ui/components/McpServerTable.tsx
index ad6090f83..ab8b9508c 100644
--- a/control-ui/components/McpServerTable.tsx
+++ b/control-ui/components/McpServerTable.tsx
@@ -372,7 +372,7 @@ export function McpServerTable({
}
subtitle="Browse connector deployments and context bindings."
actionsClassName="cu-table-panel__actions--mcp"
- actions={
+ primaryAction={
onInstallFromRegistry ? (
<button
type="button"
diff --git a/control-ui/components/ProfileAdminHome.tsx b/control-ui/components/ProfileAdminHome.tsx
index 95a45874e..38bf8d9d9 100644
--- a/control-ui/components/ProfileAdminHome.tsx
+++ b/control-ui/components/ProfileAdminHome.tsx
@@ -433,7 +433,7 @@ export function ProfileAdminHome({ activeTab, highlightedAdminId = '' }: Profile
</>
}
subtitle="Members and teams grant Desktop App access. Admins grant Control UI access."
- actions={
+ primaryAction={
activeTab === 'admins' ? (
<button
type="button"
diff --git a/control-ui/components/RecipeSecretsPanel/index.tsx b/control-ui/components/RecipeSecretsPanel/index.tsx
index 7e6c9e558..44f6b3861 100644
--- a/control-ui/components/RecipeSecretsPanel/index.tsx
+++ b/control-ui/components/RecipeSecretsPanel/index.tsx
@@ -174,7 +174,7 @@ export function RecipeSecretsPanel({
namespace where the workload will read the Secret.
</>
}
- actions={
+ primaryAction={
<button
type="button"
className="cu-btn cu-btn--primary cu-btn--sm"
diff --git a/control-ui/components/RecipesTab.tsx b/control-ui/components/RecipesTab.tsx
index 7210abba5..8f12445ac 100644
--- a/control-ui/components/RecipesTab.tsx
+++ b/control-ui/components/RecipesTab.tsx
@@ -88,25 +88,15 @@ export function RecipesTab({ items, loading, error, onInstall, onRefresh }: Prop
</>
}
subtitle="Select a plugin to view status, run history, and actions."
- actions={
- <>
- <button
- type="button"
- className="cu-btn cu-btn--sm cu-nowrap"
- onClick={() => router.push(CONTROL_ROUTES.plugins.sdk)}
- disabled={isInitialLoad}
- >
- Plugins SDK
- </button>
- <button
- type="button"
- className="cu-btn cu-btn--primary cu-btn--sm"
- onClick={onInstall}
- disabled={isInitialLoad}
- >
- Install Plugin
- </button>
- </>
+ secondaryActions={
+ <button
+ type="button"
+ className="cu-btn cu-btn--sm cu-nowrap"
+ onClick={() => router.push(CONTROL_ROUTES.plugins.sdk)}
+ disabled={isInitialLoad}
+ >
+ Plugins SDK
+ </button>
}
refreshAction={
<button
@@ -128,6 +118,16 @@ export function RecipesTab({ items, loading, error, onInstall, onRefresh }: Prop
disabled={isInitialLoad}
/>
}
+ primaryAction={
+ <button
+ type="button"
+ className="cu-btn cu-btn--primary cu-btn--sm"
+ onClick={onInstall}
+ disabled={isInitialLoad}
+ >
+ Install Plugin
+ </button>
+ }
/>
{error ? <div className="cu-banner cu-banner--error cu-table-error">{error}</div> : null}
diff --git a/control-ui/components/RegistryApiKeysPanel.tsx b/control-ui/components/RegistryApiKeysPanel.tsx
index 598cba111..7183a60ea 100644
--- a/control-ui/components/RegistryApiKeysPanel.tsx
+++ b/control-ui/components/RegistryApiKeysPanel.tsx
@@ -177,7 +177,7 @@ export default function RegistryApiKeysPanel({ embedded = false }: RegistryApiKe
<>
<TablePanelHeader
title={`API keys${isReady ? ` for @${(view as { org: string }).org}` : ''}`}
- actions={
+ primaryAction={
isReady ? (
<Button type="button" variant="primary" size="sm" onClick={() => setCreating(true)}>
+ Create key
diff --git a/control-ui/components/RegistryCatalog.tsx b/control-ui/components/RegistryCatalog.tsx
index f70402dee..6d2f5b4b7 100644
--- a/control-ui/components/RegistryCatalog.tsx
+++ b/control-ui/components/RegistryCatalog.tsx
@@ -239,7 +239,7 @@ export default function RegistryCatalog() {
}
subtitle="Discover and install connectors from the Marketplace."
actionsClassName="cu-registry-toolbar"
- actions={
+ secondaryActions={
<>
<div className="cu-registry-filter-group">
<FilterSelect
diff --git a/control-ui/components/SecretsTable.tsx b/control-ui/components/SecretsTable.tsx
index 71504a9b6..2a975abb2 100644
--- a/control-ui/components/SecretsTable.tsx
+++ b/control-ui/components/SecretsTable.tsx
@@ -421,7 +421,7 @@ export function SecretsTable({
</>
}
subtitle="Manage LLM, connector, and recipe credentials in one place."
- actions={
+ primaryAction={
<button
type="button"
className="cu-btn cu-btn--primary cu-btn--sm"
diff --git a/control-ui/components/TablePanelHeader/index.tsx b/control-ui/components/TablePanelHeader/index.tsx
index 76c9d7714..cbb9caf7e 100644
--- a/control-ui/components/TablePanelHeader/index.tsx
+++ b/control-ui/components/TablePanelHeader/index.tsx
@@ -6,10 +6,11 @@ import type { TablePanelHeaderProps } from './types'
/** Control UI compatibility adapter for the shared list header. */
export function TablePanelHeader({
- actions,
actionsClassName,
+ primaryAction,
refreshAction,
search,
+ secondaryActions,
subtitle,
title,
titleActions,
@@ -17,11 +18,12 @@ export function TablePanelHeader({
return (
<DataViewHeader
actions={
- actions || refreshAction || search ? (
+ secondaryActions || search || refreshAction || primaryAction ? (
<div className={cn('cu-table-panel__actions', actionsClassName)}>
- {actions}
- {refreshAction}
+ {secondaryActions}
{search}
+ {refreshAction}
+ {primaryAction}
</div>
) : undefined
}
diff --git a/control-ui/components/TablePanelHeader/types.ts b/control-ui/components/TablePanelHeader/types.ts
index 18bf50797..70856d39a 100644
--- a/control-ui/components/TablePanelHeader/types.ts
+++ b/control-ui/components/TablePanelHeader/types.ts
@@ -1,10 +1,11 @@
import type { ReactNode } from 'react'
export type TablePanelHeaderProps = {
- actions?: ReactNode
actionsClassName?: string
+ primaryAction?: ReactNode
refreshAction?: ReactNode
search?: ReactNode
+ secondaryActions?: ReactNode
subtitle?: ReactNode
title: ReactNode
titleActions?: ReactNode
diff --git a/control-ui/components/TokenBudgetTable.tsx b/control-ui/components/TokenBudgetTable.tsx
index 7598bdd8f..e34fb45d1 100644
--- a/control-ui/components/TokenBudgetTable.tsx
+++ b/control-ui/components/TokenBudgetTable.tsx
@@ -116,7 +116,7 @@ export function TokenBudgetTable({
</>
}
subtitle="Spend caps per dimension, shown against live usage. P0c runs in observation mode (warn)."
- actions={
+ primaryAction={
<button
type="button"
className="cu-btn cu-btn--primary cu-btn--sm"
diff --git a/control-ui/components/__tests__/TablePanelHeader.test.tsx b/control-ui/components/__tests__/TablePanelHeader.test.tsx
index b4cfd2276..e90ddef66 100644
--- a/control-ui/components/__tests__/TablePanelHeader.test.tsx
+++ b/control-ui/components/__tests__/TablePanelHeader.test.tsx
@@ -10,10 +10,11 @@ describe('TablePanelHeader', () => {
it('applies the common action-toolbar layout to every header', () => {
render(
<TablePanelHeader
- actions={<button type="button">Create agent</button>}
actionsClassName="custom-toolbar"
+ primaryAction={<button type="button">Create agent</button>}
refreshAction={<button type="button">Refresh agents</button>}
search={<input aria-label="Search agents" type="search" />}
+ secondaryActions={<button type="button">Import agents</button>}
title="Agents"
/>
)
@@ -24,12 +25,13 @@ describe('TablePanelHeader', () => {
)
})
- it('renders page actions, refresh, and search in visual and focus order', () => {
+ it('renders secondary actions, search, refresh, and the primary action in focus order', () => {
render(
<TablePanelHeader
search={<input aria-label="Search agents" type="search" />}
refreshAction={<button type="button">Refresh agents</button>}
- actions={<button type="button">Create agent</button>}
+ primaryAction={<button type="button">Create agent</button>}
+ secondaryActions={<button type="button">Import agents</button>}
title="Agents"
/>
)
@@ -40,7 +42,7 @@ describe('TablePanelHeader', () => {
Array.from((toolbar as HTMLElement).querySelectorAll('button, input[type="search"]')).map(
control => control.getAttribute('aria-label') || control.textContent
)
- ).toEqual(['Create agent', 'Refresh agents', 'Search agents'])
+ ).toEqual(['Import agents', 'Search agents', 'Refresh agents', 'Create agent'])
expect(css).not.toMatch(/\.cu-table-panel__actions[^{}]*\{[^}]*\border\s*:/)
expect(css).toMatch(/\.cu-table-panel__actions\s*\{[^}]*flex-wrap:\s*wrap/)
expect(css).toMatch(/\.cu-table-panel__actions\s*\{[^}]*width:\s*100%/)
diff --git a/control-ui/package-lock.json b/control-ui/package-lock.json
index 854e01f55..9e1a42c46 100644
--- a/control-ui/package-lock.json
+++ b/control-ui/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-ui",
- "version": "0.1.510",
+ "version": "0.1.511",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-ui",
- "version": "0.1.510",
+ "version": "0.1.511",
"dependencies": {
"@clerum/display-field": "file:../packages/display-field",
"@clerum/frontend-table-system": "file:../packages/frontend-table-system",
diff --git a/control-ui/package.json b/control-ui/package.json
index 9fc68bf44..682c05cbb 100644
--- a/control-ui/package.json
+++ b/control-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-ui",
- "version": "0.1.510",
+ "version": "0.1.511",
"private": true,
"scripts": {
"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",
diff --git a/docs/agents/control-ui-rules.md b/docs/agents/control-ui-rules.md
index f0b741854..2cfbe0680 100644
--- a/docs/agents/control-ui-rules.md
+++ b/docs/agents/control-ui-rules.md
@@ -107,11 +107,12 @@ leaning on either behaviour.
while initial loading, empty, and error states render in the content area.
Disable header CTAs during initial loading, and let only the content pane
scroll when rows overflow.
-- In `TablePanelHeader`, pass page-action buttons through `actions`, the refresh
- control through `refreshAction`, and the search input through `search`. The
- adapter renders that semantic and focus order, keeps those controls on one
- toolbar line whenever their combined minimum widths fit, and preserves their
- order when a genuinely crowded toolbar must wrap.
+- In `TablePanelHeader`, pass secondary CTAs through `secondaryActions`, the
+ search input through `search`, the refresh control through `refreshAction`,
+ and the main CTA through `primaryAction`. The adapter renders that semantic
+ and focus order, keeps those controls on one toolbar line whenever their
+ combined minimum widths fit, and preserves their order when a genuinely
+ crowded toolbar must wrap.
- Use `CreatePageHeader` plus `cu-create-panel`, `cu-create-content`, and
`cu-form-grid` for full-screen create/install pages. Put Cancel in a ghost
button and Submit in a primary button inside `cu-create-actions`. Use `<h2>`