Skip to content

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

TypeScript

fix(control-ui): surface the Docker push credential on the org Credentials tab

Andy Paviad18177c614e9
diff --git a/control-ui/components/MarketplaceOrgArea/index.tsx b/control-ui/components/MarketplaceOrgArea/index.tsx
index d1733aef9..71f2d8ff7 100644
--- a/control-ui/components/MarketplaceOrgArea/index.tsx
+++ b/control-ui/components/MarketplaceOrgArea/index.tsx
@@ -6,6 +6,7 @@ import { useInboundGrants } from '../../lib/hooks/useInboundGrants'
import { useRegistryCapability } from '../../lib/hooks/useRegistryCapability'
import { MarketplaceOrgImages } from '../MarketplaceOrgImages'
import { MarketplaceTabs } from '../MarketplaceTabs'
+import { DockerCredentialsPanel } from '../PublisherView/DockerCredentials'
import { OwnedEntries } from '../PublisherView/OwnedEntries'
import RegistryApiKeysPanel from '../RegistryApiKeysPanel'
import RegistryConnectPanel from '../RegistryConnectPanel'
@@ -81,8 +82,11 @@ export function MarketplaceOrgArea({ activeTab }: { activeTab: OrgAreaTab }) {
{/* Entries is a publishing surface, so it follows the publishing-UI
toggle (canManageOrg). Credentials and Connection do NOT — turning
publishing off must not remove push credentials or the connection
- status (design spec §6). DockerCredentialsPanel self-gates via the
- keys API, so it renders regardless. */}
+ status (design spec §6). The Credentials tab renders the registry
+ API keys (self-gating) and, once the org scope is known, the Docker
+ push credential — the target of the Images tab's "get a push
+ credential from the API Keys tab" pointer. Design spec §5.1 folds
+ both into a unified RegistryCredentials view in Phase 5. */}
{activeTab === 'entries' ? (
loading ? (
<p>Loading…</p>
@@ -107,7 +111,15 @@ export function MarketplaceOrgArea({ activeTab }: { activeTab: OrgAreaTab }) {
)
) : null}
- {activeTab === 'credentials' ? <RegistryApiKeysPanel /> : null}
+ {activeTab === 'credentials' ? (
+ <>
+ <RegistryApiKeysPanel />
+ {/* Gated on the org scope (needed to build the push coordinates),
+ not on the publishing toggle — push credentials survive
+ publishing being turned off (§6). */}
+ {orgScope ? <DockerCredentialsPanel orgScope={orgScope} /> : null}
+ </>
+ ) : null}
{activeTab === 'connection' ? <RegistryConnectPanel /> : null}
</div>
diff --git a/control-ui/components/__tests__/MarketplaceOrgArea.test.tsx b/control-ui/components/__tests__/MarketplaceOrgArea.test.tsx
index ca0638724..b4586c31e 100644
--- a/control-ui/components/__tests__/MarketplaceOrgArea.test.tsx
+++ b/control-ui/components/__tests__/MarketplaceOrgArea.test.tsx
@@ -18,6 +18,9 @@ vi.mock('../PublisherView/OwnedEntries', () => ({
OwnedEntries: () => <div>owned-entries</div>,
}))
vi.mock('../RegistryApiKeysPanel', () => ({ default: () => <div>api-keys-panel</div> }))
+vi.mock('../PublisherView/DockerCredentials', () => ({
+ DockerCredentialsPanel: () => <div>docker-credentials-panel</div>,
+}))
vi.mock('../RegistryConnectPanel', () => ({ default: () => <div>connect-panel</div> }))
function cap(overrides: Partial<RegistryCapability>): RegistryCapabilityState {
@@ -94,6 +97,19 @@ describe('MarketplaceOrgArea', () => {
render(<MarketplaceOrgArea activeTab="credentials" />)
expect(screen.getByText('api-keys-panel')).toBeInTheDocument()
expect(screen.queryByText(/Name your organization/i)).toBeNull()
+ // No org scope yet → the Docker push-credential panel can't build coordinates.
+ expect(screen.queryByText('docker-credentials-panel')).toBeNull()
+ })
+
+ it('credentials: also renders the Docker push credential once the org scope is known', () => {
+ // canManageOrg false (publishing UI off) but a claimed scope — push
+ // credentials are gated on the scope, not the publishing toggle (§6).
+ vi.mocked(capHook.useRegistryCapability).mockReturnValue(
+ cap({ orgName: 'acme', scope: '@acme', canManageOrg: false })
+ )
+ render(<MarketplaceOrgArea activeTab="credentials" />)
+ expect(screen.getByText('api-keys-panel')).toBeInTheDocument()
+ expect(screen.getByText('docker-credentials-panel')).toBeInTheDocument()
})
it('connection: always renders the connect panel', () => {
diff --git a/control-ui/package-lock.json b/control-ui/package-lock.json
index 2156471fd..79aa58f2e 100644
--- a/control-ui/package-lock.json
+++ b/control-ui/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-ui",
- "version": "0.1.371",
+ "version": "0.1.372",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-ui",
- "version": "0.1.371",
+ "version": "0.1.372",
"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 d16dbe90b..456c3fe7d 100644
--- a/control-ui/package.json
+++ b/control-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-ui",
- "version": "0.1.371",
+ "version": "0.1.372",
"private": true,
"scripts": {
"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",