Skip to content

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

TypeScript

feat(control-ui): unify Marketplace org-area panels with API Keys style

Miguelon Peluchon579ca506962c
diff --git a/control-ui/app/globals.css b/control-ui/app/globals.css
index 1f8c2d171..7731c0e98 100644
--- a/control-ui/app/globals.css
+++ b/control-ui/app/globals.css
@@ -5490,6 +5490,10 @@ textarea.cu-input {
font-size: 0.75rem;
}
+.cu-muted-note--spaced {
+ margin-top: var(--cu-space-4);
+}
+
.cu-muted-note--compact {
margin: 0;
font-size: 0.8125rem;
diff --git a/control-ui/components/MarketplaceOrgImages/index.tsx b/control-ui/components/MarketplaceOrgImages/index.tsx
index 846b1e33f..aadd357ab 100644
--- a/control-ui/components/MarketplaceOrgImages/index.tsx
+++ b/control-ui/components/MarketplaceOrgImages/index.tsx
@@ -11,6 +11,7 @@ import {
} from '../PublisherView/dockerCredential'
import { TableHeaderRow } from '../TableHeaderRow'
import type { TableHeaderColumn } from '../TableHeaderRow/types'
+import { TablePanelHeader } from '../TablePanelHeader'
const COLUMNS: TableHeaderColumn[] = [
{ key: 'image', label: 'Image' },
@@ -64,70 +65,78 @@ export function MarketplaceOrgImages({ orgScope }: { orgScope: string }) {
: []
return (
- <div>
- <p className="cu-field__hint">
- Your connectors and plugins push container images to{' '}
- <code>
- {DEFAULT_REGISTRY_HOST}/{namespace}/
- </code>
- . Authenticate with a push credential from the{' '}
- <a className="cu-link" href={CONTROL_ROUTES.marketplace.orgCredentials}>
- API Keys
- </a>{' '}
- tab; each image&apos;s full coordinate is below.
- </p>
+ <section>
+ <div className="cu-card cu-card--viewport-fill">
+ <TablePanelHeader
+ title="Images"
+ subtitle={
+ <>
+ Your connectors and plugins push container images to{' '}
+ <code>
+ {DEFAULT_REGISTRY_HOST}/{namespace}/
+ </code>
+ . Authenticate with a push credential from the{' '}
+ <a className="cu-link" href={CONTROL_ROUTES.marketplace.orgCredentials}>
+ API Keys
+ </a>{' '}
+ tab; each image&apos;s full coordinate is below.
+ </>
+ }
+ />
+ <div className="cu-card__body">
+ {view.kind === 'loading' ? <p>Loading your images…</p> : null}
+ {view.kind === 'error' ? (
+ <RetryBanner message="Could not load your images." onRetry={() => void load()} />
+ ) : null}
+ {view.kind === 'unavailable' ? (
+ <p className="cu-banner cu-banner--info">
+ Image listing isn’t available on this registry yet. Your pushed images still work —
+ the list will appear here once the registry exposes it.
+ </p>
+ ) : null}
- {view.kind === 'loading' ? <p>Loading your images…</p> : null}
- {view.kind === 'error' ? (
- <RetryBanner message="Could not load your images." onRetry={() => void load()} />
- ) : null}
- {view.kind === 'unavailable' ? (
- <p className="cu-banner cu-banner--info">
- Image listing isn’t available on this registry yet. Your pushed images still work — the
- list will appear here once the registry exposes it.
- </p>
- ) : null}
+ {view.kind === 'ready' && rows.length === 0 ? (
+ <p>
+ No images yet. Push a connector or plugin image under{' '}
+ <code>
+ {DEFAULT_REGISTRY_HOST}/{namespace}/
+ </code>{' '}
+ and it appears here.
+ </p>
+ ) : null}
- {view.kind === 'ready' && rows.length === 0 ? (
- <p>
- No images yet. Push a connector or plugin image under{' '}
- <code>
- {DEFAULT_REGISTRY_HOST}/{namespace}/
- </code>{' '}
- and it appears here.
- </p>
- ) : null}
-
- {view.kind === 'ready' && rows.length > 0 ? (
- <>
- <div className="cu-table-wrap">
- <table className="cu-table">
- <thead>
- <TableHeaderRow columns={COLUMNS} />
- </thead>
- <tbody>
- {rows.map(r => (
- <tr key={`${r.name}:${r.tag}`}>
- <td>
- <code>{r.name}</code>
- </td>
- <td>{r.tag}</td>
- <td>
- <code>
- {buildImageCoordinate(DEFAULT_REGISTRY_HOST, orgScope, r.name, r.tag)}
- </code>
- </td>
- </tr>
- ))}
- </tbody>
- </table>
- </div>
- <p className="cu-muted-note">
- A push can still be rejected if the credential lacks publish permission or the org has
- reached its image quota — those surface at push time.
- </p>
- </>
- ) : null}
- </div>
+ {view.kind === 'ready' && rows.length > 0 ? (
+ <>
+ <div className="cu-table-wrap">
+ <table className="cu-table">
+ <thead>
+ <TableHeaderRow columns={COLUMNS} />
+ </thead>
+ <tbody>
+ {rows.map(r => (
+ <tr key={`${r.name}:${r.tag}`}>
+ <td>
+ <code>{r.name}</code>
+ </td>
+ <td>{r.tag}</td>
+ <td>
+ <code>
+ {buildImageCoordinate(DEFAULT_REGISTRY_HOST, orgScope, r.name, r.tag)}
+ </code>
+ </td>
+ </tr>
+ ))}
+ </tbody>
+ </table>
+ </div>
+ <p className="cu-muted-note cu-muted-note--spaced">
+ A push can still be rejected if the credential lacks publish permission or the org
+ has reached its image quota — those surface at push time.
+ </p>
+ </>
+ ) : null}
+ </div>
+ </div>
+ </section>
)
}
diff --git a/control-ui/components/PublisherView/OwnedEntries.tsx b/control-ui/components/PublisherView/OwnedEntries.tsx
index d6ae22540..e2a11e56c 100644
--- a/control-ui/components/PublisherView/OwnedEntries.tsx
+++ b/control-ui/components/PublisherView/OwnedEntries.tsx
@@ -15,6 +15,7 @@ import { type RowAction, RowActionsMenu } from '../RowActionsMenu'
import { SectionLoadingSkeleton } from '../SectionLoadingSkeleton'
import { TableHeaderRow } from '../TableHeaderRow'
import type { TableHeaderColumn } from '../TableHeaderRow/types'
+import { TablePanelHeader } from '../TablePanelHeader'
import { useToast } from '../Toast'
import { Button } from '../ui'
import { GrantAccessModal } from './GrantAccessModal'
@@ -196,165 +197,176 @@ export function OwnedEntries({
)
}
- if (loading) {
- return <SectionLoadingSkeleton label="Loading published entries" />
- }
- if (error) {
- return (
- <RetryBanner message="Could not load your published entries." onRetry={() => void load()} />
- )
- }
- if (entries.length === 0) {
- return <p>You haven’t published any registry entries yet.</p>
- }
-
const hasPrivateEntries = entries.some(e => e.visibility === 'private')
// Collapse same-named entries into one row (latest leads); expanding a row
// reveals the previous versions, each individually installable.
const grouped = groupByName(entries)
return (
- <>
- {sharingUnavailable && hasPrivateEntries ? (
- <p className="cu-banner cu-banner--info">
- Cross-org sharing isn’t available on this deployment, so private entries stay visible only
- to your org.
- </p>
- ) : null}
- <div className="cu-table-wrap">
- <table className="cu-table">
- <thead>
- <TableHeaderRow columns={COLUMNS} />
- </thead>
- <tbody>
- {grouped.map(({ latest: e, versions }) => {
- const isPrivate = e.visibility === 'private'
- const isGranting = grantTarget?.entryName === e.name
- const expanded = expandedNames.has(e.name)
- const hasPrevious = versions.length > 1
- const rowActions: RowAction[] = [
- {
- key: 'edit',
- label: 'Edit',
- onClick: () =>
- router.push(CONTROL_ROUTES.marketplace.editEntry(e.name, e.version)),
- },
- {
- key: 'remove',
- label: 'Remove from Marketplace',
- danger: true,
- onClick: () => void handleRemove(e),
- },
- ]
- return (
- <Fragment key={e.name}>
- <tr
- className={
- hasPrevious
- ? 'cu-table__row cu-table__row--clickable cu-expandable-row'
- : undefined
- }
- onClick={hasPrevious ? () => toggleExpanded(e.name) : undefined}
- onKeyDown={
- hasPrevious
- ? event => {
- if (event.key === 'Enter' || event.key === ' ') {
- event.preventDefault()
- toggleExpanded(e.name)
+ <section>
+ <div className="cu-card cu-card--viewport-fill">
+ <TablePanelHeader
+ title="Published entries"
+ subtitle={
+ sharingUnavailable && hasPrivateEntries
+ ? 'Cross-org sharing isn’t available on this deployment, so private entries stay visible only to your org.'
+ : undefined
+ }
+ />
+ <div className="cu-card__body">
+ {loading ? <SectionLoadingSkeleton label="Loading published entries" /> : null}
+ {error ? (
+ <RetryBanner
+ message="Could not load your published entries."
+ onRetry={() => void load()}
+ />
+ ) : null}
+ {!loading && !error && entries.length === 0 ? (
+ <p>You haven’t published any registry entries yet.</p>
+ ) : null}
+ {!loading && !error && entries.length > 0 ? (
+ <>
+ <div className="cu-table-wrap">
+ <table className="cu-table">
+ <thead>
+ <TableHeaderRow columns={COLUMNS} />
+ </thead>
+ <tbody>
+ {grouped.map(({ latest: e, versions }) => {
+ const isPrivate = e.visibility === 'private'
+ const isGranting = grantTarget?.entryName === e.name
+ const expanded = expandedNames.has(e.name)
+ const hasPrevious = versions.length > 1
+ const rowActions: RowAction[] = [
+ {
+ key: 'edit',
+ label: 'Edit',
+ onClick: () =>
+ router.push(CONTROL_ROUTES.marketplace.editEntry(e.name, e.version)),
+ },
+ {
+ key: 'remove',
+ label: 'Remove from Marketplace',
+ danger: true,
+ onClick: () => void handleRemove(e),
+ },
+ ]
+ return (
+ <Fragment key={e.name}>
+ <tr
+ className={
+ hasPrevious
+ ? 'cu-table__row cu-table__row--clickable cu-expandable-row'
+ : undefined
}
- }
- : undefined
- }
- tabIndex={hasPrevious ? 0 : undefined}
- aria-expanded={hasPrevious ? expanded : undefined}
- >
- <td className="cu-expandable-row__chevron" aria-hidden="true">
- {hasPrevious ? (
- <IconChevronRight
- className={expanded ? 'is-expanded' : undefined}
- width={18}
- height={18}
- />
- ) : null}
- </td>
- <td>
- <code>{e.name}</code>
- </td>
- <td>{entryTypeLabel(e)}</td>
- <td>
- {e.version}
- {hasPrevious ? (
- <span className="cu-muted"> +{versions.length - 1} more</span>
- ) : null}
- </td>
- <td>
- <span
- className={`cu-registry-chip cu-registry-chip--visibility-${e.visibility}`}
- >
- {e.visibility}
- </span>
- </td>
- <td>{e.status}</td>
- <td
- onClick={hasPrevious ? event => event.stopPropagation() : undefined}
- onKeyDown={hasPrevious ? event => event.stopPropagation() : undefined}
- >
- <div className="cu-table-actions">
- {renderInstall(e)}
- {isPrivate && canShare ? (
- <Button
- type="button"
- variant="ghost"
- size="sm"
- aria-haspopup="dialog"
- aria-expanded={isGranting}
- onClick={event =>
- setGrantTarget({ entryName: e.name, opener: event.currentTarget })
+ onClick={hasPrevious ? () => toggleExpanded(e.name) : undefined}
+ onKeyDown={
+ hasPrevious
+ ? event => {
+ if (event.key === 'Enter' || event.key === ' ') {
+ event.preventDefault()
+ toggleExpanded(e.name)
+ }
+ }
+ : undefined
}
+ tabIndex={hasPrevious ? 0 : undefined}
+ aria-expanded={hasPrevious ? expanded : undefined}
>
- Share access
- </Button>
- ) : !isPrivate ? (
- <span className="cu-muted">Public — no grant needed</span>
- ) : null}
- <RowActionsMenu
- ariaLabel={`Actions for ${e.name} v${e.version}`}
- actions={rowActions}
- />
- </div>
- </td>
- </tr>
- {expanded && hasPrevious ? (
- <tr className="cu-expandable-detail-row">
- <td colSpan={COLUMNS.length}>
- <div className="cu-expandable-detail">
- <div className="cu-marketplace-versions">
- <span className="cu-expandable-field__label">Previous versions</span>
- {versions.slice(1).map(v => (
- <div
- key={entryKey(v)}
- className="cu-table-actions"
- style={{ justifyContent: 'space-between' }}
+ <td className="cu-expandable-row__chevron" aria-hidden="true">
+ {hasPrevious ? (
+ <IconChevronRight
+ className={expanded ? 'is-expanded' : undefined}
+ width={18}
+ height={18}
+ />
+ ) : null}
+ </td>
+ <td>
+ <code>{e.name}</code>
+ </td>
+ <td>{entryTypeLabel(e)}</td>
+ <td>
+ {e.version}
+ {hasPrevious ? (
+ <span className="cu-muted"> +{versions.length - 1} more</span>
+ ) : null}
+ </td>
+ <td>
+ <span
+ className={`cu-registry-chip cu-registry-chip--visibility-${e.visibility}`}
>
- <code className="cu-code-text">
- {v.version}
- {isInstalled(v) ? (
- <span className="cu-muted"> · installed</span>
- ) : null}
- </code>
- {renderInstall(v)}
+ {e.visibility}
+ </span>
+ </td>
+ <td>{e.status}</td>
+ <td
+ onClick={hasPrevious ? event => event.stopPropagation() : undefined}
+ onKeyDown={hasPrevious ? event => event.stopPropagation() : undefined}
+ >
+ <div className="cu-table-actions">
+ {renderInstall(e)}
+ {isPrivate && canShare ? (
+ <Button
+ type="button"
+ variant="ghost"
+ size="sm"
+ aria-haspopup="dialog"
+ aria-expanded={isGranting}
+ onClick={event =>
+ setGrantTarget({
+ entryName: e.name,
+ opener: event.currentTarget,
+ })
+ }
+ >
+ Share access
+ </Button>
+ ) : null}
+ <RowActionsMenu
+ ariaLabel={`Actions for ${e.name} v${e.version}`}
+ actions={rowActions}
+ />
</div>
- ))}
- </div>
- </div>
- </td>
- </tr>
- ) : null}
- </Fragment>
- )
- })}
- </tbody>
- </table>
+ </td>
+ </tr>
+ {expanded && hasPrevious ? (
+ <tr className="cu-expandable-detail-row">
+ <td colSpan={COLUMNS.length}>
+ <div className="cu-expandable-detail">
+ <div className="cu-marketplace-versions">
+ <span className="cu-expandable-field__label">
+ Previous versions
+ </span>
+ {versions.slice(1).map(v => (
+ <div
+ key={entryKey(v)}
+ className="cu-table-actions"
+ style={{ justifyContent: 'space-between' }}
+ >
+ <code className="cu-code-text">
+ {v.version}
+ {isInstalled(v) ? (
+ <span className="cu-muted"> · installed</span>
+ ) : null}
+ </code>
+ {renderInstall(v)}
+ </div>
+ ))}
+ </div>
+ </div>
+ </td>
+ </tr>
+ ) : null}
+ </Fragment>
+ )
+ })}
+ </tbody>
+ </table>
+ </div>
+ </>
+ ) : null}
+ </div>
</div>
{grantTarget ? (
<GrantAccessModal
@@ -365,6 +377,6 @@ export function OwnedEntries({
/>
) : null}
{confirmDialog}
- </>
+ </section>
)
}
diff --git a/control-ui/components/__tests__/OwnedEntries.test.tsx b/control-ui/components/__tests__/OwnedEntries.test.tsx
index 81aee34fc..491a86967 100644
--- a/control-ui/components/__tests__/OwnedEntries.test.tsx
+++ b/control-ui/components/__tests__/OwnedEntries.test.tsx
@@ -109,7 +109,7 @@ describe('OwnedEntries', () => {
expect(screen.queryByText('Connector')).toBeNull()
})
- it('shows Share access only for private entries; public shows a no-grant note', async () => {
+ it('shows Share access only for private entries; public shows no note', async () => {
vi.mocked(api.getOwnedRegistryEntries).mockResolvedValue({
data: [
{ name: '@acme/db', version: '1.0.0', visibility: 'private', status: 'published' },
@@ -119,7 +119,7 @@ describe('OwnedEntries', () => {
render(<OwnedEntries orgScope="acme" />)
await screen.findByText('@acme/db')
expect(screen.getAllByRole('button', { name: /share access/i })).toHaveLength(1)
- expect(screen.getByText(/no grant needed/i)).toBeInTheDocument()
+ expect(screen.queryByText(/no grant needed/i)).toBeNull()
})
it('clicking Share access opens the Grant access modal', async () => {
diff --git a/control-ui/package-lock.json b/control-ui/package-lock.json
index 568daba9b..003f1ba51 100644
--- a/control-ui/package-lock.json
+++ b/control-ui/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-ui",
- "version": "0.1.404",
+ "version": "0.1.405",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-ui",
- "version": "0.1.404",
+ "version": "0.1.405",
"dependencies": {
"@clerum/llm-providers": "file:../packages/llm-providers",
"@clerum/workflow-recipe-capability-policy": "file:../packages/workflow-recipe-capability-policy",
diff --git a/control-ui/package.json b/control-ui/package.json
index 16a2a9d7d..796d59291 100644
--- a/control-ui/package.json
+++ b/control-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-ui",
- "version": "0.1.404",
+ "version": "0.1.405",
"private": true,
"scripts": {
"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",