Skip to content

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

TypeScript

feat: more control-ui flows and ui/ux adjustments

Miguelon Peluchondbc18c535a5d
diff --git a/control-ui/app/globals.css b/control-ui/app/globals.css
index 81d014803..6ecbbb199 100644
--- a/control-ui/app/globals.css
+++ b/control-ui/app/globals.css
@@ -6776,6 +6776,24 @@ textarea.cu-input {
gap: 0.75rem;
}
+.cu-llm-config__model-row--with-credential {
+ grid-template-columns: repeat(3, minmax(0, 1fr));
+ align-items: start;
+}
+
+.cu-llm-cred-group--inline {
+ min-width: 0;
+ padding: 0;
+ border: 0;
+ background: transparent;
+}
+
+@media (max-width: 720px) {
+ .cu-llm-config__model-row--with-credential {
+ grid-template-columns: 1fr;
+ }
+}
+
.cu-llm-provider-icon {
display: inline-grid;
place-items: center;
diff --git a/control-ui/components/HostWizard/index.tsx b/control-ui/components/HostWizard/index.tsx
index 59317e454..efe0f64aa 100644
--- a/control-ui/components/HostWizard/index.tsx
+++ b/control-ui/components/HostWizard/index.tsx
@@ -1536,6 +1536,7 @@ export function HostWizard({
}
: undefined
}
+ inlinePrimaryCredential
secretKeys={secretMode === 'new' ? llmSecretKeys : []}
disabled={busy}
/>
diff --git a/control-ui/components/LlmProviderConfig/index.tsx b/control-ui/components/LlmProviderConfig/index.tsx
index ab11eea16..44d4bca6a 100644
--- a/control-ui/components/LlmProviderConfig/index.tsx
+++ b/control-ui/components/LlmProviderConfig/index.tsx
@@ -109,6 +109,7 @@ export function LlmProviderConfig({
catalogLoading = false,
catalogError,
credentials,
+ inlinePrimaryCredential = false,
secretKeys = [],
disabled = false,
}: LlmProviderConfigProps) {
@@ -231,7 +232,12 @@ export function LlmProviderConfig({
<span className="cu-llm-config__block-tag">Required</span>
</div>
- <div className="cu-llm-config__model-row">
+ <div
+ className={cn(
+ 'cu-llm-config__model-row',
+ credentials && inlinePrimaryCredential && 'cu-llm-config__model-row--with-credential'
+ )}
+ >
<Field htmlFor="llm-primary-provider" label="Provider">
<SelectionDropdown
id="llm-primary-provider"
@@ -282,6 +288,19 @@ export function LlmProviderConfig({
}}
/>
</Field>
+
+ {credentials && inlinePrimaryCredential ? (
+ <ProviderCredentialBlock
+ variant="primary"
+ group={primaryGroup}
+ slots={primaryGroup.slots}
+ idPrefix="llm-primary"
+ wiring={credentials}
+ present={present}
+ disabled={disabled}
+ inline
+ />
+ ) : null}
</div>
{catalogError ? (
@@ -308,7 +327,7 @@ export function LlmProviderConfig({
disabled={disabled}
/>
- {credentials ? (
+ {credentials && !inlinePrimaryCredential ? (
<ProviderCredentialBlock
variant="primary"
group={primaryGroup}
@@ -515,6 +534,7 @@ type ProviderCredentialBlockProps = {
wiring: LlmCredentialWiring
present: (dataKey: string) => boolean
disabled: boolean
+ inline?: boolean
}
// One provider's credential block: the usable/partial/absent chip, its slot
@@ -530,6 +550,7 @@ function ProviderCredentialBlock({
wiring,
present,
disabled,
+ inline = false,
}: ProviderCredentialBlockProps) {
const chip = describeLlmCompleteness(group, present)
const providerLabel = getProviderLabel(group.provider)
@@ -542,17 +563,22 @@ function ProviderCredentialBlock({
const usable = chip.state === 'present'
return (
- <section className="cu-llm-cred-group" aria-label={`${group.label} credentials`}>
- <div className="cu-llm-cred-group__head">
- <span className="cu-llm-cred-group__title">{group.label}</span>
- <span
- className={cn('cu-slot-chip', `cu-slot-chip--${chip.state}`)}
- aria-label={`${group.label} credentials ${chip.text}`}
- >
- <span aria-hidden="true">{chip.symbol}</span>
- {chip.text}
- </span>
- </div>
+ <section
+ className={cn('cu-llm-cred-group', inline && 'cu-llm-cred-group--inline')}
+ aria-label={`${group.label} credentials`}
+ >
+ {!inline ? (
+ <div className="cu-llm-cred-group__head">
+ <span className="cu-llm-cred-group__title">{group.label}</span>
+ <span
+ className={cn('cu-slot-chip', `cu-slot-chip--${chip.state}`)}
+ aria-label={`${group.label} credentials ${chip.text}`}
+ >
+ <span aria-hidden="true">{chip.symbol}</span>
+ {chip.text}
+ </span>
+ </div>
+ ) : null}
{slots.map(slot => {
const inputId = `${idPrefix}-${slot.dataKey}`
diff --git a/control-ui/components/LlmProviderConfig/types.ts b/control-ui/components/LlmProviderConfig/types.ts
index 587eee253..edfdfeded 100644
--- a/control-ui/components/LlmProviderConfig/types.ts
+++ b/control-ui/components/LlmProviderConfig/types.ts
@@ -38,6 +38,9 @@ export type LlmProviderConfigProps = {
// credential inputs (create flow reusing an existing shared Secret, where the
// wizard cannot introspect the Secret's keys).
credentials?: LlmCredentialWiring
+ // Create-flow layout: place the primary credential beside Provider + Model.
+ // Edit screens leave this off and retain the full-width credential block.
+ inlinePrimaryCredential?: boolean
// Data keys already present in the Host's own Secret — feeds the fallback
// credentialSlot dropdown's extra keys (e.g. `claude-api-key-fb1`).
diff --git a/control-ui/components/__tests__/LlmProviderConfig.test.tsx b/control-ui/components/__tests__/LlmProviderConfig.test.tsx
index c1e8e425d..b72d065e3 100644
--- a/control-ui/components/__tests__/LlmProviderConfig.test.tsx
+++ b/control-ui/components/__tests__/LlmProviderConfig.test.tsx
@@ -20,6 +20,7 @@ function Harness({
initialAllowed = [],
withCredentials = true,
existingKeys,
+ inlinePrimaryCredential = false,
}: {
initialProvider?: LlmProvider
initialModel?: string
@@ -27,6 +28,7 @@ function Harness({
initialAllowed?: HostAllowedModel[]
withCredentials?: boolean
existingKeys?: string[]
+ inlinePrimaryCredential?: boolean
}) {
const [provider, setProvider] = useState<LlmProvider>(initialProvider)
const [model, setModel] = useState(initialModel)
@@ -55,6 +57,7 @@ function Harness({
}
: undefined
}
+ inlinePrimaryCredential={inlinePrimaryCredential}
secretKeys={existingKeys}
/>
)
@@ -79,6 +82,17 @@ describe('LlmProviderConfig (spec Topic 1b — domain projection + usable gate)'
expect(within(primary).queryByText(/Add the OpenAI credential/i)).not.toBeInTheDocument()
})
+ it('places the primary credential beside Provider and Model in the create layout', () => {
+ render(<Harness inlinePrimaryCredential />)
+
+ const row = screen
+ .getByLabelText('Provider', { selector: '#llm-primary-provider' })
+ .closest('.cu-llm-config__model-row')
+ expect(row).not.toBeNull()
+ expect(row).toHaveClass('cu-llm-config__model-row--with-credential')
+ expect(within(row as HTMLElement).getByLabelText(/OpenAI API key/i)).toBeInTheDocument()
+ })
+
it('treats a stored key (existingKeys) as usable without re-entry (edit mode)', () => {
render(<Harness existingKeys={['openai-api-key']} />)
const primary = screen.getByLabelText('OpenAI credentials')
diff --git a/control-ui/e2e/qa-recorder-admin-invite.spec.ts b/control-ui/e2e/qa-recorder-admin-invite.spec.ts
new file mode 100644
index 000000000..3d78c38e6
--- /dev/null
+++ b/control-ui/e2e/qa-recorder-admin-invite.spec.ts
@@ -0,0 +1,99 @@
+// control-ui/e2e/qa-recorder-admin-invite.spec.ts
+//
+// Optional QA recorder journey (MUTATING, sends email). Requires
+// QA_RECORDER_CONFIRM_MUTATIONS=1. Invites a Control UI admin (without Desktop
+// App access) and cancels the invitation via the Control API. The invitation
+// email is actually sent to the supplied address, so use a disposable mailbox.
+import { expect, test } from '@playwright/test'
+import {
+ CONTROL_API_URL,
+ CONTROL_UI_URL,
+ adminCredentials,
+ api,
+ assertAllowedTarget,
+ loginThroughUi,
+ requireRecorderConfirm,
+ screenshotAndLog,
+ uniqueE2EName,
+} from './qa-recorder-helpers'
+
+type ControlAdminInvitation = { id: string; email: string; status: string }
+
+test.describe('optional QA recorder: Control UI admin invitation', () => {
+ test('records the invite-admin flow without Desktop App access', async ({ page }, testInfo) => {
+ requireRecorderConfirm(
+ 'QA_RECORDER_CONFIRM_MUTATIONS',
+ 'This journey sends a Control UI admin invitation email and cancels the invitation.'
+ )
+ assertAllowedTarget('CONTROL_UI_URL', CONTROL_UI_URL)
+ assertAllowedTarget('CONTROL_API_URL', CONTROL_API_URL)
+
+ const credentials = adminCredentials()
+ const email = `${uniqueE2EName('qa-recorder-admin')}@example.test`
+
+ try {
+ await loginThroughUi(page, credentials)
+
+ await page.getByRole('link', { name: 'Users & Teams', exact: true }).click()
+ await expect(page).toHaveURL(/\/users-and-teams\/users$/, { timeout: 20_000 })
+
+ const adminsTab = page.getByRole('tab', { name: 'Admins', exact: true })
+ await expect(adminsTab).toBeEnabled({ timeout: 20_000 })
+ await adminsTab.click()
+ await expect(page).toHaveURL(/\/users-and-teams\/admins$/, { timeout: 20_000 })
+
+ const inviteAdmin = page.getByRole('button', { name: 'Invite admin', exact: true })
+ await expect(inviteAdmin).toBeEnabled()
+ await inviteAdmin.click()
+ await expect(page).toHaveURL(/\/users-and-teams\/admins\/new$/, { timeout: 20_000 })
+ await expect(page.getByRole('heading', { name: 'Invite admin', exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+ await expect(page.getByText('Invite a new Control UI admin.', { exact: true })).toBeVisible()
+
+ await page.getByPlaceholder('[email protected]').fill(email)
+
+ const continueButton = page.getByRole('button', { name: 'Continue', exact: true })
+ await expect(continueButton).toBeEnabled()
+ await continueButton.click()
+ await expect(page.getByText('Control UI admin', { exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+ const desktopAccess = page.getByRole('checkbox', { name: /Create access to Desktop App/ })
+ await expect(desktopAccess).toBeVisible()
+ await expect(desktopAccess).not.toBeChecked()
+
+ const sendInvite = page.getByRole('button', { name: 'Send invite', exact: true })
+ await expect(sendInvite).toBeEnabled()
+ await sendInvite.click()
+ await expect(page.getByText('Admin invitation sent.', { exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+ await expect(page).toHaveURL(/\/users-and-teams\/admins$/, { timeout: 20_000 })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-admin-invite')
+ } finally {
+ try {
+ const request = page.request
+ const { status, data } = await api<{ invitations?: ControlAdminInvitation[] }>(
+ request,
+ 'GET',
+ '/api/v1/admin/control-admins'
+ )
+ if (status === 200) {
+ const invitationId =
+ (data.invitations || []).find(invitation => invitation.email === email)?.id || ''
+ if (invitationId) {
+ await api(
+ request,
+ 'DELETE',
+ `/api/v1/admin/control-admin-invitations/${encodeURIComponent(invitationId)}`
+ )
+ }
+ }
+ } catch {
+ // Best-effort cleanup; the disposable environment tolerates leftover invitations.
+ }
+ }
+ })
+})
diff --git a/control-ui/e2e/qa-recorder-connector-edit.spec.ts b/control-ui/e2e/qa-recorder-connector-edit.spec.ts
new file mode 100644
index 000000000..2daa6850e
--- /dev/null
+++ b/control-ui/e2e/qa-recorder-connector-edit.spec.ts
@@ -0,0 +1,160 @@
+// control-ui/e2e/qa-recorder-connector-edit.spec.ts
+//
+// MUTATING journey: creates a context + stdio discovery connector (reusing the
+// spec-2 creation flow inline), then edits the connector to add external CIDR
+// egress. Guarded by QA_RECORDER_CONFIRM_MUTATIONS; connector then context are
+// deleted via the Control API in a finally.
+import { type Page, expect, test } from '@playwright/test'
+import {
+ CONTROL_API_URL,
+ CONTROL_UI_URL,
+ adminCredentials,
+ api,
+ assertAllowedTarget,
+ loginThroughUi,
+ requireRecorderConfirm,
+ screenshotAndLog,
+ uniqueE2EName,
+} from './qa-recorder-helpers'
+
+// The connector-form selects are not label-associated (no htmlFor/id), so scope
+// to the wrapping `.cu-field` by its visible label text and drive its <select>.
+async function fieldSelect(page: Page, fieldLabelText: string, value: string): Promise<void> {
+ const field = page.locator('.cu-field', { hasText: fieldLabelText }).first()
+ await field.locator('select').selectOption(value)
+}
+
+async function createEmptyContext(page: Page, contextName: string): Promise<void> {
+ await page.getByRole('link', { name: 'Contexts', exact: true }).click()
+ await expect(page).toHaveURL(/\/contexts$/, { timeout: 20_000 })
+ await page.getByRole('button', { name: 'Create context', exact: true }).click()
+ await expect(page).toHaveURL(/\/contexts\/new$/, { timeout: 20_000 })
+ await page.getByPlaceholder('context1').fill(contextName)
+ await page
+ .getByPlaceholder('Human-readable context description')
+ .fill('QA recorder temporary context')
+ await page.getByRole('button', { name: 'Continue', exact: true }).click()
+ await expect(
+ page
+ .getByText('No connectors found.', { exact: true })
+ .or(page.getByPlaceholder('Search connectors...'))
+ ).toBeVisible({ timeout: 20_000 })
+ await page.getByRole('button', { name: 'Create context', exact: true }).click()
+ await expect(page).toHaveURL(new RegExp(`/contexts/${contextName}$`), { timeout: 20_000 })
+ await expect(
+ page.getByText('Review details, manage connectors, agents, teams, and members.', {
+ exact: true,
+ })
+ ).toBeVisible({ timeout: 20_000 })
+}
+
+async function createDiscoveryConnector(
+ page: Page,
+ connectorName: string,
+ contextName: string
+): Promise<void> {
+ await page.getByRole('link', { name: 'Connectors', exact: true }).click()
+ await expect(page).toHaveURL(/\/connectors$/, { timeout: 20_000 })
+ await page.getByRole('button', { name: 'Create Connector', exact: true }).click()
+ await expect(page).toHaveURL(/\/connectors\/new$/, { timeout: 20_000 })
+
+ await page.getByPlaceholder('my-mcp-server').fill(connectorName)
+ await page
+ .getByPlaceholder('us-central1-docker.pkg.dev/my-project/repo/mcp-server:latest')
+ .fill('qa-recorder/example:dev')
+ await page
+ .getByPlaceholder('Optional description of this connector')
+ .fill('QA recorder discovery-only connector')
+
+ const contextDropdown = page.locator('.cu-selection-dropdown__button')
+ await expect(contextDropdown).toBeEnabled({ timeout: 20_000 })
+ await contextDropdown.click()
+ await expect(page.getByPlaceholder('Search contexts...')).toBeVisible({ timeout: 20_000 })
+ const contextOption = page.getByRole('option', { name: contextName, exact: true })
+ await expect(contextOption).toBeVisible({ timeout: 20_000 })
+ await contextOption.click()
+
+ await page.getByRole('button', { name: 'Continue', exact: true }).click()
+
+ await fieldSelect(page, 'Transport Type', 'stdio')
+ await expect(page.locator('input[type="number"]')).toHaveCount(0)
+ await fieldSelect(page, 'Managed', 'false')
+
+ await page.getByRole('button', { name: 'Continue', exact: true }).click()
+
+ await expect(page.getByText('External Egress', { exact: true })).toBeVisible({ timeout: 20_000 })
+ await page.getByRole('button', { name: 'Continue', exact: true }).click()
+
+ await expect(
+ page.getByRole('checkbox', { name: 'Use Kubernetes Secret for credentials', exact: true })
+ ).not.toBeChecked()
+
+ await page.getByRole('button', { name: 'Create connector', exact: true }).click()
+ await expect(page.getByText('Connector created successfully.', { exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+ await expect(page).toHaveURL(/\/connectors$/, { timeout: 20_000 })
+}
+
+test.describe('optional QA recorder: Control UI connector edit', () => {
+ test('records editing a discovery connector to add external CIDR egress', async ({
+ page,
+ }, testInfo) => {
+ requireRecorderConfirm(
+ 'QA_RECORDER_CONFIRM_MUTATIONS',
+ 'This journey creates and deletes local context and connector resources.'
+ )
+ assertAllowedTarget('CONTROL_UI_URL', CONTROL_UI_URL)
+ assertAllowedTarget('CONTROL_API_URL', CONTROL_API_URL)
+
+ const credentials = adminCredentials()
+ const contextName = uniqueE2EName('qa-recorder-context')
+ const connectorName = uniqueE2EName('qa-recorder-connector')
+
+ try {
+ await loginThroughUi(page, credentials)
+
+ await createEmptyContext(page, contextName)
+ await createDiscoveryConnector(page, connectorName, contextName)
+
+ await page.goto(`${CONTROL_UI_URL}/connectors/${encodeURIComponent(connectorName)}/edit`)
+ await expect(
+ page.getByRole('heading', { name: `Edit Connector: ${connectorName}`, exact: true })
+ ).toBeVisible({ timeout: 20_000 })
+
+ // Image and Context are rendered as static read-only text (not editable inputs).
+ const meta = page.locator('.cu-connector-edit-meta')
+ await expect(meta).toBeVisible({ timeout: 20_000 })
+ await expect(meta.getByText('qa-recorder/example:dev')).toBeVisible()
+ await expect(meta.getByText(contextName)).toBeVisible()
+
+ // External Egress: switch to exact-CIDR mode and add one public CIDR + port.
+ // 8.8.8.8/32 is a valid public target; the model rejects private/doc ranges.
+ await fieldSelect(page, 'Egress mode', 'exact-cidr')
+ await page
+ .locator('.cu-field', { hasText: 'Allowed CIDRs/IPs' })
+ .first()
+ .locator('textarea')
+ .fill('8.8.8.8/32')
+ await page
+ .locator('.cu-field', { hasText: 'Allowed ports' })
+ .first()
+ .locator('input')
+ .fill('443')
+
+ await page.getByRole('button', { name: 'Save egress', exact: true }).click()
+ await expect(
+ page.getByText(`Connector ${connectorName} updated.`, { exact: true })
+ ).toBeVisible({ timeout: 20_000 })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-connector-edit')
+ } finally {
+ await api(
+ page.request,
+ 'DELETE',
+ `/api/v1/admin/mcp-servers/${encodeURIComponent(connectorName)}`
+ )
+ await api(page.request, 'DELETE', `/api/v1/admin/contexts/${encodeURIComponent(contextName)}`)
+ }
+ })
+})
diff --git a/control-ui/e2e/qa-recorder-context-connector-budget.spec.ts b/control-ui/e2e/qa-recorder-context-connector-budget.spec.ts
new file mode 100644
index 000000000..7795d877a
--- /dev/null
+++ b/control-ui/e2e/qa-recorder-context-connector-budget.spec.ts
@@ -0,0 +1,160 @@
+// control-ui/e2e/qa-recorder-context-connector-budget.spec.ts
+//
+// Mutating QA recorder combo: context + discovery connector (bound to the
+// context) + global token budget + verify both land. Creates and tears down
+// every resource. Requires QA_RECORDER_CONFIRM_MUTATIONS=1 in .env.qa-recorder.
+import { expect, test } from '@playwright/test'
+import {
+ CONTROL_API_URL,
+ CONTROL_UI_URL,
+ adminCredentials,
+ api,
+ assertAllowedTarget,
+ loginThroughUi,
+ requireRecorderConfirm,
+ screenshotAndLog,
+ uniqueE2EName,
+} from './qa-recorder-helpers'
+
+type BudgetRow = { id?: string; name?: string }
+
+async function waitForBudgetId(
+ request: import('@playwright/test').APIRequestContext,
+ name: string
+): Promise<string> {
+ for (let attempt = 0; attempt < 20; attempt += 1) {
+ const { status, data } = await api<{ rows?: BudgetRow[] }>(
+ request,
+ 'GET',
+ '/api/v1/admin/budgets'
+ )
+ if (status === 200) {
+ const found = (data.rows ?? []).find(row => row.name === name)
+ if (found?.id) return found.id
+ }
+ await new Promise(resolve => setTimeout(resolve, 500))
+ }
+ throw new Error(`Created budget "${name}" did not become visible through Control API.`)
+}
+
+test.describe('optional QA recorder: Control UI context connector budget combo', () => {
+ test('records the context + connector + global budget combo', async ({ page }, testInfo) => {
+ requireRecorderConfirm(
+ 'QA_RECORDER_CONFIRM_MUTATIONS',
+ 'This journey creates and deletes a context, a connector, and a token budget.'
+ )
+ assertAllowedTarget('CONTROL_UI_URL', CONTROL_UI_URL)
+ assertAllowedTarget('CONTROL_API_URL', CONTROL_API_URL)
+
+ const credentials = adminCredentials()
+ const contextName = uniqueE2EName('qa-recorder-ctx')
+ const connectorName = uniqueE2EName('qa-recorder-connector')
+ const budgetName = uniqueE2EName('qa-recorder-global-budget')
+ let budgetId = ''
+
+ try {
+ await loginThroughUi(page, credentials)
+
+ // step 1: create a context (name only).
+ await page.goto(`${CONTROL_UI_URL}/contexts/new`)
+ await expect(page).toHaveURL(/\/contexts\/new$/, { timeout: 20_000 })
+ await page.getByLabel('Context name').fill(contextName)
+ await page.getByRole('button', { name: 'Continue', exact: true }).click()
+ await page.getByRole('button', { name: 'Create context', exact: true }).click()
+ await expect(page).toHaveURL(new RegExp(`/contexts/${contextName}$`), { timeout: 20_000 })
+
+ // step 2: register a discovery connector bound to the context (stdio,
+ // not managed, no secret).
+ await page.goto(`${CONTROL_UI_URL}/connectors/new`)
+ await expect(page).toHaveURL(/\/connectors\/new$/, { timeout: 20_000 })
+ await expect(
+ page.getByRole('heading', { name: 'Create connector', exact: true })
+ ).toBeVisible({ timeout: 20_000 })
+ await page.getByPlaceholder('my-mcp-server', { exact: true }).fill(connectorName)
+ await page
+ .getByPlaceholder('us-central1-docker.pkg.dev/my-project/repo/mcp-server:latest', {
+ exact: true,
+ })
+ .fill('qa-recorder/example:dev')
+ const contextDropdown = page.locator('.cu-selection-dropdown__button')
+ await expect(contextDropdown).toBeVisible({ timeout: 10_000 })
+ await contextDropdown.click()
+ await page.getByPlaceholder('Search contexts...').fill(contextName)
+ const contextOption = page.getByRole('option', { name: contextName, exact: true })
+ await expect(contextOption).toBeVisible({ timeout: 10_000 })
+ await contextOption.click()
+ await page.getByRole('button', { name: 'Continue', exact: true }).click()
+ // Runtime: stdio transport + discovery only (Managed = No).
+ await page
+ .locator('.cu-field')
+ .filter({ hasText: 'Transport Type' })
+ .locator('select')
+ .selectOption('stdio')
+ await page
+ .locator('.cu-field')
+ .filter({ hasText: /^Managed$/ })
+ .locator('select')
+ .selectOption('false')
+ await page.getByRole('button', { name: 'Continue', exact: true }).click()
+ // Network egress: leave empty, continue.
+ await page.getByRole('button', { name: 'Continue', exact: true }).click()
+ // Secrets: leave unchecked, create the connector.
+ await page.getByRole('button', { name: 'Create connector', exact: true }).click()
+ await expect(page).toHaveURL(/\/connectors\/?$/, { timeout: 20_000 })
+
+ // step 3: verify the connector appears on the context detail Connectors tab.
+ await page.goto(`${CONTROL_UI_URL}/contexts/${encodeURIComponent(contextName)}/connectors`)
+ await expect(page).toHaveURL(/\/contexts\/.+\/connectors$/, { timeout: 20_000 })
+ await expect(
+ page.getByText('Review details, manage connectors, agents, teams, and members.', {
+ exact: true,
+ })
+ ).toBeVisible({ timeout: 20_000 })
+ await expect(page.getByText(connectorName, { exact: true })).toBeVisible({ timeout: 15_000 })
+
+ // step 4: create a global token budget (no scope).
+ await page.goto(`${CONTROL_UI_URL}/cost-and-usage/token-budgets/new`)
+ await expect(page).toHaveURL(/\/cost-and-usage\/token-budgets\/new$/, { timeout: 20_000 })
+ await page.locator('#budget-name').fill(budgetName)
+ await page.locator('#budget-limit').fill('10')
+ await page.getByRole('button', { name: 'Create budget', exact: true }).click()
+ await expect(page).toHaveURL(/\/cost-and-usage\/token-budgets$/, { timeout: 20_000 })
+ budgetId = await waitForBudgetId(page.request, budgetName)
+
+ // step 5: verify the budget lists on the token budgets page.
+ await expect(
+ page.getByText(
+ 'Spend caps per dimension, shown against live usage. P0c runs in observation mode (warn).',
+ { exact: true }
+ )
+ ).toBeVisible({ timeout: 20_000 })
+ await expect(page.getByText(budgetName, { exact: true })).toBeVisible({ timeout: 15_000 })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-context-connector-budget')
+ } finally {
+ const request = page.request
+ // Reverse-order cleanup: budget → connector → context (best-effort each).
+ if (budgetId) {
+ try {
+ await api(request, 'DELETE', `/api/v1/admin/budgets/${encodeURIComponent(budgetId)}`)
+ } catch {
+ // best-effort
+ }
+ }
+ try {
+ await api(
+ request,
+ 'DELETE',
+ `/api/v1/admin/mcp-servers/${encodeURIComponent(connectorName)}`
+ )
+ } catch {
+ // best-effort
+ }
+ try {
+ await api(request, 'DELETE', `/api/v1/admin/contexts/${encodeURIComponent(contextName)}`)
+ } catch {
+ // best-effort
+ }
+ }
+ })
+})
diff --git a/control-ui/e2e/qa-recorder-context-connector.spec.ts b/control-ui/e2e/qa-recorder-context-connector.spec.ts
new file mode 100644
index 000000000..ee407ca8b
--- /dev/null
+++ b/control-ui/e2e/qa-recorder-context-connector.spec.ts
@@ -0,0 +1,149 @@
+// control-ui/e2e/qa-recorder-context-connector.spec.ts
+//
+// MUTATING journey: creates a context plus a stdio discovery-only connector and
+// attaches the connector to the context. Self-contained (no external creds).
+// Guarded by QA_RECORDER_CONFIRM_MUTATIONS; connector then context are deleted
+// via the Control API in a finally.
+import { type Page, expect, test } from '@playwright/test'
+import {
+ CONTROL_API_URL,
+ CONTROL_UI_URL,
+ adminCredentials,
+ api,
+ assertAllowedTarget,
+ loginThroughUi,
+ requireRecorderConfirm,
+ screenshotAndLog,
+ uniqueE2EName,
+} from './qa-recorder-helpers'
+
+// The connector-form selects are not label-associated (no htmlFor/id), so scope
+// to the wrapping `.cu-field` by its visible label text and drive its <select>.
+async function fieldSelect(page: Page, fieldLabelText: string, value: string): Promise<void> {
+ const field = page.locator('.cu-field', { hasText: fieldLabelText }).first()
+ await field.locator('select').selectOption(value)
+}
+
+async function createEmptyContext(page: Page, contextName: string): Promise<void> {
+ await page.getByRole('link', { name: 'Contexts', exact: true }).click()
+ await expect(page).toHaveURL(/\/contexts$/, { timeout: 20_000 })
+ await page.getByRole('button', { name: 'Create context', exact: true }).click()
+ await expect(page).toHaveURL(/\/contexts\/new$/, { timeout: 20_000 })
+ await page.getByPlaceholder('context1').fill(contextName)
+ await page
+ .getByPlaceholder('Human-readable context description')
+ .fill('QA recorder temporary context')
+ await page.getByRole('button', { name: 'Continue', exact: true }).click()
+ await expect(
+ page
+ .getByText('No connectors found.', { exact: true })
+ .or(page.getByPlaceholder('Search connectors...'))
+ ).toBeVisible({ timeout: 20_000 })
+ await page.getByRole('button', { name: 'Create context', exact: true }).click()
+ await expect(page).toHaveURL(new RegExp(`/contexts/${contextName}$`), { timeout: 20_000 })
+ await expect(
+ page.getByText('Review details, manage connectors, agents, teams, and members.', {
+ exact: true,
+ })
+ ).toBeVisible({ timeout: 20_000 })
+}
+
+async function createDiscoveryConnector(
+ page: Page,
+ connectorName: string,
+ contextName: string
+): Promise<void> {
+ await page.getByRole('link', { name: 'Connectors', exact: true }).click()
+ await expect(page).toHaveURL(/\/connectors$/, { timeout: 20_000 })
+ await page.getByRole('button', { name: 'Create Connector', exact: true }).click()
+ await expect(page).toHaveURL(/\/connectors\/new$/, { timeout: 20_000 })
+
+ // Step Connector.
+ await page.getByPlaceholder('my-mcp-server').fill(connectorName)
+ await page
+ .getByPlaceholder('us-central1-docker.pkg.dev/my-project/repo/mcp-server:latest')
+ .fill('qa-recorder/example:dev')
+ await page
+ .getByPlaceholder('Optional description of this connector')
+ .fill('QA recorder discovery-only connector')
+
+ // Context single-select is disabled while contexts load; wait, then pick ours.
+ const contextDropdown = page.locator('.cu-selection-dropdown__button')
+ await expect(contextDropdown).toBeEnabled({ timeout: 20_000 })
+ await contextDropdown.click()
+ await expect(page.getByPlaceholder('Search contexts...')).toBeVisible({ timeout: 20_000 })
+ const contextOption = page.getByRole('option', { name: contextName, exact: true })
+ await expect(contextOption).toBeVisible({ timeout: 20_000 })
+ await contextOption.click()
+
+ await page.getByRole('button', { name: 'Continue', exact: true }).click()
+
+ // Step Runtime: stdio hides the Port field; discovery-only means Not managed.
+ await fieldSelect(page, 'Transport Type', 'stdio')
+ await expect(page.locator('input[type="number"]')).toHaveCount(0)
+ await fieldSelect(page, 'Managed', 'false')
+
+ await page.getByRole('button', { name: 'Continue', exact: true }).click()
+
+ // Step Network: EgressEditor renders closed-by-default; leave egress empty.
+ await expect(page.getByText('External Egress', { exact: true })).toBeVisible({ timeout: 20_000 })
+ await expect(page.getByText('Egress mode', { exact: true })).toBeVisible({ timeout: 20_000 })
+
+ await page.getByRole('button', { name: 'Continue', exact: true }).click()
+
+ // Step Secrets: envSecret stays off for this discovery connector.
+ await expect(
+ page.getByRole('checkbox', { name: 'Use Kubernetes Secret for credentials', exact: true })
+ ).not.toBeChecked()
+
+ await page.getByRole('button', { name: 'Create connector', exact: true }).click()
+ await expect(page.getByText('Connector created successfully.', { exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+ await expect(page).toHaveURL(/\/connectors$/, { timeout: 20_000 })
+}
+
+test.describe('optional QA recorder: Control UI context and connector', () => {
+ test('records creating a context plus a stdio discovery connector and attaching it', async ({
+ page,
+ }, testInfo) => {
+ requireRecorderConfirm(
+ 'QA_RECORDER_CONFIRM_MUTATIONS',
+ 'This journey creates and deletes local context and connector resources.'
+ )
+ assertAllowedTarget('CONTROL_UI_URL', CONTROL_UI_URL)
+ assertAllowedTarget('CONTROL_API_URL', CONTROL_API_URL)
+
+ const credentials = adminCredentials()
+ const contextName = uniqueE2EName('qa-recorder-context')
+ const connectorName = uniqueE2EName('qa-recorder-connector')
+
+ try {
+ await loginThroughUi(page, credentials)
+
+ await createEmptyContext(page, contextName)
+ await createDiscoveryConnector(page, connectorName, contextName)
+
+ // The create flow auto-attaches the connector; verify it on the context's
+ // Connectors tab.
+ await page.getByRole('link', { name: 'Contexts', exact: true }).click()
+ await expect(page).toHaveURL(/\/contexts$/, { timeout: 20_000 })
+ await page.getByRole('row', { name: `Open context ${contextName}`, exact: true }).click()
+ await expect(page).toHaveURL(new RegExp(`/contexts/${contextName}/connectors$`), {
+ timeout: 20_000,
+ })
+ await expect(page.getByRole('row').filter({ hasText: connectorName })).toBeVisible({
+ timeout: 20_000,
+ })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-context-connector')
+ } finally {
+ await api(
+ page.request,
+ 'DELETE',
+ `/api/v1/admin/mcp-servers/${encodeURIComponent(connectorName)}`
+ )
+ await api(page.request, 'DELETE', `/api/v1/admin/contexts/${encodeURIComponent(contextName)}`)
+ }
+ })
+})
diff --git a/control-ui/e2e/qa-recorder-context-create.spec.ts b/control-ui/e2e/qa-recorder-context-create.spec.ts
new file mode 100644
index 000000000..771cdcc6a
--- /dev/null
+++ b/control-ui/e2e/qa-recorder-context-create.spec.ts
@@ -0,0 +1,87 @@
+// control-ui/e2e/qa-recorder-context-create.spec.ts
+//
+// MUTATING journey: creates a context with an empty connector allowlist, then
+// tours every context-detail tab. Guarded by QA_RECORDER_CONFIRM_MUTATIONS and
+// cleaned up via the Control API (`/api/v1/admin/contexts/<name>`) in a finally.
+import { expect, test } from '@playwright/test'
+import {
+ CONTROL_API_URL,
+ CONTROL_UI_URL,
+ adminCredentials,
+ api,
+ assertAllowedTarget,
+ loginThroughUi,
+ requireRecorderConfirm,
+ screenshotAndLog,
+ uniqueE2EName,
+} from './qa-recorder-helpers'
+
+test.describe('optional QA recorder: Control UI context create', () => {
+ test('records context creation with an empty allowlist and a full detail tab tour', async ({
+ page,
+ }, testInfo) => {
+ requireRecorderConfirm(
+ 'QA_RECORDER_CONFIRM_MUTATIONS',
+ 'This journey creates and deletes a local context resource.'
+ )
+ assertAllowedTarget('CONTROL_UI_URL', CONTROL_UI_URL)
+ assertAllowedTarget('CONTROL_API_URL', CONTROL_API_URL)
+
+ const credentials = adminCredentials()
+ const name = uniqueE2EName('qa-recorder-context')
+ try {
+ await loginThroughUi(page, credentials)
+
+ await page.getByRole('link', { name: 'Contexts', exact: true }).click()
+ await expect(page).toHaveURL(/\/contexts$/, { timeout: 20_000 })
+
+ await page.getByRole('button', { name: 'Create context', exact: true }).click()
+ await expect(page).toHaveURL(/\/contexts\/new$/, { timeout: 20_000 })
+ await expect(page.getByRole('heading', { name: 'Create context', exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+ await expect(
+ page.getByText('Define a new context and attach connectors.', { exact: true })
+ ).toBeVisible({ timeout: 20_000 })
+
+ // Step Context: identity.
+ await page.getByPlaceholder('context1').fill(name)
+ await page
+ .getByPlaceholder('Human-readable context description')
+ .fill('QA recorder temporary context')
+ await page.getByRole('button', { name: 'Continue', exact: true }).click()
+
+ // Step Connectors: the multi-select renders when connectors exist, otherwise
+ // the empty hint. Either is valid for an empty allowlist; leave it unselected.
+ await expect(
+ page
+ .getByText('No connectors found.', { exact: true })
+ .or(page.getByPlaceholder('Search connectors...'))
+ ).toBeVisible({ timeout: 20_000 })
+
+ await page.getByRole('button', { name: 'Create context', exact: true }).click()
+
+ await expect(page).toHaveURL(new RegExp(`/contexts/${name}$`), { timeout: 20_000 })
+ await expect(
+ page.getByText('Review details, manage connectors, agents, teams, and members.', {
+ exact: true,
+ })
+ ).toBeVisible({ timeout: 20_000 })
+
+ // Tour every detail tab; Members is the final stop and must be selected.
+ for (const tabLabel of ['Connectors', 'Agent Files', 'Agents', 'Teams', 'Members']) {
+ const tab = page.getByRole('tab', { name: tabLabel, exact: true })
+ await expect(tab).toBeVisible({ timeout: 20_000 })
+ await tab.click()
+ }
+ await expect(page.getByRole('tab', { name: 'Members', exact: true })).toHaveAttribute(
+ 'aria-selected',
+ 'true'
+ )
+
+ await screenshotAndLog(page, testInfo, 'control-ui-context-create')
+ } finally {
+ await api(page.request, 'DELETE', `/api/v1/admin/contexts/${encodeURIComponent(name)}`)
+ }
+ })
+})
diff --git a/control-ui/e2e/qa-recorder-cost-governance.spec.ts b/control-ui/e2e/qa-recorder-cost-governance.spec.ts
new file mode 100644
index 000000000..daa33eca2
--- /dev/null
+++ b/control-ui/e2e/qa-recorder-cost-governance.spec.ts
@@ -0,0 +1,133 @@
+// control-ui/e2e/qa-recorder-cost-governance.spec.ts
+//
+// Mutating QA recorder combo: cost governance (LLM model + LLM price + a token
+// budget scoped to that model + verify usage view). Creates and tears down
+// every resource. Requires QA_RECORDER_CONFIRM_MUTATIONS=1 in .env.qa-recorder.
+import { expect, test } from '@playwright/test'
+import {
+ CONTROL_API_URL,
+ CONTROL_UI_URL,
+ adminCredentials,
+ api,
+ assertAllowedTarget,
+ loginThroughUi,
+ requireRecorderConfirm,
+ screenshotAndLog,
+ uniqueE2EName,
+} from './qa-recorder-helpers'
+
+type RowItem = { id?: string; model?: string; name?: string }
+
+async function waitForRow(
+ request: import('@playwright/test').APIRequestContext,
+ pathName: string,
+ matchField: string,
+ matchValue: string
+): Promise<string> {
+ for (let attempt = 0; attempt < 20; attempt += 1) {
+ const { status, data } = await api<{ rows?: RowItem[] }>(request, 'GET', pathName)
+ if (status === 200) {
+ const found = (data.rows ?? []).find(
+ row => String((row as Record<string, unknown>)[matchField] ?? '') === matchValue
+ )
+ if (found?.id) return found.id
+ }
+ await new Promise(resolve => setTimeout(resolve, 500))
+ }
+ throw new Error(`Created resource "${matchValue}" did not become visible through Control API.`)
+}
+
+test.describe('optional QA recorder: Control UI cost governance combo', () => {
+ test('records the cost governance combo (model, price, model-scoped budget)', async ({
+ page,
+ }, testInfo) => {
+ requireRecorderConfirm(
+ 'QA_RECORDER_CONFIRM_MUTATIONS',
+ 'This journey creates and deletes an LLM model, an LLM price, and a token budget.'
+ )
+ assertAllowedTarget('CONTROL_UI_URL', CONTROL_UI_URL)
+ assertAllowedTarget('CONTROL_API_URL', CONTROL_API_URL)
+
+ const credentials = adminCredentials()
+ const modelName = uniqueE2EName('qa-recorder-model')
+ const budgetName = uniqueE2EName('qa-recorder-budget')
+ let modelId = ''
+ let priceId = ''
+ let budgetId = ''
+
+ try {
+ await loginThroughUi(page, credentials)
+
+ // step 1: add an allowed LLM model (provider defaults to the first option).
+ await page.goto(`${CONTROL_UI_URL}/llm-models/new`)
+ await expect(page).toHaveURL(/\/llm-models\/new$/, { timeout: 20_000 })
+ await expect(
+ page.getByRole('heading', { name: 'Add allowed model', exact: true })
+ ).toBeVisible({ timeout: 20_000 })
+ await page.locator('#llm-model-name').fill(modelName)
+ await page.getByRole('button', { name: 'Add model', exact: true }).click()
+ await expect(page).toHaveURL(/\/llm-models$/, { timeout: 20_000 })
+ modelId = await waitForRow(page.request, '/api/v1/admin/llm-models', 'model', modelName)
+
+ // step 2: add an active LLM price for that model (same default provider).
+ await page.goto(`${CONTROL_UI_URL}/cost-and-usage/llm-prices/new`)
+ await expect(page).toHaveURL(/\/cost-and-usage\/llm-prices\/new$/, { timeout: 20_000 })
+ await expect(page.getByRole('heading', { name: 'Add LLM price', exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+ await page.locator('#llm-price-model').fill(modelName)
+ await page.locator('#llm-price-input_token_price').fill('1')
+ await page.getByRole('button', { name: 'Add price', exact: true }).click()
+ await expect(page).toHaveURL(/\/cost-and-usage\/llm-prices$/, { timeout: 20_000 })
+ priceId = await waitForRow(page.request, '/api/v1/admin/llm-prices', 'model', modelName)
+
+ // step 3: create a cost budget scoped to that model via the ScopeSelector
+ // Model dimension (free-text + Add).
+ await page.goto(`${CONTROL_UI_URL}/cost-and-usage/token-budgets/new`)
+ await expect(page).toHaveURL(/\/cost-and-usage\/token-budgets\/new$/, { timeout: 20_000 })
+ await page.locator('#budget-name').fill(budgetName)
+ await page.locator('#budget-limit').fill('10')
+ await page.getByLabel('Add Model to scope').fill(modelName)
+ await page.getByRole('button', { name: 'Add', exact: true }).click()
+ await expect(page.locator('.cu-tb-chip').filter({ hasText: modelName })).toBeVisible({
+ timeout: 10_000,
+ })
+ await page.getByRole('button', { name: 'Create budget', exact: true }).click()
+ await expect(page).toHaveURL(/\/cost-and-usage\/token-budgets$/, { timeout: 20_000 })
+ budgetId = await waitForRow(page.request, '/api/v1/admin/budgets', 'name', budgetName)
+
+ // step 4: verify the usage dashboard shell renders with the model in place.
+ await page.goto(`${CONTROL_UI_URL}/cost-and-usage/usage`)
+ await expect(page).toHaveURL(/\/cost-and-usage\/usage/, { timeout: 20_000 })
+ await expect(page.locator('.cu-panel-title').filter({ hasText: 'LLM Usage' })).toBeVisible({
+ timeout: 20_000,
+ })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-cost-governance')
+ } finally {
+ const request = page.request
+ // Reverse-order cleanup: budget → price → model (best-effort each).
+ if (budgetId) {
+ try {
+ await api(request, 'DELETE', `/api/v1/admin/budgets/${encodeURIComponent(budgetId)}`)
+ } catch {
+ // best-effort
+ }
+ }
+ if (priceId) {
+ try {
+ await api(request, 'DELETE', `/api/v1/admin/llm-prices/${encodeURIComponent(priceId)}`)
+ } catch {
+ // best-effort
+ }
+ }
+ if (modelId) {
+ try {
+ await api(request, 'DELETE', `/api/v1/admin/llm-models/${encodeURIComponent(modelId)}`)
+ } catch {
+ // best-effort
+ }
+ }
+ }
+ })
+})
diff --git a/control-ui/e2e/qa-recorder-create-form-smoke.spec.ts b/control-ui/e2e/qa-recorder-create-form-smoke.spec.ts
new file mode 100644
index 000000000..b098f5776
--- /dev/null
+++ b/control-ui/e2e/qa-recorder-create-form-smoke.spec.ts
@@ -0,0 +1,352 @@
+// control-ui/e2e/qa-recorder-create-form-smoke.spec.ts
+//
+// Read-only create-form availability smoke tour. Opens every mutating create
+// wizard directly via its canonical route, asserts the CreatePageHeader title +
+// subtitle render, asserts step 0's primary field, and — where it is safe to do
+// so without a real prerequisite resource — clicks Continue/Next once to prove
+// step progression. No test clicks a final Create/Submit/Install action, so
+// nothing is mutated and there is no confirm flag or cleanup.
+import { type Page, expect, test } from '@playwright/test'
+import {
+ CONTROL_API_URL,
+ CONTROL_UI_URL,
+ adminCredentials,
+ assertAllowedTarget,
+ loginThroughUi,
+ screenshotAndLog,
+} from './qa-recorder-helpers'
+
+test.describe('optional QA recorder: Control UI create-form smoke', () => {
+ async function openCreatePage(page: Page, path: string): Promise<void> {
+ assertAllowedTarget('CONTROL_UI_URL', CONTROL_UI_URL)
+ assertAllowedTarget('CONTROL_API_URL', CONTROL_API_URL)
+ await loginThroughUi(page, adminCredentials())
+ await page.goto(path)
+ }
+
+ async function expectShell(page: Page, title: string, subtitle: string): Promise<void> {
+ await expect(page.getByRole('heading', { name: title, exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+ await expect(page.getByText(subtitle, { exact: true })).toBeVisible({ timeout: 20_000 })
+ }
+
+ async function clickContinue(page: Page): Promise<void> {
+ const continueButton = page
+ .locator('.cu-create-actions')
+ .getByRole('button', { name: 'Continue', exact: true })
+ await expect(continueButton).toBeEnabled()
+ await continueButton.click()
+ }
+
+ test('Create context form mounts and steps to the connectors step', async ({
+ page,
+ }, testInfo) => {
+ await openCreatePage(page, '/contexts/new')
+ await expectShell(page, 'Create context', 'Define a new context and attach connectors.')
+ await expect(page.locator('#ctx-name')).toBeVisible({ timeout: 20_000 })
+
+ await page.locator('#ctx-name').fill('qa-smoke-context')
+ await clickContinue(page)
+ await expect(
+ page.getByText('Choose the connectors this context can expose to agents.', { exact: true })
+ ).toBeVisible({ timeout: 20_000 })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-create-context')
+ })
+
+ test('Create connector form mounts on the identity step', async ({ page }, testInfo) => {
+ await openCreatePage(page, '/connectors/new')
+ await expectShell(
+ page,
+ 'Create connector',
+ 'Register a new connector and optionally create its managed deployment metadata.'
+ )
+ // Step 0 panel title (CreateStepFlow header) renders with the step body.
+ await expect(page.getByText('Connector identity', { exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-create-connector')
+ })
+
+ test('Create agent form mounts, steps to context, and renders channel providers', async ({
+ page,
+ }, testInfo) => {
+ await openCreatePage(page, '/agents/new')
+ await expectShell(
+ page,
+ 'Create agent',
+ 'Provision a new agent with context, channels, and access.'
+ )
+ await expect(page.getByPlaceholder('agent-name')).toBeVisible({ timeout: 20_000 })
+
+ await page.getByPlaceholder('agent-name').fill('qa-smoke-agent')
+ const next = page
+ .locator('.cu-create-actions')
+ .getByRole('button', { name: 'Next', exact: true })
+ await expect(next).toBeEnabled()
+ await next.click()
+ await expect(page.getByText('Create new context', { exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+
+ // The Channels step (Telegram + Slack provider panels) sits behind the
+ // Model & Credentials step, which needs a reusable host Secret and a
+ // selectable model. Drive there read-only when the environment provides
+ // both; otherwise the shell + Context step above already prove the form.
+ if (await canReachAgentChannelsStep(page)) {
+ await assertAgentChannelProviders(page)
+ }
+
+ await screenshotAndLog(page, testInfo, 'control-ui-create-agent')
+ })
+
+ test('Add allowed model form mounts', async ({ page }, testInfo) => {
+ await openCreatePage(page, '/llm-models/new')
+ await expectShell(
+ page,
+ 'Add allowed model',
+ 'Allow a provider/model so agents and runtime can select it.'
+ )
+ await expect(page.locator('#llm-model-provider')).toBeVisible({ timeout: 20_000 })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-create-llm-model')
+ })
+
+ test('Create LLM secret form mounts', async ({ page }, testInfo) => {
+ await openCreatePage(page, '/secrets/new?scope=llm')
+ await expectShell(
+ page,
+ 'Create LLM secret',
+ 'Store provider credentials for agent host secrets.'
+ )
+ await expect(page.locator('#llm-secret-name')).toBeVisible({ timeout: 20_000 })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-create-secret-llm')
+ })
+
+ test('Create connector secret form mounts', async ({ page }, testInfo) => {
+ await openCreatePage(page, '/secrets/new?scope=mcp')
+ await expectShell(
+ page,
+ 'Create connector secret',
+ 'Create a Kubernetes secret for connector credential injection.'
+ )
+ await expect(page.locator('#mcp-secret-name')).toBeVisible({ timeout: 20_000 })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-create-secret-mcp')
+ })
+
+ test('Create recipe secret form mounts', async ({ page }, testInfo) => {
+ await openCreatePage(page, '/secrets/new?scope=recipe')
+ await expectShell(
+ page,
+ 'Create recipe secret',
+ 'Create a Kubernetes secret in sandbox-recipes for recipe credential injection.'
+ )
+ await expect(page.locator('#recipe-secret-name')).toBeVisible({ timeout: 20_000 })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-create-secret-recipe')
+ })
+
+ test('New token budget form mounts', async ({ page }, testInfo) => {
+ await openCreatePage(page, '/cost-and-usage/token-budgets/new')
+ await expectShell(
+ page,
+ 'New token budget',
+ 'Cap LLM spend per dimension and watch it against live usage. P0c runs in observation mode.'
+ )
+ await expect(page.locator('#budget-name')).toBeVisible({ timeout: 20_000 })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-create-token-budget')
+ })
+
+ test('Add LLM price form mounts', async ({ page }, testInfo) => {
+ await openCreatePage(page, '/cost-and-usage/llm-prices/new')
+ await expectShell(
+ page,
+ 'Add LLM price',
+ 'Set per-1M-token prices for a provider/model so cost budgets can price usage.'
+ )
+ await expect(page.locator('#llm-price-provider')).toBeVisible({ timeout: 20_000 })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-create-llm-price')
+ })
+
+ test('Create team form mounts and steps to the members step', async ({ page }, testInfo) => {
+ await openCreatePage(page, '/users-and-teams/teams/new')
+ await expectShell(page, 'Create team', 'Create a team now. Add members and roles next.')
+ await expect(page.locator('#new-team-name')).toBeVisible({ timeout: 20_000 })
+
+ await page.locator('#new-team-name').fill('QA Smoke Team')
+ await clickContinue(page)
+ await expect(
+ page.getByText('Choose initial team members and roles.', { exact: true })
+ ).toBeVisible({ timeout: 20_000 })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-create-team')
+ })
+
+ test('Create member form mounts and steps to the team step', async ({ page }, testInfo) => {
+ await openCreatePage(page, '/users-and-teams/users/new')
+ await expectShell(
+ page,
+ 'Create member',
+ 'Create a pending invitation and send the invitation email.'
+ )
+ await expect(page.locator('#new-user-name')).toBeVisible({ timeout: 20_000 })
+
+ await page.locator('#new-user-name').fill('QA Smoke')
+ await page.locator('#new-user-email').fill('[email protected]')
+ await clickContinue(page)
+ await expect(
+ page.getByText('Place the invited member on a team now, or leave them unassigned.', {
+ exact: true,
+ })
+ ).toBeVisible({ timeout: 20_000 })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-create-member')
+ })
+
+ test('Invite admin form mounts and steps to the review step', async ({ page }, testInfo) => {
+ await openCreatePage(page, '/users-and-teams/admins/new')
+ await expectShell(page, 'Invite admin', 'Invite a new Control UI admin.')
+ await expect(page.locator('#control-admin-email')).toBeVisible({ timeout: 20_000 })
+
+ await page.locator('#control-admin-email').fill('[email protected]')
+ await clickContinue(page)
+ await expect(
+ page.getByText(
+ 'The invitee will set their username and password after accepting the email.',
+ { exact: true }
+ )
+ ).toBeVisible({ timeout: 20_000 })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-create-admin')
+ })
+
+ test('Create SharedFileSystem form mounts and steps to the access step', async ({
+ page,
+ }, testInfo) => {
+ await openCreatePage(page, '/agent-files/new')
+ await expectShell(
+ page,
+ 'Create SharedFileSystem',
+ 'Provision workspace storage that Contexts can mount read-only into agent pods.'
+ )
+ await expect(page.locator('#shared-filesystem-name')).toBeVisible({ timeout: 20_000 })
+
+ await page.locator('#shared-filesystem-name').fill('qa-smoke-fs')
+ await clickContinue(page)
+ await expect(
+ page.getByText('Pick the access mode, storage class, and deletion behavior.', { exact: true })
+ ).toBeVisible({ timeout: 20_000 })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-create-shared-filesystem')
+ })
+
+ test('Publish to Marketplace form mounts', async ({ page }, testInfo) => {
+ await openCreatePage(page, '/marketplace/publish')
+ await expectShell(
+ page,
+ 'Publish to Marketplace',
+ 'Publish connectors or plugins to the Marketplace with versioned metadata.'
+ )
+ // The publish wizard's step-0 panel title renders with the step body.
+ await expect(page.getByText('Marketplace entry', { exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-marketplace-publish')
+ })
+
+ test('Install from Marketplace shell mounts without entry query params', async ({
+ page,
+ }, testInfo) => {
+ await openCreatePage(page, '/marketplace/install')
+ await expectShell(
+ page,
+ 'Install from Marketplace',
+ 'Install a Marketplace entry into your cluster and bind it to a context.'
+ )
+ // Without entry/version query params the page renders a graceful error
+ // state beneath the header instead of a form.
+ await expect(
+ page.getByText('Missing Marketplace entry identifiers.', { exact: false })
+ ).toBeVisible({ timeout: 20_000 })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-marketplace-install')
+ })
+})
+
+// The agent Channels step renders both first-party provider panels (Telegram,
+// Slack) only after the wizard advances past Model & Credentials. Reaching it
+// read-only needs an existing host Secret and an auto-selected model, so every
+// advance is guarded: if a step cannot be satisfied in this environment, the
+// helper returns false and the smoke falls back to the shell proof above.
+
+async function clickAgentNext(page: Page, timeout = 8_000): Promise<boolean> {
+ const next = page.locator('.cu-create-actions').getByRole('button', { name: 'Next', exact: true })
+ try {
+ await expect(next).toBeEnabled({ timeout })
+ await next.click()
+ return true
+ } catch {
+ return false
+ }
+}
+
+async function canReachAgentChannelsStep(page: Page): Promise<boolean> {
+ const stepTimeout = 8_000
+
+ // Context step: create a fresh context so the journey does not depend on an
+ // existing one.
+ const newContextRadio = page.getByText('Create new context', { exact: true })
+ if (!(await newContextRadio.isVisible({ timeout: stepTimeout }).catch(() => false))) return false
+ await newContextRadio.click()
+ const contextName = page.getByPlaceholder('context-name')
+ if (!(await contextName.isVisible({ timeout: stepTimeout }).catch(() => false))) return false
+ await contextName.fill('qa-smoke-agent-ctx')
+ if (!(await clickAgentNext(page))) return false
+
+ // Model & Credentials: reuse an existing host Secret and rely on the
+ // allowlist to auto-select a model. Abort if none is available.
+ const reuseSecret = page.getByText('Reuse an existing Secret', { exact: true })
+ if (!(await reuseSecret.isVisible({ timeout: stepTimeout }).catch(() => false))) return false
+ await reuseSecret.click()
+ const secretPicker = page.locator('.cu-agent-select__button').first()
+ if (!(await secretPicker.isVisible({ timeout: stepTimeout }).catch(() => false))) return false
+ await secretPicker.click()
+ const firstSecret = page.locator('.cu-agent-select__option').first()
+ if (!(await firstSecret.isVisible({ timeout: stepTimeout }).catch(() => false))) return false
+ await firstSecret.click()
+ // Next only enables once a model has been auto-selected from the allowlist.
+ if (!(await clickAgentNext(page, 15_000))) return false
+
+ // Access step: Next is always enabled here.
+ if (!(await clickAgentNext(page))) return false
+
+ // Channels step.
+ return page
+ .getByText('Create new channel', { exact: true })
+ .isVisible({ timeout: stepTimeout })
+ .catch(() => false)
+}
+
+async function assertAgentChannelProviders(page: Page): Promise<void> {
+ // Default provider is Telegram, so its panel is shown as soon as "Create new
+ // channel" is chosen.
+ await page.getByText('Create new channel', { exact: true }).click()
+ await expect(page.getByText('Telegram bot handle')).toBeVisible({ timeout: 10_000 })
+
+ // Switch to Slack and confirm its panel renders.
+ await page.locator('.cu-agent-select__button').first().click()
+ await page.locator('.cu-agent-select__option').filter({ hasText: 'Slack' }).first().click()
+ await expect(page.getByText('Slack App Name')).toBeVisible({ timeout: 10_000 })
+
+ // Switch back to Telegram to prove both providers are wired through the picker.
+ await page.locator('.cu-agent-select__button').first().click()
+ await page.locator('.cu-agent-select__option').filter({ hasText: 'Telegram' }).first().click()
+ await expect(page.getByText('Telegram bot handle')).toBeVisible({ timeout: 10_000 })
+}
diff --git a/control-ui/e2e/qa-recorder-global-fs.spec.ts b/control-ui/e2e/qa-recorder-global-fs.spec.ts
new file mode 100644
index 000000000..b90910cc3
--- /dev/null
+++ b/control-ui/e2e/qa-recorder-global-fs.spec.ts
@@ -0,0 +1,138 @@
+// control-ui/e2e/qa-recorder-global-fs.spec.ts
+//
+// Optional QA recorder journey (MUTATING). Requires QA_RECORDER_CONFIRM_MUTATIONS=1.
+// Creates a folder, uploads a file, and renames it in the Global File System.
+// Best-effort cleanup deletes the file and folder through the Control API in finally.
+import { type APIRequestContext, expect, test } from '@playwright/test'
+import * as fs from 'node:fs/promises'
+import * as os from 'node:os'
+import * as path from 'node:path'
+import {
+ CONTROL_API_URL,
+ CONTROL_UI_URL,
+ adminCredentials,
+ api,
+ assertAllowedTarget,
+ loginThroughUi,
+ requireRecorderConfirm,
+ screenshotAndLog,
+ uniqueE2EName,
+} from './qa-recorder-helpers'
+
+type GfsChild = {
+ resourceId: string
+ rid: string
+ name: string
+ kind: string
+ version: number
+}
+
+async function cleanupGfsArtifacts(
+ request: APIRequestContext,
+ folderName: string,
+ fileNames: string[]
+): Promise<void> {
+ try {
+ const tree = await api<{ items?: GfsChild[]; rootResourceId?: string }>(
+ request,
+ 'GET',
+ '/api/v1/gfs/tree?drive=main'
+ )
+ const rootId = tree.data.rootResourceId
+ if (!rootId) return
+ const folder = (tree.data.items ?? []).find(
+ item => item.name === folderName && item.kind === 'directory'
+ )
+ if (!folder) return
+
+ const children = await api<{ items?: GfsChild[] }>(
+ request,
+ 'GET',
+ `/api/v1/gfs/resources/${encodeURIComponent(folder.resourceId)}/children?drive=main`
+ )
+ for (const child of children.data.items ?? []) {
+ if (fileNames.includes(child.name)) {
+ await api(
+ request,
+ 'DELETE',
+ `/api/v1/gfs/proxy/v1/resources/${encodeURIComponent(child.rid)}`,
+ { ifMatch: child.version }
+ )
+ }
+ }
+ await api(
+ request,
+ 'DELETE',
+ `/api/v1/gfs/proxy/v1/resources/${encodeURIComponent(folder.rid)}`,
+ { ifMatch: folder.version }
+ )
+ } catch {
+ // Best-effort: GFS is global, so leftover artifacts are the only concern.
+ }
+}
+
+test.describe('optional QA recorder: Control UI Global File System', () => {
+ test('Global file system — folder + upload + rename', async ({ page }, testInfo) => {
+ requireRecorderConfirm(
+ 'QA_RECORDER_CONFIRM_MUTATIONS',
+ 'This journey creates a folder, uploads a file, and renames it in the Global File System.'
+ )
+ assertAllowedTarget('CONTROL_UI_URL', CONTROL_UI_URL)
+ assertAllowedTarget('CONTROL_API_URL', CONTROL_API_URL)
+
+ const credentials = adminCredentials()
+ const folderName = uniqueE2EName('qa-recorder-folder')
+ const uploadName = `qa-recorder-file-${Date.now().toString(36)}.txt`
+ const renamedUploadName = uploadName.replace(/\.txt$/, '-renamed.txt')
+ let tempFilePath = ''
+
+ try {
+ await loginThroughUi(page, credentials)
+
+ await page.goto(`${CONTROL_UI_URL}/global-file-system`)
+ await expect(
+ page.getByText(
+ 'Browse and manage drive resources and access grants from the admin plane.',
+ { exact: true }
+ )
+ ).toBeVisible({ timeout: 20_000 })
+ await expect(page.getByRole('button', { name: 'New folder', exact: true })).toBeEnabled({
+ timeout: 20_000,
+ })
+
+ await page.getByRole('button', { name: 'New folder', exact: true }).click()
+ const newFolderDialog = page.getByRole('dialog', { name: 'New folder', exact: true })
+ await expect(newFolderDialog).toBeVisible({ timeout: 20_000 })
+ await newFolderDialog.getByLabel('Folder name').fill(folderName)
+ await newFolderDialog.getByRole('button', { name: 'Create folder', exact: true }).click()
+
+ await expect(page.locator('.cu-gfs-list__row').filter({ hasText: folderName })).toBeVisible({
+ timeout: 20_000,
+ })
+
+ tempFilePath = path.join(os.tmpdir(), `qa-recorder-gfs-${Date.now()}.txt`)
+ await fs.writeFile(tempFilePath, 'qa-recorder global file system upload\n', 'utf8')
+ await page.getByRole('button', { name: 'Upload file', exact: true }).click()
+ await page.getByLabel('Choose file to upload').setInputFiles(tempFilePath)
+ await page.getByRole('button', { name: 'Upload', exact: true }).click()
+
+ await expect(page.locator('.cu-gfs-list__row').filter({ hasText: uploadName })).toBeVisible({
+ timeout: 20_000,
+ })
+
+ await page.getByRole('button', { name: `Actions for ${uploadName}`, exact: true }).click()
+ await page.getByRole('menuitem', { name: 'Rename', exact: true }).click()
+ await page.getByLabel('New name').fill(renamedUploadName)
+ await page.getByRole('button', { name: 'Save', exact: true }).click()
+
+ await expect(
+ page.locator('.cu-gfs-list__row').filter({ hasText: renamedUploadName })
+ ).toBeVisible({ timeout: 20_000 })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-global-fs')
+ } finally {
+ if (tempFilePath) await fs.rm(tempFilePath, { force: true }).catch(() => {})
+ await cleanupGfsArtifacts(page.request, folderName, [uploadName, renamedUploadName])
+ }
+ })
+})
diff --git a/control-ui/e2e/qa-recorder-llm-model-lifecycle.spec.ts b/control-ui/e2e/qa-recorder-llm-model-lifecycle.spec.ts
new file mode 100644
index 000000000..32aa7265b
--- /dev/null
+++ b/control-ui/e2e/qa-recorder-llm-model-lifecycle.spec.ts
@@ -0,0 +1,132 @@
+// control-ui/e2e/qa-recorder-llm-model-lifecycle.spec.ts
+//
+// Optional QA recorder journey (MUTATING): records the full LLM allowlist model
+// lifecycle (add → disable → remove) through the Control UI. Run with
+// QA_RECORDER_CONFIRM_MUTATIONS=1.
+import { expect, test } from '@playwright/test'
+import {
+ CONTROL_API_URL,
+ CONTROL_UI_URL,
+ adminCredentials,
+ api,
+ assertAllowedTarget,
+ loginThroughUi,
+ requireRecorderConfirm,
+ screenshotAndLog,
+ uniqueE2EName,
+} from './qa-recorder-helpers'
+
+type LlmModelRow = { id?: string; provider?: string; model?: string }
+
+const PROVIDER = 'openai'
+const PROVIDER_DISPLAY_LABEL = 'OpenAI'
+
+test.describe('optional QA recorder: Control UI LLM model lifecycle', () => {
+ test('records the add → disable → remove lifecycle for an allowed model', async ({
+ page,
+ }, testInfo) => {
+ requireRecorderConfirm(
+ 'QA_RECORDER_CONFIRM_MUTATIONS',
+ 'This journey creates, edits, and deletes a local LLM allowlist model.'
+ )
+ assertAllowedTarget('CONTROL_UI_URL', CONTROL_UI_URL)
+ assertAllowedTarget('CONTROL_API_URL', CONTROL_API_URL)
+
+ const credentials = adminCredentials()
+ const modelName = uniqueE2EName('qa-recorder-model')
+ const displayName = 'QA Recorder Model'
+
+ try {
+ await loginThroughUi(page, credentials)
+
+ await page.goto(`${CONTROL_UI_URL}/llm-models/new`)
+ await expect(
+ page.getByRole('heading', { name: 'Add allowed model', exact: true })
+ ).toBeVisible({
+ timeout: 20_000,
+ })
+ await expect(
+ page.getByText('Allow a provider/model so agents and runtime can select it.', {
+ exact: true,
+ })
+ ).toBeVisible()
+
+ await page.getByLabel('Provider').selectOption(PROVIDER)
+ await page.getByPlaceholder('claude-haiku-4-5').fill(modelName)
+ await page.getByLabel('Display name', { exact: true }).fill(displayName)
+ await page.getByRole('button', { name: 'Add model', exact: true }).click()
+
+ await expect(
+ page.getByText(`${PROVIDER}/${modelName} added to the allowlist.`, { exact: true })
+ ).toBeVisible()
+ await expect(page).toHaveURL(/\/llm-models$/, { timeout: 20_000 })
+
+ // The list shows a static Enabled/Disabled badge (no inline toggle), so the
+ // disable step goes through the edit page. The pencil's name is provider/model.
+ const editButton = page.getByRole('button', {
+ name: `Edit model ${PROVIDER}/${modelName}`,
+ exact: true,
+ })
+ await expect(editButton).toBeVisible({ timeout: 20_000 })
+ await editButton.click()
+ await expect(page).toHaveURL(/\/llm-models\/.+\/edit$/, { timeout: 20_000 })
+ await expect(
+ page.getByRole('heading', { name: 'Edit allowed model', exact: true })
+ ).toBeVisible({ timeout: 20_000 })
+
+ const enabledCheckbox = page.getByRole('checkbox', { name: 'Enabled' })
+ await expect(enabledCheckbox).toBeVisible({ timeout: 20_000 })
+ await expect(enabledCheckbox).toBeChecked()
+ await enabledCheckbox.uncheck()
+ await page.getByRole('button', { name: 'Save model', exact: true }).click()
+
+ await expect(
+ page.getByText(`${PROVIDER}/${modelName} updated.`, { exact: true })
+ ).toBeVisible()
+ await expect(page).toHaveURL(/\/llm-models$/, { timeout: 20_000 })
+
+ const row = page.getByRole('row').filter({ hasText: modelName })
+ await expect(row).toBeVisible({ timeout: 20_000 })
+ await expect(row).toContainText('Disabled')
+
+ // Remove from the allowlist via the row's delete action + confirm dialog.
+ const deleteButton = page.getByRole('button', {
+ name: `Delete model ${PROVIDER}/${modelName}`,
+ exact: true,
+ })
+ await deleteButton.click()
+
+ const confirmDialog = page.getByRole('alertdialog')
+ await expect(confirmDialog).toBeVisible()
+ await expect(confirmDialog).toContainText(
+ `Remove ${PROVIDER_DISPLAY_LABEL}/${modelName} from the allowlist?`
+ )
+ await expect(confirmDialog).toContainText(
+ 'Existing agents keep running, but this model can no longer be selected.'
+ )
+ await confirmDialog.getByRole('button', { name: 'Delete', exact: true }).click()
+
+ await expect(page.getByText(modelName, { exact: true })).toHaveCount(0, { timeout: 20_000 })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-llm-model-lifecycle')
+ } finally {
+ // Best-effort API cleanup if a matching model still exists (UI removal is
+ // the primary path; this covers a mid-journey failure).
+ try {
+ const { data } = await api<{ rows?: LlmModelRow[] }>(
+ page.request,
+ 'GET',
+ '/api/v1/admin/llm-models'
+ )
+ const leftover = (data.rows ?? []).find(
+ row => row.provider === PROVIDER && row.model === modelName
+ )
+ if (leftover?.id) {
+ await api(page.request, 'DELETE', `/api/v1/admin/llm-models/${leftover.id}`)
+ }
+ } catch {
+ // Best-effort: ignore cleanup failures.
+ }
+ }
+ })
+})
diff --git a/control-ui/e2e/qa-recorder-llm-price.spec.ts b/control-ui/e2e/qa-recorder-llm-price.spec.ts
new file mode 100644
index 000000000..96a75b358
--- /dev/null
+++ b/control-ui/e2e/qa-recorder-llm-price.spec.ts
@@ -0,0 +1,105 @@
+// control-ui/e2e/qa-recorder-llm-price.spec.ts
+//
+// Optional headful QA recorder journey for the Control UI "Cost & Usage" ->
+// LLM prices add/edit/delete flow. MUTATING: it creates an LLM price, edits
+// its output price, deletes it from the list, then best-effort deletes the
+// price through the Control API in finally. Requires QA_RECORDER_CONFIRM_MUTATIONS=1.
+import { type APIRequestContext, expect, test } from '@playwright/test'
+import {
+ CONTROL_API_URL,
+ CONTROL_UI_URL,
+ adminCredentials,
+ api,
+ assertAllowedTarget,
+ loginThroughUi,
+ requireRecorderConfirm,
+ screenshotAndLog,
+ uniqueE2EName,
+} from './qa-recorder-helpers'
+
+type PriceRow = { id: string; model: string }
+
+async function findPriceId(request: APIRequestContext, model: string): Promise<string | undefined> {
+ const { status, data } = await api<{ rows?: PriceRow[] }>(
+ request,
+ 'GET',
+ '/api/v1/admin/llm-prices'
+ )
+ if (status !== 200) return undefined
+ return (data.rows ?? []).find(row => row.model === model)?.id
+}
+
+async function waitForPriceId(request: APIRequestContext, model: string): Promise<string> {
+ for (let attempt = 0; attempt < 20; attempt += 1) {
+ const id = await findPriceId(request, model)
+ if (id) return id
+ await new Promise(resolve => setTimeout(resolve, 500))
+ }
+ throw new Error(`Created LLM price for "${model}" did not appear through Control API.`)
+}
+
+test.describe('optional QA recorder: Control UI LLM price', () => {
+ test('LLM price — add → edit → delete', async ({ page }, testInfo) => {
+ requireRecorderConfirm(
+ 'QA_RECORDER_CONFIRM_MUTATIONS',
+ 'This journey creates, edits, and deletes an LLM price.'
+ )
+ assertAllowedTarget('CONTROL_UI_URL', CONTROL_UI_URL)
+ assertAllowedTarget('CONTROL_API_URL', CONTROL_API_URL)
+
+ const credentials = adminCredentials()
+ const model = uniqueE2EName('qa-recorder-model')
+ let priceId = ''
+
+ try {
+ await loginThroughUi(page, credentials)
+
+ await page.goto(`${CONTROL_UI_URL}/cost-and-usage/llm-prices/new`)
+ await expect(page.getByRole('heading', { name: 'Add LLM price', exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+
+ // Provider is left at its default (any provider); only the model name and
+ // per-1M-token prices are filled.
+ await page.locator('#llm-price-model').fill(model)
+ await page.locator('#llm-price-input_token_price').fill('1')
+ await page.locator('#llm-price-output_token_price').fill('2')
+ await page.locator('#llm-price-cache_read_token_price').fill('0.5')
+ await page.locator('#llm-price-cache_write_token_price').fill('1.5')
+ await page.locator('#llm-price-currency').fill('USD')
+ await page.locator('.cu-px-form').getByLabel('Enabled').check()
+
+ await page.getByRole('button', { name: 'Add price', exact: true }).click()
+ await expect(page).toHaveURL(/\/cost-and-usage\/llm-prices$/, { timeout: 20_000 })
+
+ priceId = await waitForPriceId(page.request, model)
+ expect(priceId).toBeTruthy()
+
+ await page.goto(
+ `${CONTROL_UI_URL}/cost-and-usage/llm-prices/${encodeURIComponent(priceId)}/edit`
+ )
+ await expect(page.locator('#llm-price-model')).toHaveValue(model, { timeout: 20_000 })
+ await page.locator('#llm-price-output_token_price').fill('3')
+ await page.getByRole('button', { name: 'Save price', exact: true }).click()
+ await expect(page).toHaveURL(/\/cost-and-usage\/llm-prices$/, { timeout: 20_000 })
+
+ // Delete from the list: scope to this price's row so the edit/delete icon
+ // buttons are unambiguous, then drive the danger confirm dialog.
+ const row = page.locator('table.cu-table tr', { hasText: model }).first()
+ await row.getByRole('button', { name: /Delete price/ }).click()
+ const confirmDialog = page.getByRole('alertdialog', { name: 'Delete price' })
+ await expect(confirmDialog).toBeVisible({ timeout: 20_000 })
+ await confirmDialog.getByRole('button', { name: 'Delete', exact: true }).click()
+ await expect(page.locator('table.cu-table tr', { hasText: model })).toHaveCount(0, {
+ timeout: 20_000,
+ })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-llm-price')
+ } finally {
+ const id = priceId || (await findPriceId(page.request, model))
+ if (id) {
+ await api(page.request, 'DELETE', `/api/v1/admin/llm-prices/${encodeURIComponent(id)}`)
+ }
+ }
+ })
+})
diff --git a/control-ui/e2e/qa-recorder-marketplace-api-keys.spec.ts b/control-ui/e2e/qa-recorder-marketplace-api-keys.spec.ts
new file mode 100644
index 000000000..40696aa53
--- /dev/null
+++ b/control-ui/e2e/qa-recorder-marketplace-api-keys.spec.ts
@@ -0,0 +1,117 @@
+// control-ui/e2e/qa-recorder-marketplace-api-keys.spec.ts
+//
+// Optional headful QA recorder journey for the Control UI Marketplace ->
+// registry API keys panel. MUTATING: it creates a publish-scoped API key,
+// drives the one-time reveal modal, then revokes the key from the table and
+// best-effort revokes it through the Control API in finally. Requires
+// QA_RECORDER_CONFIRM_MUTATIONS=1.
+import { type APIRequestContext, expect, test } from '@playwright/test'
+import {
+ CONTROL_API_URL,
+ CONTROL_UI_URL,
+ adminCredentials,
+ api,
+ assertAllowedTarget,
+ loginThroughUi,
+ requireRecorderConfirm,
+ screenshotAndLog,
+} from './qa-recorder-helpers'
+
+type RegistryKeyRow = { id: string; description: string | null }
+
+async function findKeyId(
+ request: APIRequestContext,
+ description: string
+): Promise<string | undefined> {
+ const { status, data } = await api<{ keys?: RegistryKeyRow[] }>(
+ request,
+ 'GET',
+ '/api/v1/admin/registry/keys'
+ )
+ if (status !== 200) return undefined
+ return (data.keys ?? []).find(key => key.description === description)?.id
+}
+
+async function waitForKeyId(request: APIRequestContext, description: string): Promise<string> {
+ for (let attempt = 0; attempt < 20; attempt += 1) {
+ const id = await findKeyId(request, description)
+ if (id) return id
+ await new Promise(resolve => setTimeout(resolve, 500))
+ }
+ throw new Error(`Created API key "${description}" did not appear through Control API.`)
+}
+
+test.describe('optional QA recorder: Control UI marketplace API keys', () => {
+ test('Marketplace API key — create, reveal, revoke', async ({ page }, testInfo) => {
+ requireRecorderConfirm(
+ 'QA_RECORDER_CONFIRM_MUTATIONS',
+ 'This journey creates and revokes a marketplace API key.'
+ )
+ assertAllowedTarget('CONTROL_UI_URL', CONTROL_UI_URL)
+ assertAllowedTarget('CONTROL_API_URL', CONTROL_API_URL)
+
+ const credentials = adminCredentials()
+ const description = 'qa-recorder CI publisher'
+ let keyId = ''
+
+ try {
+ await loginThroughUi(page, credentials)
+
+ await page.goto(`${CONTROL_UI_URL}/marketplace/keys`)
+ // The "+ Create key" CTA only renders once the panel reaches its ready
+ // state, so it doubles as the shell + readiness assertion.
+ await expect(page.getByRole('button', { name: '+ Create key', exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+
+ await page.getByRole('button', { name: '+ Create key', exact: true }).click()
+ await expect(page.getByRole('heading', { name: 'Create API key', exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+
+ await page.locator('#key-desc').fill(description)
+ // Default scopes are read + publish + update; narrow to publish only.
+ await page.getByLabel('registry:read').uncheck()
+ await page.getByLabel('registry:update').uncheck()
+ await expect(page.getByLabel('registry:publish')).toBeChecked()
+ await page.getByRole('button', { name: '90 days', exact: true }).click()
+ await expect(page.locator('#key-expiry')).toHaveValue('90')
+
+ await page.getByRole('button', { name: 'Create key', exact: true }).click()
+
+ // One-time reveal modal: the secret is shown once, then dismissed.
+ await expect(page.getByRole('heading', { name: 'API key created', exact: true })).toBeVisible(
+ {
+ timeout: 20_000,
+ }
+ )
+ await page.getByRole('button', { name: /I.+ve saved it/ }).click()
+ await expect(page.getByRole('heading', { name: 'API key created', exact: true })).toBeHidden()
+
+ keyId = await waitForKeyId(page.request, description)
+ expect(keyId).toBeTruthy()
+
+ // The new key row surfaces its description in the table.
+ await expect(page.getByText(description)).toBeVisible({ timeout: 20_000 })
+
+ // Revoke from the row, confirming via the danger dialog.
+ const row = page.locator('table.cu-table tr', { hasText: description })
+ await row.getByRole('button', { name: 'Revoke', exact: true }).click()
+ const confirmDialog = page.getByRole('alertdialog', { name: 'Revoke API key' })
+ await expect(confirmDialog).toBeVisible({ timeout: 20_000 })
+ await confirmDialog.getByRole('button', { name: 'Revoke', exact: true }).click()
+ await expect(page.getByText(description)).toBeHidden({ timeout: 20_000 })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-marketplace-api-keys')
+ } finally {
+ const id = keyId || (await findKeyId(page.request, description))
+ if (id) {
+ try {
+ await api(page.request, 'DELETE', `/api/v1/admin/registry/keys/${encodeURIComponent(id)}`)
+ } catch {
+ // Best-effort: the key may already be revoked (404) or gone.
+ }
+ }
+ }
+ })
+})
diff --git a/control-ui/e2e/qa-recorder-marketplace-browse.spec.ts b/control-ui/e2e/qa-recorder-marketplace-browse.spec.ts
new file mode 100644
index 000000000..bdf149bc9
--- /dev/null
+++ b/control-ui/e2e/qa-recorder-marketplace-browse.spec.ts
@@ -0,0 +1,126 @@
+// control-ui/e2e/qa-recorder-marketplace-browse.spec.ts
+//
+// Read-only Marketplace catalog browse journey: opens the connectors catalog,
+// exercises search + category filter, switches to the Plugins tab, then probes
+// the registry through the Control API and — when entries exist — opens the
+// first entry detail and asserts its header, version, Install action, and
+// kebab menu. Nothing is installed or mutated; no confirm flag or cleanup.
+import { expect, test } from '@playwright/test'
+import {
+ CONTROL_API_URL,
+ CONTROL_UI_URL,
+ adminCredentials,
+ api,
+ assertAllowedTarget,
+ loginThroughUi,
+ screenshotAndLog,
+} from './qa-recorder-helpers'
+
+type RegistryEntrySummary = {
+ name: string
+ version: string
+ status?: string
+}
+
+type RegistryEntryListResponse = { data?: RegistryEntrySummary[] }
+
+test.describe('optional QA recorder: Control UI marketplace browse', () => {
+ test('Marketplace catalog browse, search, filter, plugins tab, and first entry detail', async ({
+ page,
+ }, testInfo) => {
+ assertAllowedTarget('CONTROL_UI_URL', CONTROL_UI_URL)
+ assertAllowedTarget('CONTROL_API_URL', CONTROL_API_URL)
+
+ await loginThroughUi(page, adminCredentials())
+
+ await page.getByRole('link', { name: 'Marketplace', exact: true }).click()
+ await expect(page).toHaveURL(/\/marketplace\/connectors$/)
+
+ // Catalog shell: the TablePanelHeader subtitle and the entry-type tablist
+ // render regardless of catalog size or empty/loading/error state.
+ await expect(
+ page.getByText('Discover and install connectors and plugins from the Marketplace.', {
+ exact: true,
+ })
+ ).toBeVisible({ timeout: 20_000 })
+ const entryTabs = page.getByRole('tablist', { name: 'Marketplace entry types' })
+ await expect(entryTabs.getByRole('tab', { name: 'Connectors', exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+ await expect(entryTabs.getByRole('tab', { name: 'Plugins', exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+
+ // Search: a query that matches nothing drives the result set to the empty
+ // state (the catalog also shows it when entirely empty, so this is resilient
+ // to stripped environments). Wait for initial load to release the input.
+ const connectorsSearch = page.getByLabel('Search Marketplace connectors', { exact: true })
+ await expect(connectorsSearch).toBeEnabled({ timeout: 20_000 })
+ await connectorsSearch.fill('zzzz-no-such-entry')
+ await expect(page.getByText('No entries match your filters.', { exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+ await connectorsSearch.clear()
+
+ // Category filter is part of the shell toolbar.
+ await expect(page.getByLabel('Filter by category', { exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+
+ // Switch to the Plugins tab; the search input re-binds to plugins.
+ await entryTabs.getByRole('tab', { name: 'Plugins', exact: true }).click()
+ await expect(page).toHaveURL(/\/marketplace\/plugins$/)
+ await expect(page.getByLabel('Search Marketplace plugins', { exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+
+ // Probe the registry through the Control UI proxy (admin session cookie) so
+ // the detail step only runs when a real entry exists. Mirrors the contexts
+ // detail skip pattern.
+ const { status, data } = await api<RegistryEntryListResponse>(
+ page.request,
+ 'GET',
+ '/api/v1/admin/registry/entries'
+ )
+ const entries = status === 200 ? (data.data ?? []) : []
+ test.skip(
+ entries.length === 0,
+ 'No Marketplace entries in this environment; skipping entry detail journey.'
+ )
+
+ // Prefer a published entry so the Install action is present; fall back to
+ // the first entry otherwise (header + kebab still render).
+ const published = entries.filter(entry => entry.status === 'published')
+ const target = published.length > 0 ? published[0] : entries[0]
+ const detailPath = `/marketplace/entries/${encodeURIComponent(target.name)}/${encodeURIComponent(
+ target.version
+ )}`
+ await page.goto(detailPath)
+ await expect(page).toHaveURL(new RegExp(`/marketplace/entries/.+/.+`), { timeout: 20_000 })
+
+ // Detail header (CreatePageHeader): the h2 title is the entry name and the
+ // subtitle starts with "v<version> ·".
+ await expect(page.getByRole('heading', { name: target.name, exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+ const versionPattern = new RegExp(`v${target.version.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')} `)
+ await expect(page.getByText(versionPattern).first()).toBeVisible({ timeout: 20_000 })
+
+ // Install action: "Install" when not installed, "Installed" (disabled) when
+ // already installed. Only asserted for published entries, which render it.
+ if (published.length > 0) {
+ await expect(
+ page
+ .getByRole('button', { name: 'Install', exact: true })
+ .or(page.getByRole('button', { name: 'Installed', exact: true }))
+ ).toBeVisible({ timeout: 20_000 })
+ }
+
+ // Kebab actions menu is always present on a loaded entry detail.
+ await expect(
+ page.getByRole('button', { name: 'Marketplace entry actions', exact: true })
+ ).toBeVisible({ timeout: 20_000 })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-marketplace-browse')
+ })
+})
diff --git a/control-ui/e2e/qa-recorder-member-invite.spec.ts b/control-ui/e2e/qa-recorder-member-invite.spec.ts
new file mode 100644
index 000000000..c7084cbbb
--- /dev/null
+++ b/control-ui/e2e/qa-recorder-member-invite.spec.ts
@@ -0,0 +1,98 @@
+// control-ui/e2e/qa-recorder-member-invite.spec.ts
+//
+// Optional QA recorder journey (MUTATING, sends email). Requires
+// QA_RECORDER_CONFIRM_MUTATIONS=1. Invites a member through the Control UI and
+// cancels the pending invitation via the Control API. The invitation email is
+// actually sent to the supplied address, so use a disposable mailbox.
+import { expect, test } from '@playwright/test'
+import {
+ CONTROL_API_URL,
+ CONTROL_UI_URL,
+ adminCredentials,
+ api,
+ assertAllowedTarget,
+ loginThroughUi,
+ requireRecorderConfirm,
+ screenshotAndLog,
+ uniqueE2EName,
+} from './qa-recorder-helpers'
+
+type PendingInvitation = { id: string; email: string }
+
+test.describe('optional QA recorder: Control UI member invitation', () => {
+ test('records the create-member invitation flow', async ({ page }, testInfo) => {
+ requireRecorderConfirm(
+ 'QA_RECORDER_CONFIRM_MUTATIONS',
+ 'This journey sends a member invitation email and cancels the invitation.'
+ )
+ assertAllowedTarget('CONTROL_UI_URL', CONTROL_UI_URL)
+ assertAllowedTarget('CONTROL_API_URL', CONTROL_API_URL)
+
+ const credentials = adminCredentials()
+ const email = `${uniqueE2EName('qa-recorder-member')}@example.test`
+
+ try {
+ await loginThroughUi(page, credentials)
+
+ await page.getByRole('link', { name: 'Users & Teams', exact: true }).click()
+ await expect(page).toHaveURL(/\/users-and-teams\/users$/, { timeout: 20_000 })
+
+ const createMember = page.getByRole('button', { name: 'Create member', exact: true })
+ await expect(createMember).toBeEnabled()
+ await createMember.click()
+ await expect(page).toHaveURL(/\/users-and-teams\/users\/new$/, { timeout: 20_000 })
+ await expect(page.getByRole('heading', { name: 'Create member', exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+ await expect(
+ page.getByText('Create a pending invitation and send the invitation email.', {
+ exact: true,
+ })
+ ).toBeVisible()
+
+ await page.getByPlaceholder('Full name').fill('QA Recorder')
+ await page.getByPlaceholder('[email protected]').fill(email)
+
+ const continueButton = page.getByRole('button', { name: 'Continue', exact: true })
+ await expect(continueButton).toBeEnabled()
+ await continueButton.click()
+ await expect(
+ page.getByText('Place the invited member on a team now, or leave them unassigned.', {
+ exact: true,
+ })
+ ).toBeVisible({ timeout: 20_000 })
+
+ const sendInvite = page.getByRole('button', { name: 'Send invite', exact: true })
+ await expect(sendInvite).toBeEnabled()
+ await sendInvite.click()
+ await expect(page.getByText(`Invitation sent to ${email}.`, { exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+ await expect(page).toHaveURL(/\/users-and-teams\/users$/, { timeout: 20_000 })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-member-invite')
+ } finally {
+ try {
+ const request = page.request
+ const { status, data } = await api<{ items?: PendingInvitation[] }>(
+ request,
+ 'GET',
+ '/api/v1/admin/pending-invitations'
+ )
+ if (status === 200) {
+ const invitationId =
+ (data.items || []).find(invitation => invitation.email === email)?.id || ''
+ if (invitationId) {
+ await api(
+ request,
+ 'DELETE',
+ `/api/v1/admin/invitations/${encodeURIComponent(invitationId)}`
+ )
+ }
+ }
+ } catch {
+ // Best-effort cleanup; the disposable environment tolerates leftover invitations.
+ }
+ }
+ })
+})
diff --git a/control-ui/e2e/qa-recorder-onboarding-combo.spec.ts b/control-ui/e2e/qa-recorder-onboarding-combo.spec.ts
new file mode 100644
index 000000000..8116cd63f
--- /dev/null
+++ b/control-ui/e2e/qa-recorder-onboarding-combo.spec.ts
@@ -0,0 +1,189 @@
+// control-ui/e2e/qa-recorder-onboarding-combo.spec.ts
+//
+// Mutating QA recorder combo: new-team onboarding (team → member invite →
+// context → grant context to team). Creates and tears down every resource.
+// Requires QA_RECORDER_CONFIRM_MUTATIONS=1 in .env.qa-recorder.
+import { expect, test } from '@playwright/test'
+import {
+ CONTROL_API_URL,
+ CONTROL_UI_URL,
+ adminCredentials,
+ api,
+ assertAllowedTarget,
+ loginThroughUi,
+ requireRecorderConfirm,
+ screenshotAndLog,
+ uniqueE2EName,
+} from './qa-recorder-helpers'
+
+type IdItem = { id?: string; name?: string; email?: string }
+
+async function findTeamIdByName(
+ request: import('@playwright/test').APIRequestContext,
+ name: string
+): Promise<string> {
+ for (let attempt = 0; attempt < 20; attempt += 1) {
+ const { status, data } = await api<{ items?: IdItem[] }>(request, 'GET', '/api/v1/admin/teams')
+ if (status === 200) {
+ const found = (data.items ?? []).find(item => item.name === name)
+ if (found?.id) return found.id
+ }
+ await new Promise(resolve => setTimeout(resolve, 500))
+ }
+ throw new Error(`Created team "${name}" did not become visible through Control API.`)
+}
+
+test.describe('optional QA recorder: Control UI onboarding combo', () => {
+ test('records the new-team onboarding combo (team, member, context grant)', async ({
+ page,
+ }, testInfo) => {
+ requireRecorderConfirm(
+ 'QA_RECORDER_CONFIRM_MUTATIONS',
+ 'This journey creates and deletes a team, a member invitation, and a context.'
+ )
+ assertAllowedTarget('CONTROL_UI_URL', CONTROL_UI_URL)
+ assertAllowedTarget('CONTROL_API_URL', CONTROL_API_URL)
+
+ const credentials = adminCredentials()
+ const teamName = uniqueE2EName('qa-recorder-team')
+ const memberName = 'QA Recorder Member'
+ const memberEmail = `${uniqueE2EName('qa-recorder-member')}@example.test`
+ const contextName = uniqueE2EName('qa-recorder-ctx')
+ let teamId = ''
+
+ try {
+ await loginThroughUi(page, credentials)
+
+ // step 1: create the team shell (name only).
+ await page.getByRole('link', { name: 'Users & Teams', exact: true }).click()
+ await expect(page).toHaveURL(/\/users-and-teams\/users$/, { timeout: 20_000 })
+ const teamsListTab = page.getByRole('tab', { name: 'Teams', exact: true })
+ await expect(teamsListTab).toBeEnabled({ timeout: 20_000 })
+ await teamsListTab.click()
+ await expect(page).toHaveURL(/\/users-and-teams\/teams$/, { timeout: 20_000 })
+ await page.getByRole('button', { name: 'Create team', exact: true }).click()
+ await expect(page).toHaveURL(/\/users-and-teams\/teams\/new$/, { timeout: 20_000 })
+ await page.getByLabel('Team name').fill(teamName)
+ await page.getByRole('button', { name: 'Continue', exact: true }).click()
+ await page.getByRole('button', { name: 'Skip', exact: true }).click()
+ await page.getByRole('button', { name: 'Skip', exact: true }).click()
+ await page.getByRole('button', { name: 'Create team', exact: true }).click()
+ await expect(page).toHaveURL(/\/users-and-teams\/teams$/, { timeout: 20_000 })
+ teamId = await findTeamIdByName(page.request, teamName)
+
+ // step 2: invite a member and assign them to the team (role + permission
+ // checkboxes live on the create-member wizard's Team step).
+ await page.goto(`${CONTROL_UI_URL}/users-and-teams/users/new`)
+ await expect(page).toHaveURL(/\/users-and-teams\/users\/new$/, { timeout: 20_000 })
+ await page.locator('#new-user-name').fill(memberName)
+ await page.locator('#new-user-email').fill(memberEmail)
+ await page.getByRole('button', { name: 'Continue', exact: true }).click()
+ await expect(page.locator('#new-user-teams')).toBeVisible({ timeout: 20_000 })
+ await page.locator('#new-user-teams').click()
+ await page.getByPlaceholder('Search teams...').fill(teamName)
+ const teamOption = page.getByRole('option', { name: teamName, exact: true })
+ await expect(teamOption).toBeVisible({ timeout: 15_000 })
+ await teamOption.click()
+ await page.getByRole('button', { name: 'Send invite', exact: true }).click()
+ await expect(page).toHaveURL(/\/users-and-teams\/users$/, { timeout: 20_000 })
+
+ // step 3: verify the pending invitation landed on the team Members tab.
+ await page.goto(
+ `${CONTROL_UI_URL}/users-and-teams/teams/${encodeURIComponent(teamId)}/members`
+ )
+ await expect(page).toHaveURL(/\/users-and-teams\/teams\/.+\/members$/, {
+ timeout: 20_000,
+ })
+ await expect(
+ page.getByText('Members, contexts, and agent access.', { exact: true })
+ ).toBeVisible({ timeout: 20_000 })
+ await expect(page.getByText(memberEmail, { exact: true })).toBeVisible({ timeout: 15_000 })
+
+ // step 4: create a context (name only).
+ await page.goto(`${CONTROL_UI_URL}/contexts/new`)
+ await expect(page).toHaveURL(/\/contexts\/new$/, { timeout: 20_000 })
+ await page.getByLabel('Context name').fill(contextName)
+ await page.getByRole('button', { name: 'Continue', exact: true }).click()
+ await page.getByRole('button', { name: 'Create context', exact: true }).click()
+ await expect(page).toHaveURL(new RegExp(`/contexts/${contextName}$`), { timeout: 20_000 })
+
+ // step 5: grant the context to the team from the team Contexts tab.
+ await page.goto(
+ `${CONTROL_UI_URL}/users-and-teams/teams/${encodeURIComponent(teamId)}/contexts`
+ )
+ await expect(page).toHaveURL(/\/users-and-teams\/teams\/.+\/contexts$/, {
+ timeout: 20_000,
+ })
+ await expect(
+ page.getByText('Members, contexts, and agent access.', { exact: true })
+ ).toBeVisible({ timeout: 20_000 })
+ await page.getByRole('button', { name: 'Add context', exact: true }).click()
+ await expect(page.locator('#team-context-picker')).toBeVisible({ timeout: 5_000 })
+ await page.locator('#team-context-picker').fill(contextName)
+ const contextOption = page.getByRole('option', { name: contextName, exact: true })
+ await expect(contextOption).toBeVisible({ timeout: 10_000 })
+ await contextOption.click()
+ await page
+ .getByRole('dialog')
+ .getByRole('button', { name: 'Add context', exact: true })
+ .click()
+ await expect(page.getByRole('button', { name: contextName, exact: true })).toBeVisible({
+ timeout: 15_000,
+ })
+
+ // step 6: best-effort — if the invitation created a reachable user
+ // record, confirm the team shows on the user-detail Teams tab.
+ try {
+ const { data } = await api<{ items?: IdItem[] }>(
+ page.request,
+ 'GET',
+ `/api/v1/admin/users?q=${encodeURIComponent(memberEmail)}`
+ )
+ const user = (data.items ?? []).find(item => item.email === memberEmail)
+ if (user?.id) {
+ await page.goto(
+ `${CONTROL_UI_URL}/users-and-teams/users/${encodeURIComponent(user.id)}/teams`
+ )
+ await expect(page.getByText(teamName, { exact: true })).toBeVisible({ timeout: 10_000 })
+ }
+ } catch {
+ // Pending invitation has no user record yet — skip gracefully.
+ }
+
+ await screenshotAndLog(page, testInfo, 'control-ui-onboarding-combo')
+ } finally {
+ const request = page.request
+ // Reverse-order cleanup; each step is best-effort so one failure
+ // does not block the rest.
+ try {
+ await api(request, 'DELETE', `/api/v1/admin/contexts/${encodeURIComponent(contextName)}`)
+ } catch {
+ // best-effort
+ }
+ try {
+ const { data } = await api<{ items?: IdItem[] }>(
+ request,
+ 'GET',
+ '/api/v1/admin/pending-invitations'
+ )
+ const invitation = (data.items ?? []).find(item => item.email === memberEmail)
+ if (invitation?.id) {
+ await api(
+ request,
+ 'DELETE',
+ `/api/v1/admin/invitations/${encodeURIComponent(invitation.id)}`
+ )
+ }
+ } catch {
+ // best-effort
+ }
+ if (teamId) {
+ try {
+ await api(request, 'DELETE', `/api/v1/admin/teams/${encodeURIComponent(teamId)}`)
+ } catch {
+ // best-effort
+ }
+ }
+ }
+ })
+})
diff --git a/control-ui/e2e/qa-recorder-secret-connector.spec.ts b/control-ui/e2e/qa-recorder-secret-connector.spec.ts
new file mode 100644
index 000000000..d892dd1ff
--- /dev/null
+++ b/control-ui/e2e/qa-recorder-secret-connector.spec.ts
@@ -0,0 +1,87 @@
+// control-ui/e2e/qa-recorder-secret-connector.spec.ts
+//
+// Optional QA recorder journey (MUTATING): records creation of a connector
+// (MCP) secret with dummy values and verifies the connector secrets shell. Run
+// with QA_RECORDER_CONFIRM_MUTATIONS=1.
+//
+// Note: the /secrets/connector list is derived from McpServer resources and the
+// UI exposes no inline delete for connector scope, so this journey records
+// creation + the connector shell; the secret is removed via the Control API in
+// `finally` (DELETE /api/v1/admin/mcp-secrets/<name>).
+import { expect, test } from '@playwright/test'
+import {
+ CONTROL_API_URL,
+ CONTROL_UI_URL,
+ adminCredentials,
+ api,
+ assertAllowedTarget,
+ loginThroughUi,
+ requireRecorderConfirm,
+ screenshotAndLog,
+ uniqueE2EName,
+} from './qa-recorder-helpers'
+
+test.describe('optional QA recorder: Control UI connector secret lifecycle', () => {
+ test('records create → connector shell for a connector (MCP) secret', async ({
+ page,
+ }, testInfo) => {
+ requireRecorderConfirm(
+ 'QA_RECORDER_CONFIRM_MUTATIONS',
+ 'This journey creates and deletes a local connector (MCP) secret.'
+ )
+ assertAllowedTarget('CONTROL_UI_URL', CONTROL_UI_URL)
+ assertAllowedTarget('CONTROL_API_URL', CONTROL_API_URL)
+
+ const credentials = adminCredentials()
+ const secretName = uniqueE2EName('qa-recorder-connector-secret')
+
+ try {
+ await loginThroughUi(page, credentials)
+
+ await page.goto(`${CONTROL_UI_URL}/secrets/new?scope=mcp`)
+ await expect(
+ page.getByRole('heading', { name: 'Create connector secret', exact: true })
+ ).toBeVisible({ timeout: 20_000 })
+ await expect(
+ page.getByText('Create a Kubernetes secret for connector credential injection.', {
+ exact: true,
+ })
+ ).toBeVisible()
+
+ await page.getByPlaceholder('airtable-credentials').fill(secretName)
+ await page.getByRole('button', { name: 'Continue', exact: true }).click()
+
+ await expect(page.getByPlaceholder('API_KEY')).toBeVisible({ timeout: 20_000 })
+ await page.getByRole('button', { name: 'Add key', exact: true }).click()
+ await page.getByPlaceholder('API_KEY').last().fill('API_KEY')
+ await page.getByPlaceholder('secret value').last().fill('qa-recorder-dummy')
+ await page.getByRole('button', { name: 'Create secret', exact: true }).click()
+
+ await expect(page.getByText(`Secret ${secretName} created.`, { exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+
+ // The connector list is McpServer-derived; a standalone secret is not listed
+ // and connector scope has no delete action in the UI. Record the connector
+ // shell and clean up through the Control API below.
+ await page.goto(`${CONTROL_UI_URL}/secrets/connector`)
+ await expect(
+ page.getByText('Manage LLM, connector, and recipe credentials in one place.', {
+ exact: true,
+ })
+ ).toBeVisible({ timeout: 20_000 })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-secret-connector')
+ } finally {
+ try {
+ await api(
+ page.request,
+ 'DELETE',
+ `/api/v1/admin/mcp-secrets/${encodeURIComponent(secretName)}`
+ )
+ } catch {
+ // Best-effort: ignore cleanup failures.
+ }
+ }
+ })
+})
diff --git a/control-ui/e2e/qa-recorder-secret-recipe.spec.ts b/control-ui/e2e/qa-recorder-secret-recipe.spec.ts
new file mode 100644
index 000000000..d2610364e
--- /dev/null
+++ b/control-ui/e2e/qa-recorder-secret-recipe.spec.ts
@@ -0,0 +1,95 @@
+// control-ui/e2e/qa-recorder-secret-recipe.spec.ts
+//
+// Optional QA recorder journey (MUTATING): records create → list → delete for a
+// shared recipe secret (dummy values) through the Control UI. Run with
+// QA_RECORDER_CONFIRM_MUTATIONS=1.
+import { expect, test } from '@playwright/test'
+import {
+ CONTROL_API_URL,
+ CONTROL_UI_URL,
+ adminCredentials,
+ api,
+ assertAllowedTarget,
+ loginThroughUi,
+ requireRecorderConfirm,
+ screenshotAndLog,
+ uniqueE2EName,
+} from './qa-recorder-helpers'
+
+const RECIPE_NAMESPACE = 'sandbox-recipes'
+
+test.describe('optional QA recorder: Control UI recipe secret lifecycle', () => {
+ test('records create → list → delete for a shared recipe secret', async ({ page }, testInfo) => {
+ requireRecorderConfirm(
+ 'QA_RECORDER_CONFIRM_MUTATIONS',
+ 'This journey creates and deletes a local recipe secret.'
+ )
+ assertAllowedTarget('CONTROL_UI_URL', CONTROL_UI_URL)
+ assertAllowedTarget('CONTROL_API_URL', CONTROL_API_URL)
+
+ const credentials = adminCredentials()
+ const secretName = uniqueE2EName('qa-recorder-recipe-secret')
+
+ try {
+ await loginThroughUi(page, credentials)
+
+ await page.goto(`${CONTROL_UI_URL}/secrets/new?scope=recipe`)
+ await expect(
+ page.getByRole('heading', { name: 'Create recipe secret', exact: true })
+ ).toBeVisible({ timeout: 20_000 })
+ await expect(
+ page.getByText(
+ `Create a Kubernetes secret in ${RECIPE_NAMESPACE} for recipe credential injection.`,
+ { exact: true }
+ )
+ ).toBeVisible()
+
+ await page.getByPlaceholder('my-recipe-credentials').fill(secretName)
+ await page
+ .getByText('Shared across all recipes (e.g. one Anthropic key reused by many)', {
+ exact: true,
+ })
+ .click()
+ await page.getByRole('button', { name: 'Continue', exact: true }).click()
+
+ await expect(page.getByPlaceholder('API_KEY')).toBeVisible({ timeout: 20_000 })
+ await page.getByRole('button', { name: 'Add key', exact: true }).click()
+ await page.getByPlaceholder('API_KEY').last().fill('API_KEY')
+ await page.getByPlaceholder('secret value').last().fill('qa-recorder-dummy')
+ await page.getByRole('button', { name: 'Create secret', exact: true }).click()
+
+ await expect(page.getByText(`Secret ${secretName} created.`, { exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+
+ await page.goto(`${CONTROL_UI_URL}/secrets/recipe`)
+ const deleteButton = page.getByRole('button', {
+ name: `Delete recipe secret ${secretName}`,
+ exact: true,
+ })
+ await expect(deleteButton).toBeVisible({ timeout: 20_000 })
+
+ await deleteButton.click()
+ const confirmDialog = page.getByRole('alertdialog')
+ await expect(confirmDialog).toBeVisible()
+ await expect(confirmDialog).toContainText(
+ `Delete recipe secret ${secretName} from ${RECIPE_NAMESPACE}?`
+ )
+ await confirmDialog.getByRole('button', { name: 'Delete', exact: true }).click()
+
+ await expect(page.getByText(secretName, { exact: true })).toHaveCount(0, { timeout: 20_000 })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-secret-recipe')
+ } finally {
+ try {
+ await api(
+ page.request,
+ 'DELETE',
+ `/api/v1/admin/recipe-secrets/${encodeURIComponent(secretName)}?targetNamespace=${encodeURIComponent(RECIPE_NAMESPACE)}`
+ )
+ } catch {
+ // Best-effort: ignore cleanup failures.
+ }
+ }
+ })
+})
diff --git a/control-ui/e2e/qa-recorder-settings-account.spec.ts b/control-ui/e2e/qa-recorder-settings-account.spec.ts
new file mode 100644
index 000000000..65b87c1fa
--- /dev/null
+++ b/control-ui/e2e/qa-recorder-settings-account.spec.ts
@@ -0,0 +1,109 @@
+// control-ui/e2e/qa-recorder-settings-account.spec.ts
+//
+// MUTATING QA recorder journey. Opt-in only: set QA_RECORDER_CONFIRM_MUTATIONS=1
+// in .env.qa-recorder. Changes the logged-in admin's own username, flips the
+// theme, and (if present) resets local alert overrides. Every mutation is
+// reverted in finally so the account/theme/.env.qa-recorder stay valid across
+// repeated runs.
+import { expect, test } from '@playwright/test'
+import {
+ CONTROL_API_URL,
+ CONTROL_UI_URL,
+ adminCredentials,
+ assertAllowedTarget,
+ loginThroughUi,
+ requireRecorderConfirm,
+ screenshotAndLog,
+ uniqueE2EName,
+} from './qa-recorder-helpers'
+
+test.describe('optional QA recorder: Control UI settings account', () => {
+ test('records username edit, theme toggle, and reset alerts', async ({ page }, testInfo) => {
+ requireRecorderConfirm(
+ 'QA_RECORDER_CONFIRM_MUTATIONS',
+ 'This journey edits the admin username, flips the theme, and may reset local alert overrides.'
+ )
+ assertAllowedTarget('CONTROL_UI_URL', CONTROL_UI_URL)
+ assertAllowedTarget('CONTROL_API_URL', CONTROL_API_URL)
+
+ const credentials = adminCredentials()
+ const tempUsername = uniqueE2EName('qa-recorder')
+ let originalIsDark = true
+
+ try {
+ await loginThroughUi(page, credentials)
+ await page.goto(`${CONTROL_UI_URL}/settings`)
+ await expect(page.getByText('Manage your Control UI admin account and theme.')).toBeVisible({
+ timeout: 20_000,
+ })
+
+ const usernameRow = page
+ .locator('.cu-settings-section')
+ .filter({ hasText: 'Account info' })
+ .locator('.cu-settings-row')
+ .filter({ hasText: 'Username' })
+
+ await usernameRow.getByRole('button', { name: 'Edit', exact: true }).click()
+ await usernameRow.getByLabel('Username').fill(tempUsername)
+ await usernameRow.getByRole('button', { name: 'Save', exact: true }).click()
+ await expect(page.getByText('Username updated.', { exact: true })).toBeVisible()
+ await expect(usernameRow.getByText(tempUsername, { exact: true })).toBeVisible()
+
+ const themeGroup = page.getByRole('radiogroup', { name: 'Theme' })
+ const darkRadio = themeGroup.locator('#settings-theme-dark')
+ const lightRadio = themeGroup.locator('#settings-theme-light')
+ await expect(darkRadio).toBeVisible({ timeout: 20_000 })
+ originalIsDark = await darkRadio.isChecked()
+ const targetRadio = originalIsDark ? lightRadio : darkRadio
+ const targetValue = originalIsDark ? 'light' : 'dark'
+ await targetRadio.click()
+ await expect(themeGroup.locator(`#settings-theme-${targetValue}`)).toBeChecked()
+
+ const resetButton = page.getByRole('button', { name: 'Reset', exact: true })
+ if (
+ await resetButton
+ .first()
+ .isVisible()
+ .catch(() => false)
+ ) {
+ await resetButton.first().click()
+ const dialog = page.getByRole('alertdialog')
+ await expect(dialog.getByRole('heading', { name: 'Reset alerts?' })).toBeVisible()
+ await dialog.getByRole('button', { name: 'Reset alerts', exact: true }).click()
+ await expect(page.getByText('Alerts reset.', { exact: true })).toBeVisible()
+ } else {
+ await expect(page.getByText('Reset Alerts', { exact: true })).toHaveCount(0)
+ }
+
+ await screenshotAndLog(page, testInfo, 'control-ui-settings-account')
+ } finally {
+ const usernameRow = page.locator('.cu-settings-row').filter({ hasText: 'Username' })
+ await usernameRow
+ .getByRole('button', { name: 'Edit', exact: true })
+ .click()
+ .catch(() => undefined)
+ await usernameRow
+ .getByLabel('Username')
+ .fill(credentials.username)
+ .catch(() => undefined)
+ await usernameRow
+ .getByRole('button', { name: 'Save', exact: true })
+ .click()
+ .catch(() => undefined)
+
+ const currentIsDark = await page
+ .getByRole('radiogroup', { name: 'Theme' })
+ .locator('#settings-theme-dark')
+ .isChecked()
+ .catch(() => originalIsDark)
+ if (currentIsDark !== originalIsDark) {
+ const themeValue = originalIsDark ? 'dark' : 'light'
+ await page
+ .getByRole('radiogroup', { name: 'Theme' })
+ .locator(`#settings-theme-${themeValue}`)
+ .click()
+ .catch(() => undefined)
+ }
+ }
+ })
+})
diff --git a/control-ui/e2e/qa-recorder-settings-email.spec.ts b/control-ui/e2e/qa-recorder-settings-email.spec.ts
new file mode 100644
index 000000000..fb3358b2c
--- /dev/null
+++ b/control-ui/e2e/qa-recorder-settings-email.spec.ts
@@ -0,0 +1,77 @@
+// control-ui/e2e/qa-recorder-settings-email.spec.ts
+//
+// MUTATING QA recorder journey (also sends a real confirmation email). Opt-in
+// only: set QA_RECORDER_CONFIRM_MUTATIONS=1 in .env.qa-recorder. Changes the
+// logged-in admin's own email to a disposable address, clicks Resend
+// confirmation, then reverts the email BACK to the original captured address in
+// finally so .env.qa-recorder keeps working.
+import { expect, test } from '@playwright/test'
+import {
+ CONTROL_API_URL,
+ CONTROL_UI_URL,
+ adminCredentials,
+ assertAllowedTarget,
+ loginThroughUi,
+ requireRecorderConfirm,
+ screenshotAndLog,
+ uniqueE2EName,
+} from './qa-recorder-helpers'
+
+test.describe('optional QA recorder: Control UI settings email', () => {
+ test('records email change, resend confirmation, and revert', async ({ page }, testInfo) => {
+ requireRecorderConfirm(
+ 'QA_RECORDER_CONFIRM_MUTATIONS',
+ 'This journey changes the admin email and sends a confirmation email, then reverts it in finally.'
+ )
+ assertAllowedTarget('CONTROL_UI_URL', CONTROL_UI_URL)
+ assertAllowedTarget('CONTROL_API_URL', CONTROL_API_URL)
+
+ const credentials = adminCredentials()
+ const tempEmail = `${uniqueE2EName('qa-recorder')}@example.test`
+ let originalEmail = ''
+
+ try {
+ await loginThroughUi(page, credentials)
+ await page.goto(`${CONTROL_UI_URL}/settings`)
+ await expect(page.getByText('Manage your Control UI admin account and theme.')).toBeVisible({
+ timeout: 20_000,
+ })
+
+ const emailRow = page
+ .locator('.cu-settings-section')
+ .filter({ hasText: 'Account info' })
+ .locator('.cu-settings-row')
+ .filter({ hasText: 'Email' })
+
+ await expect(emailRow.getByText(/@/)).toBeVisible({ timeout: 20_000 })
+ originalEmail = (await emailRow.getByText(/@/).first().textContent()) ?? ''
+
+ await emailRow.getByRole('button', { name: 'Edit', exact: true }).click()
+ await emailRow.getByLabel('Email').fill(tempEmail)
+ await emailRow.getByRole('button', { name: 'Save', exact: true }).click()
+ await expect(
+ page.getByText(`Confirmation pending for ${tempEmail}.`, { exact: true })
+ ).toBeVisible()
+
+ await emailRow.getByRole('button', { name: 'Resend confirmation', exact: true }).click()
+ await expect(page.getByText('Confirmation email sent.', { exact: true })).toBeVisible()
+ await expect(page.locator('.cu-banner--error')).toHaveCount(0)
+
+ await screenshotAndLog(page, testInfo, 'control-ui-settings-email')
+ } finally {
+ const emailRow = page.locator('.cu-settings-row').filter({ hasText: 'Email' })
+ await emailRow
+ .getByRole('button', { name: 'Edit', exact: true })
+ .click()
+ .catch(() => undefined)
+ await emailRow
+ .getByLabel('Email')
+ .fill(originalEmail)
+ .catch(() => undefined)
+ await emailRow
+ .getByRole('button', { name: 'Save', exact: true })
+ .click()
+ .catch(() => undefined)
+ }
+ })
+})
diff --git a/control-ui/e2e/qa-recorder-settings-password.spec.ts b/control-ui/e2e/qa-recorder-settings-password.spec.ts
new file mode 100644
index 000000000..387cf8e17
--- /dev/null
+++ b/control-ui/e2e/qa-recorder-settings-password.spec.ts
@@ -0,0 +1,91 @@
+// control-ui/e2e/qa-recorder-settings-password.spec.ts
+//
+// MUTATING QA recorder journey. Opt-in only: set QA_RECORDER_CONFIRM_MUTATIONS=1
+// in .env.qa-recorder. Changes the logged-in admin's own password to a clearly
+// temporary value, re-logs-in with it, then reverts the password BACK to the
+// original from adminCredentials() in finally so .env.qa-recorder keeps working.
+import { expect, test } from '@playwright/test'
+import {
+ CONTROL_API_URL,
+ CONTROL_UI_URL,
+ adminCredentials,
+ assertAllowedTarget,
+ loginThroughUi,
+ requireRecorderConfirm,
+ screenshotAndLog,
+ uniqueE2EName,
+} from './qa-recorder-helpers'
+
+test.describe('optional QA recorder: Control UI settings password', () => {
+ test('records change password and revert to original', async ({ page }, testInfo) => {
+ requireRecorderConfirm(
+ 'QA_RECORDER_CONFIRM_MUTATIONS',
+ 'This journey changes the admin password to a temporary value, then reverts it in finally.'
+ )
+ assertAllowedTarget('CONTROL_UI_URL', CONTROL_UI_URL)
+ assertAllowedTarget('CONTROL_API_URL', CONTROL_API_URL)
+
+ const credentials = adminCredentials()
+ const tempPassword = `${uniqueE2EName('qa-recorder')}-temp!`
+
+ try {
+ await loginThroughUi(page, credentials)
+ await page.goto(`${CONTROL_UI_URL}/settings`)
+ await expect(page.getByText('Manage your Control UI admin account and theme.')).toBeVisible({
+ timeout: 20_000,
+ })
+
+ await page.getByRole('button', { name: 'Change password', exact: true }).click()
+ const dialog = page.getByRole('dialog', { name: 'Change password' })
+ await expect(dialog).toBeVisible({ timeout: 20_000 })
+ await dialog.getByLabel('Current password').fill(credentials.password)
+ await dialog.getByLabel('New password').fill(tempPassword)
+ await dialog.getByLabel('Confirm new password').fill(tempPassword)
+ await dialog.getByRole('button', { name: 'Save password', exact: true }).click()
+ await expect(
+ page.getByText('Password updated. Sign in again.', { exact: true })
+ ).toBeVisible()
+ await expect(page.getByRole('button', { name: /^Sign in$/ })).toBeVisible({
+ timeout: 20_000,
+ })
+
+ await loginThroughUi(page, { username: credentials.username, password: tempPassword })
+ await expect(page.getByRole('navigation', { name: 'Main sections' })).toBeVisible({
+ timeout: 20_000,
+ })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-settings-password')
+ } finally {
+ try {
+ await page.goto(`${CONTROL_UI_URL}/settings`).catch(() => undefined)
+ await page
+ .getByRole('button', { name: 'Change password', exact: true })
+ .click()
+ .catch(() => undefined)
+ const dialog = page.getByRole('dialog', { name: 'Change password' })
+ await dialog
+ .getByLabel('Current password')
+ .fill(tempPassword)
+ .catch(() => undefined)
+ await dialog
+ .getByLabel('New password')
+ .fill(credentials.password)
+ .catch(() => undefined)
+ await dialog
+ .getByLabel('Confirm new password')
+ .fill(credentials.password)
+ .catch(() => undefined)
+ await dialog
+ .getByRole('button', { name: 'Save password', exact: true })
+ .click()
+ .catch(() => undefined)
+ await expect(
+ page.getByText('Password updated. Sign in again.', { exact: true })
+ ).toBeVisible({ timeout: 20_000 })
+ } catch {
+ // Best-effort revert: if any step fails the operator must re-set the
+ // admin password manually before re-running (.env.qa-recorder is now stale).
+ }
+ }
+ })
+})
diff --git a/control-ui/e2e/qa-recorder-shared-fs-folders.spec.ts b/control-ui/e2e/qa-recorder-shared-fs-folders.spec.ts
new file mode 100644
index 000000000..3862221e4
--- /dev/null
+++ b/control-ui/e2e/qa-recorder-shared-fs-folders.spec.ts
@@ -0,0 +1,114 @@
+// control-ui/e2e/qa-recorder-shared-fs-folders.spec.ts
+//
+// Optional QA recorder journey (MUTATING). Requires QA_RECORDER_CONFIRM_MUTATIONS=1.
+// Provisions a SharedFileSystem, then creates and renames a folder in its file
+// browser. The SharedFileSystem is removed via Control API in finally.
+import { expect, test } from '@playwright/test'
+import {
+ CONTROL_API_URL,
+ CONTROL_UI_URL,
+ adminCredentials,
+ api,
+ assertAllowedTarget,
+ loginThroughUi,
+ requireRecorderConfirm,
+ screenshotAndLog,
+ uniqueE2EName,
+} from './qa-recorder-helpers'
+
+function sharedFsDeletePath(name: string): string {
+ return `/api/v1/admin/shared-filesystems/${encodeURIComponent(name)}`
+}
+
+test.describe('optional QA recorder: Control UI SharedFileSystem folders', () => {
+ test('SharedFileSystem — folder create + rename', async ({ page }, testInfo) => {
+ requireRecorderConfirm(
+ 'QA_RECORDER_CONFIRM_MUTATIONS',
+ 'This journey provisions a SharedFileSystem and creates/renames a folder in it.'
+ )
+ assertAllowedTarget('CONTROL_UI_URL', CONTROL_UI_URL)
+ assertAllowedTarget('CONTROL_API_URL', CONTROL_API_URL)
+
+ const credentials = adminCredentials()
+ const sharedFsName = uniqueE2EName('qa-recorder-shared-fs')
+ const folderName = 'qa-recorder-folder'
+ const renamedFolderName = 'qa-recorder-folder-renamed'
+
+ try {
+ await loginThroughUi(page, credentials)
+
+ await page.goto(`${CONTROL_UI_URL}/agent-files/new`)
+ await expect(
+ page.getByRole('heading', { name: 'Create SharedFileSystem', exact: true })
+ ).toBeVisible({ timeout: 20_000 })
+
+ await page.getByPlaceholder('team-mission').fill(sharedFsName)
+ await page.getByLabel('Shared filesystem size').fill('5')
+ await page.getByLabel('Shared filesystem size unit').selectOption({ value: 'Gi' })
+ await page
+ .locator('.cu-create-actions')
+ .getByRole('button', { name: 'Continue', exact: true })
+ .click()
+
+ await expect(page.getByText('Access and retention', { exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+ await page.getByLabel('Access mode').selectOption({ value: 'ReadWriteOnce' })
+ await page.getByLabel(/Keep storage after deletion/i).check()
+ await page
+ .locator('.cu-create-actions')
+ .getByRole('button', { name: 'Continue', exact: true })
+ .click()
+
+ await expect(page.getByText('Initial folders', { exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+ await page
+ .locator('.cu-create-actions')
+ .getByRole('button', { name: 'Create', exact: true })
+ .click()
+
+ await expect(
+ page.getByText(`Shared filesystem "${sharedFsName}" created.`, { exact: true })
+ ).toBeVisible({ timeout: 20_000 })
+
+ await page.goto(`${CONTROL_UI_URL}/agent-files/${encodeURIComponent(sharedFsName)}`)
+ await expect(page.getByRole('heading', { name: sharedFsName, exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+ await expect(page.getByRole('button', { name: 'New folder', exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+
+ await page.getByRole('button', { name: 'New folder', exact: true }).click()
+ const newFolderDialog = page.getByRole('dialog', { name: 'New folder', exact: true })
+ await expect(newFolderDialog).toBeVisible({ timeout: 20_000 })
+ await newFolderDialog.getByLabel('Folder name').fill(folderName)
+ await newFolderDialog.getByRole('button', { name: 'Create', exact: true }).click()
+
+ await expect(page.getByRole('button', { name: folderName, exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+
+ await page.getByRole('button', { name: `Rename ${folderName}`, exact: true }).click()
+ const renameDialog = page.getByRole('dialog', {
+ name: `Rename ${folderName}`,
+ exact: true,
+ })
+ await expect(renameDialog).toBeVisible({ timeout: 20_000 })
+ await renameDialog.getByLabel('New name').fill(renamedFolderName)
+ await renameDialog.getByRole('button', { name: 'Rename', exact: true }).click()
+
+ await expect(page.getByRole('button', { name: renamedFolderName, exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+ await expect(
+ page.getByRole('button', { name: `Rename ${folderName}`, exact: true })
+ ).toBeHidden({ timeout: 20_000 })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-shared-fs-folders')
+ } finally {
+ await api(page.request, 'DELETE', sharedFsDeletePath(sharedFsName))
+ }
+ })
+})
diff --git a/control-ui/e2e/qa-recorder-shared-fs-upload.spec.ts b/control-ui/e2e/qa-recorder-shared-fs-upload.spec.ts
new file mode 100644
index 000000000..4d4bbc0e5
--- /dev/null
+++ b/control-ui/e2e/qa-recorder-shared-fs-upload.spec.ts
@@ -0,0 +1,126 @@
+// control-ui/e2e/qa-recorder-shared-fs-upload.spec.ts
+//
+// Optional QA recorder journey (MUTATING). Requires QA_RECORDER_CONFIRM_MUTATIONS=1.
+// Provisions a SharedFileSystem, uploads a file through the detail browser,
+// then deletes the file. The SharedFileSystem is removed via Control API in finally.
+import { expect, test } from '@playwright/test'
+import * as fs from 'node:fs/promises'
+import * as os from 'node:os'
+import * as path from 'node:path'
+import {
+ CONTROL_API_URL,
+ CONTROL_UI_URL,
+ adminCredentials,
+ api,
+ assertAllowedTarget,
+ loginThroughUi,
+ requireRecorderConfirm,
+ screenshotAndLog,
+ uniqueE2EName,
+} from './qa-recorder-helpers'
+
+function sharedFsDeletePath(name: string): string {
+ return `/api/v1/admin/shared-filesystems/${encodeURIComponent(name)}`
+}
+
+test.describe('optional QA recorder: Control UI SharedFileSystem', () => {
+ test('SharedFileSystem — provision + upload + delete file', async ({ page }, testInfo) => {
+ requireRecorderConfirm(
+ 'QA_RECORDER_CONFIRM_MUTATIONS',
+ 'This journey provisions a SharedFileSystem, uploads a file, and deletes it.'
+ )
+ assertAllowedTarget('CONTROL_UI_URL', CONTROL_UI_URL)
+ assertAllowedTarget('CONTROL_API_URL', CONTROL_API_URL)
+
+ const credentials = adminCredentials()
+ const sharedFsName = uniqueE2EName('qa-recorder-shared-fs')
+ const seedFolder = 'qa-recorder-seed'
+ const uploadName = 'qa-recorder-upload.txt'
+ let tempFilePath = ''
+
+ try {
+ await loginThroughUi(page, credentials)
+
+ await page.goto(`${CONTROL_UI_URL}/agent-files/new`)
+ await expect(
+ page.getByRole('heading', { name: 'Create SharedFileSystem', exact: true })
+ ).toBeVisible({ timeout: 20_000 })
+ await expect(
+ page.getByText(
+ 'Provision workspace storage that Contexts can mount read-only into agent pods.',
+ { exact: true }
+ )
+ ).toBeVisible({ timeout: 20_000 })
+
+ await page.getByPlaceholder('team-mission').fill(sharedFsName)
+ await page.getByLabel('Shared filesystem size').fill('5')
+ await page.getByLabel('Shared filesystem size unit').selectOption({ value: 'Gi' })
+ await page
+ .locator('.cu-create-actions')
+ .getByRole('button', { name: 'Continue', exact: true })
+ .click()
+
+ await expect(page.getByText('Access and retention', { exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+ await page.getByLabel('Access mode').selectOption({ value: 'ReadWriteOnce' })
+ await page.getByLabel(/Keep storage after deletion/i).check()
+ await page
+ .locator('.cu-create-actions')
+ .getByRole('button', { name: 'Continue', exact: true })
+ .click()
+
+ await expect(page.getByText('Initial folders', { exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+ await page.getByLabel('Directory name').fill(seedFolder)
+ await page.getByRole('button', { name: 'Add folder', exact: true }).click()
+ await expect(
+ page.locator('.cu-folder-list__items').getByText(seedFolder, { exact: true })
+ ).toBeVisible()
+ await page
+ .locator('.cu-create-actions')
+ .getByRole('button', { name: 'Create', exact: true })
+ .click()
+
+ await expect(
+ page.getByText(`Shared filesystem "${sharedFsName}" created.`, { exact: true })
+ ).toBeVisible({ timeout: 20_000 })
+
+ await page.goto(`${CONTROL_UI_URL}/agent-files/${encodeURIComponent(sharedFsName)}`)
+ await expect(page.getByRole('heading', { name: sharedFsName, exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+ await expect(page.getByRole('button', { name: 'Upload file', exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+
+ tempFilePath = path.join(os.tmpdir(), `qa-recorder-upload-${Date.now()}.txt`)
+ await fs.writeFile(tempFilePath, 'qa-recorder shared filesystem upload\n', 'utf8')
+ await page.getByRole('button', { name: 'Upload file', exact: true }).click()
+ await page.getByLabel('Choose file to upload').setInputFiles(tempFilePath)
+ await page.getByRole('button', { name: 'Upload', exact: true }).click()
+
+ await expect(
+ page.getByRole('button', { name: `Open or download ${uploadName}`, exact: true })
+ ).toBeVisible({ timeout: 20_000 })
+
+ await page.getByRole('button', { name: `Delete ${uploadName}`, exact: true }).click()
+ await expect(
+ page.getByRole('alertdialog').getByText(`Delete "${uploadName}"?`, { exact: true })
+ ).toBeVisible()
+ await page
+ .getByRole('alertdialog')
+ .getByRole('button', { name: 'Delete', exact: true })
+ .click()
+ await expect(
+ page.getByRole('button', { name: `Delete ${uploadName}`, exact: true })
+ ).toBeHidden({ timeout: 20_000 })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-shared-fs-upload')
+ } finally {
+ if (tempFilePath) await fs.rm(tempFilePath, { force: true }).catch(() => {})
+ await api(page.request, 'DELETE', sharedFsDeletePath(sharedFsName))
+ }
+ })
+})
diff --git a/control-ui/e2e/qa-recorder-team-create.spec.ts b/control-ui/e2e/qa-recorder-team-create.spec.ts
new file mode 100644
index 000000000..22bcaf99e
--- /dev/null
+++ b/control-ui/e2e/qa-recorder-team-create.spec.ts
@@ -0,0 +1,149 @@
+// control-ui/e2e/qa-recorder-team-create.spec.ts
+//
+// Optional QA recorder journey (MUTATING). Requires QA_RECORDER_CONFIRM_MUTATIONS=1.
+// Creates an empty team through the create-team wizard, tours its detail tabs,
+// then deletes the team via the Control API.
+import { type Page, expect, test } from '@playwright/test'
+import {
+ CONTROL_API_URL,
+ CONTROL_UI_URL,
+ adminCredentials,
+ api,
+ assertAllowedTarget,
+ loginThroughUi,
+ requireRecorderConfirm,
+ screenshotAndLog,
+ uniqueE2EName,
+} from './qa-recorder-helpers'
+
+async function continueWizard(page: Page): Promise<void> {
+ const next = page.getByRole('button', { name: 'Continue', exact: true })
+ await expect(next).toBeEnabled()
+ await next.click()
+}
+
+test.describe('optional QA recorder: Control UI team creation', () => {
+ test('records the create-team wizard and the team detail tab tour', async ({
+ page,
+ }, testInfo) => {
+ requireRecorderConfirm(
+ 'QA_RECORDER_CONFIRM_MUTATIONS',
+ 'This journey creates and deletes a team.'
+ )
+ assertAllowedTarget('CONTROL_UI_URL', CONTROL_UI_URL)
+ assertAllowedTarget('CONTROL_API_URL', CONTROL_API_URL)
+
+ const credentials = adminCredentials()
+ const teamName = uniqueE2EName('qa-recorder-team')
+ let teamId = ''
+
+ try {
+ await loginThroughUi(page, credentials)
+
+ await page.getByRole('link', { name: 'Users & Teams', exact: true }).click()
+ await expect(page).toHaveURL(/\/users-and-teams\/users$/, { timeout: 20_000 })
+
+ const teamsTab = page.getByRole('tab', { name: 'Teams', exact: true })
+ await expect(teamsTab).toBeEnabled({ timeout: 20_000 })
+ await teamsTab.click()
+ await expect(page).toHaveURL(/\/users-and-teams\/teams$/, { timeout: 20_000 })
+
+ const createTeam = page.getByRole('button', { name: 'Create team', exact: true })
+ await expect(createTeam).toBeEnabled()
+ await createTeam.click()
+ await expect(page).toHaveURL(/\/users-and-teams\/teams\/new$/, { timeout: 20_000 })
+ await expect(page.getByRole('heading', { name: 'Create team', exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+
+ await page.getByPlaceholder('Team name').fill(teamName)
+
+ await continueWizard(page)
+ await expect(
+ page.getByText('Choose initial team members and roles.', { exact: true })
+ ).toBeVisible({ timeout: 20_000 })
+
+ await continueWizard(page)
+ await expect(
+ page.getByText('Select the contexts this team can access.', { exact: true })
+ ).toBeVisible({ timeout: 20_000 })
+
+ await continueWizard(page)
+ await expect(
+ page.getByText('Select the agents this team can use.', { exact: true })
+ ).toBeVisible({
+ timeout: 20_000,
+ })
+
+ const submit = page.getByRole('button', { name: 'Create team', exact: true })
+ await expect(submit).toBeEnabled()
+ await submit.click()
+ await expect(page).toHaveURL(/\/users-and-teams\/teams$/, { timeout: 20_000 })
+
+ const teamLink = page.getByRole('button', { name: teamName, exact: true })
+ await expect(teamLink).toBeVisible({ timeout: 20_000 })
+ await teamLink.click()
+ await expect(page).toHaveURL(/\/users-and-teams\/teams\/[^/]+\/members$/, {
+ timeout: 20_000,
+ })
+ const match = page.url().match(/\/users-and-teams\/teams\/([^/]+)\//)
+ teamId = decodeURIComponent(match?.[1] || '')
+
+ await expect(page.getByRole('tablist', { name: 'Team sections' })).toBeVisible({
+ timeout: 20_000,
+ })
+
+ const contextsTab = page.getByRole('tab', { name: 'Contexts', exact: true })
+ await contextsTab.click()
+ await expect(page).toHaveURL(/\/users-and-teams\/teams\/[^/]+\/contexts$/, {
+ timeout: 20_000,
+ })
+ await expect(contextsTab).toHaveAttribute('aria-selected', 'true')
+ await expect(page.getByRole('button', { name: 'Add context', exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+
+ const agentsTab = page.getByRole('tab', { name: 'Agents', exact: true })
+ await agentsTab.click()
+ await expect(page).toHaveURL(/\/users-and-teams\/teams\/[^/]+\/agents$/, {
+ timeout: 20_000,
+ })
+ await expect(agentsTab).toHaveAttribute('aria-selected', 'true')
+ await expect(page.getByRole('button', { name: 'Add agent', exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+
+ const membersTab = page.getByRole('tab', { name: 'Members', exact: true })
+ await membersTab.click()
+ await expect(page).toHaveURL(/\/users-and-teams\/teams\/[^/]+\/members$/, {
+ timeout: 20_000,
+ })
+ await expect(membersTab).toHaveAttribute('aria-selected', 'true')
+ await expect(page.getByRole('button', { name: 'Add member', exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-team-create')
+ } finally {
+ try {
+ const request = page.request
+ let idToDelete = teamId
+ if (!idToDelete) {
+ const { status, data } = await api<{ items?: Array<{ id: string; name: string }> }>(
+ request,
+ 'GET',
+ '/api/v1/admin/teams'
+ )
+ if (status === 200) {
+ idToDelete = (data.items || []).find(team => team.name === teamName)?.id || ''
+ }
+ }
+ if (idToDelete) {
+ await api(request, 'DELETE', `/api/v1/admin/teams/${encodeURIComponent(idToDelete)}`)
+ }
+ } catch {
+ // Best-effort cleanup; the disposable environment tolerates leftover teams.
+ }
+ }
+ })
+})
diff --git a/control-ui/e2e/qa-recorder-token-budget-team.spec.ts b/control-ui/e2e/qa-recorder-token-budget-team.spec.ts
new file mode 100644
index 000000000..582fcad75
--- /dev/null
+++ b/control-ui/e2e/qa-recorder-token-budget-team.spec.ts
@@ -0,0 +1,126 @@
+// control-ui/e2e/qa-recorder-token-budget-team.spec.ts
+//
+// Optional headful QA recorder journey for a team-scoped token budget. MUTATING:
+// it creates a temporary team, creates a cost budget scoped to that team via the
+// ScopeSelector, then deletes both the budget and the team through the Control
+// API in finally. Requires QA_RECORDER_CONFIRM_MUTATIONS=1.
+import { type APIRequestContext, expect, test } from '@playwright/test'
+import {
+ CONTROL_API_URL,
+ CONTROL_UI_URL,
+ adminCredentials,
+ api,
+ assertAllowedTarget,
+ loginThroughUi,
+ requireRecorderConfirm,
+ screenshotAndLog,
+ uniqueE2EName,
+} from './qa-recorder-helpers'
+
+type IdName = { id: string; name: string }
+
+async function findTeamId(request: APIRequestContext, name: string): Promise<string | undefined> {
+ const { status, data } = await api<{ items?: IdName[] }>(request, 'GET', '/api/v1/admin/teams')
+ if (status !== 200) return undefined
+ return (data.items ?? []).find(item => item.name === name)?.id
+}
+
+async function waitForTeamId(request: APIRequestContext, name: string): Promise<string> {
+ for (let attempt = 0; attempt < 20; attempt += 1) {
+ const id = await findTeamId(request, name)
+ if (id) return id
+ await new Promise(resolve => setTimeout(resolve, 500))
+ }
+ throw new Error(`Created team "${name}" did not appear through Control API.`)
+}
+
+async function findBudgetId(request: APIRequestContext, name: string): Promise<string | undefined> {
+ const { status, data } = await api<{ rows?: IdName[] }>(request, 'GET', '/api/v1/admin/budgets')
+ if (status !== 200) return undefined
+ return (data.rows ?? []).find(row => row.name === name)?.id
+}
+
+async function waitForBudgetId(request: APIRequestContext, name: string): Promise<string> {
+ for (let attempt = 0; attempt < 20; attempt += 1) {
+ const id = await findBudgetId(request, name)
+ if (id) return id
+ await new Promise(resolve => setTimeout(resolve, 500))
+ }
+ throw new Error(`Created budget "${name}" did not appear through Control API.`)
+}
+
+test.describe('optional QA recorder: Control UI token budget team scope', () => {
+ test('Token budget scoped to a team (creates its own team)', async ({ page }, testInfo) => {
+ requireRecorderConfirm(
+ 'QA_RECORDER_CONFIRM_MUTATIONS',
+ 'This journey creates and deletes a team and a team-scoped token budget.'
+ )
+ assertAllowedTarget('CONTROL_UI_URL', CONTROL_UI_URL)
+ assertAllowedTarget('CONTROL_API_URL', CONTROL_API_URL)
+
+ const credentials = adminCredentials()
+ const teamName = uniqueE2EName('qa-recorder-team')
+ const budgetName = uniqueE2EName('qa-recorder-budget-team')
+ let teamId = ''
+ let budgetId = ''
+
+ try {
+ await loginThroughUi(page, credentials)
+
+ // Minimal team shell: name, then skip members/contexts/agents.
+ await page.goto(`${CONTROL_UI_URL}/users-and-teams/teams/new`)
+ await expect(page.getByRole('heading', { name: 'Create team', exact: true })).toBeVisible({
+ timeout: 20_000,
+ })
+ await page.locator('#new-team-name').fill(teamName)
+ await page.getByRole('button', { name: 'Continue', exact: true }).click()
+ await page.getByRole('button', { name: 'Skip', exact: true }).click()
+ await page.getByRole('button', { name: 'Skip', exact: true }).click()
+ await page.getByRole('button', { name: 'Create team', exact: true }).click()
+ await expect(page).toHaveURL(/\/users-and-teams\/teams$/, { timeout: 20_000 })
+ teamId = await waitForTeamId(page.request, teamName)
+ expect(teamId).toBeTruthy()
+
+ await page.goto(`${CONTROL_UI_URL}/cost-and-usage/token-budgets/new`)
+ await expect(
+ page.getByRole('heading', { name: 'New token budget', exact: true })
+ ).toBeVisible({
+ timeout: 20_000,
+ })
+ await page.locator('#budget-name').fill(budgetName)
+ await page.locator('#budget-unit').selectOption('cost')
+ await page.locator('#budget-limit').fill('50')
+ await page.locator('#budget-period').selectOption('monthly')
+ await page.locator('#budget-enforcement').selectOption('warn')
+ await page.locator('.cu-tb-form').getByLabel('Enabled').check()
+
+ // Scope: add the Team dimension and select the team just created. The
+ // ScopeSelector loads team options async, so wait for this team's option
+ // to attach before selecting it by value (the team id).
+ const teamScopeSelect = page.getByLabel('Add Team to scope')
+ await expect(teamScopeSelect.locator('option', { hasText: teamName })).toBeAttached({
+ timeout: 20_000,
+ })
+ await teamScopeSelect.selectOption(teamId)
+ await expect(
+ page.locator('.cu-tb-scope-editor .cu-tb-chip__label', { hasText: teamName })
+ ).toBeVisible()
+
+ await page.getByRole('button', { name: 'Create budget', exact: true }).click()
+ await expect(page).toHaveURL(/\/cost-and-usage\/token-budgets$/, { timeout: 20_000 })
+ budgetId = await waitForBudgetId(page.request, budgetName)
+ expect(budgetId).toBeTruthy()
+
+ await screenshotAndLog(page, testInfo, 'control-ui-token-budget-team')
+ } finally {
+ const bId = budgetId || (await findBudgetId(page.request, budgetName))
+ if (bId) {
+ await api(page.request, 'DELETE', `/api/v1/admin/budgets/${encodeURIComponent(bId)}`)
+ }
+ const tId = teamId || (await findTeamId(page.request, teamName))
+ if (tId) {
+ await api(page.request, 'DELETE', `/api/v1/admin/teams/${encodeURIComponent(tId)}`)
+ }
+ }
+ })
+})
diff --git a/control-ui/e2e/qa-recorder-token-budget.spec.ts b/control-ui/e2e/qa-recorder-token-budget.spec.ts
new file mode 100644
index 000000000..b92b94fd6
--- /dev/null
+++ b/control-ui/e2e/qa-recorder-token-budget.spec.ts
@@ -0,0 +1,101 @@
+// control-ui/e2e/qa-recorder-token-budget.spec.ts
+//
+// Optional headful QA recorder journey for the Control UI "Cost & Usage" ->
+// token budgets create/edit flow. MUTATING: it creates a global cost budget,
+// edits its limit + enforcement, then deletes the budget through the Control
+// API in finally. Requires QA_RECORDER_CONFIRM_MUTATIONS=1.
+import { type APIRequestContext, expect, test } from '@playwright/test'
+import {
+ CONTROL_API_URL,
+ CONTROL_UI_URL,
+ adminCredentials,
+ api,
+ assertAllowedTarget,
+ loginThroughUi,
+ requireRecorderConfirm,
+ screenshotAndLog,
+ uniqueE2EName,
+} from './qa-recorder-helpers'
+
+type BudgetRow = { id: string; name: string }
+
+async function findBudgetId(request: APIRequestContext, name: string): Promise<string | undefined> {
+ const { status, data } = await api<{ rows?: BudgetRow[] }>(
+ request,
+ 'GET',
+ '/api/v1/admin/budgets'
+ )
+ if (status !== 200) return undefined
+ return (data.rows ?? []).find(row => row.name === name)?.id
+}
+
+async function waitForBudgetId(request: APIRequestContext, name: string): Promise<string> {
+ for (let attempt = 0; attempt < 20; attempt += 1) {
+ const id = await findBudgetId(request, name)
+ if (id) return id
+ await new Promise(resolve => setTimeout(resolve, 500))
+ }
+ throw new Error(`Created budget "${name}" did not appear through Control API.`)
+}
+
+test.describe('optional QA recorder: Control UI token budget', () => {
+ test('Token budget — global scope, create + edit', async ({ page }, testInfo) => {
+ requireRecorderConfirm(
+ 'QA_RECORDER_CONFIRM_MUTATIONS',
+ 'This journey creates, edits, and deletes a token budget.'
+ )
+ assertAllowedTarget('CONTROL_UI_URL', CONTROL_UI_URL)
+ assertAllowedTarget('CONTROL_API_URL', CONTROL_API_URL)
+
+ const credentials = adminCredentials()
+ const name = uniqueE2EName('qa-recorder-budget')
+ let budgetId = ''
+
+ try {
+ await loginThroughUi(page, credentials)
+
+ await page.goto(`${CONTROL_UI_URL}/cost-and-usage/token-budgets/new`)
+ await expect(
+ page.getByRole('heading', { name: 'New token budget', exact: true })
+ ).toBeVisible({
+ timeout: 20_000,
+ })
+
+ await page.locator('#budget-name').fill(name)
+ await page.locator('#budget-unit').selectOption('cost')
+ await page.locator('#budget-limit').fill('100')
+ await page.locator('#budget-currency').fill('USD')
+ await page.locator('#budget-period').selectOption('monthly')
+ await page.locator('#budget-enforcement').selectOption('warn')
+ await page.locator('.cu-tb-form').getByLabel('Enabled').check()
+
+ // Scope left empty (global). The FormSection helper text always renders,
+ // so it is the resilient proof that a global scope is accepted.
+ await expect(
+ page.getByText('Dimensions are ANDed; values within one are ORed.')
+ ).toBeVisible()
+
+ await page.getByRole('button', { name: 'Create budget', exact: true }).click()
+ await expect(page).toHaveURL(/\/cost-and-usage\/token-budgets$/, { timeout: 20_000 })
+
+ budgetId = await waitForBudgetId(page.request, name)
+ expect(budgetId).toBeTruthy()
+
+ await page.goto(
+ `${CONTROL_UI_URL}/cost-and-usage/token-budgets/${encodeURIComponent(budgetId)}/edit`
+ )
+ await expect(page.locator('#budget-name')).toHaveValue(name, { timeout: 20_000 })
+ await page.locator('#budget-limit').fill('250')
+ await page.locator('#budget-enforcement').selectOption('block')
+ await page.getByRole('button', { name: 'Save budget', exact: true }).click()
+ await expect(page).toHaveURL(/\/cost-and-usage\/token-budgets$/, { timeout: 20_000 })
+
+ await screenshotAndLog(page, testInfo, 'control-ui-token-budget')
+ } finally {
+ const id = budgetId || (await findBudgetId(page.request, name))
+ if (id) {
+ await api(page.request, 'DELETE', `/api/v1/admin/budgets/${encodeURIComponent(id)}`)
+ }
+ }
+ })
+})
diff --git a/control-ui/package-lock.json b/control-ui/package-lock.json
index f09224d3a..eb73488e3 100644
--- a/control-ui/package-lock.json
+++ b/control-ui/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-ui",
- "version": "0.1.346",
+ "version": "0.1.347",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-ui",
- "version": "0.1.346",
+ "version": "0.1.347",
"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 8668a66d3..61cc222e8 100644
--- a/control-ui/package.json
+++ b/control-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-ui",
- "version": "0.1.346",
+ "version": "0.1.347",
"private": true,
"scripts": {
"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",
@@ -20,6 +20,30 @@
"qa:recorder:traces": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-traces.spec.ts",
"qa:recorder:settings": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-settings.spec.ts",
"qa:recorder:marketplace": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-marketplace.spec.ts",
+ "qa:recorder:context-create": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-context-create.spec.ts",
+ "qa:recorder:context-connector": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-context-connector.spec.ts",
+ "qa:recorder:connector-edit": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-connector-edit.spec.ts",
+ "qa:recorder:llm-model-lifecycle": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-llm-model-lifecycle.spec.ts",
+ "qa:recorder:secret-recipe": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-secret-recipe.spec.ts",
+ "qa:recorder:secret-connector": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-secret-connector.spec.ts",
+ "qa:recorder:shared-fs-upload": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-shared-fs-upload.spec.ts",
+ "qa:recorder:shared-fs-folders": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-shared-fs-folders.spec.ts",
+ "qa:recorder:global-fs": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-global-fs.spec.ts",
+ "qa:recorder:team-create": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-team-create.spec.ts",
+ "qa:recorder:member-invite": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-member-invite.spec.ts",
+ "qa:recorder:admin-invite": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-admin-invite.spec.ts",
+ "qa:recorder:marketplace-api-keys": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-marketplace-api-keys.spec.ts",
+ "qa:recorder:token-budget": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-token-budget.spec.ts",
+ "qa:recorder:token-budget-team": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-token-budget-team.spec.ts",
+ "qa:recorder:llm-price": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-llm-price.spec.ts",
+ "qa:recorder:onboarding-combo": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-onboarding-combo.spec.ts",
+ "qa:recorder:cost-governance": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-cost-governance.spec.ts",
+ "qa:recorder:context-connector-budget": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-context-connector-budget.spec.ts",
+ "qa:recorder:settings-account": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-settings-account.spec.ts",
+ "qa:recorder:settings-password": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-settings-password.spec.ts",
+ "qa:recorder:settings-email": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-settings-email.spec.ts",
+ "qa:recorder:create-form-smoke": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-create-form-smoke.spec.ts",
+ "qa:recorder:marketplace-browse": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts qa-recorder-marketplace-browse.spec.ts",
"qa:recorder:all": "PLAYWRIGHT_BROWSERS_PATH=../.local-notes/qa-recorder/browsers playwright test --config=playwright.qa-recorder.config.ts",
"test": "vitest run",
"test:watch": "vitest"
diff --git a/desktop-app/package-lock.json b/desktop-app/package-lock.json
index 35e07cd19..7a4232298 100644
--- a/desktop-app/package-lock.json
+++ b/desktop-app/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "evenfire",
- "version": "0.1.314",
+ "version": "0.1.315",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "evenfire",
- "version": "0.1.314",
+ "version": "0.1.315",
"license": "MPL-2.0",
"dependencies": {
"@tanstack/react-query": "5.100.10",
diff --git a/desktop-app/package.json b/desktop-app/package.json
index 3c04f428a..d8eddf975 100644
--- a/desktop-app/package.json
+++ b/desktop-app/package.json
@@ -1,7 +1,7 @@
{
"name": "evenfire",
"productName": "Evenfire",
- "version": "0.1.314",
+ "version": "0.1.315",
"private": true,
"license": "MPL-2.0",
"description": "Evenfire desktop client for secure agent and workflow access",
diff --git a/desktop-app/ui/src/components/agents/ComposerPanel.tsx b/desktop-app/ui/src/components/agents/ComposerPanel.tsx
index 1cff5c7d1..36ed7c312 100644
--- a/desktop-app/ui/src/components/agents/ComposerPanel.tsx
+++ b/desktop-app/ui/src/components/agents/ComposerPanel.tsx
@@ -29,12 +29,16 @@ import { AnnotationCanvas } from './AnnotationCanvas'
import { ComposerAgentFilesModal } from './ComposerAgentFilesModal'
import { ComposerGlobalFilesModal } from './ComposerGlobalFilesModal'
import { ModelSelector } from './ModelSelector'
+import { SHOW_AGENT_FILES_UI } from './agentRoutes'
type ComposerPanelProps = {
inline?: boolean
agentSelector?: React.ReactNode
}
+// UI-only composer gate; the Global File System feature remains available elsewhere.
+const SHOW_GLOBAL_FILE_SYSTEM_COMPOSER_ITEM = false
+
function getComposerReferenceTypeLabel(type: ComposerReferenceAttachment['type']): string {
if (type === 'plugin') return 'Plugin'
if (type === 'connector') return 'Connector'
@@ -624,31 +628,37 @@ export function ComposerPanel({ inline = false, agentSelector }: ComposerPanelPr
>
Connectors
</MenuItem>
- <MenuItem
- aria-disabled={agentFilesDisabled}
- className={
- agentFilesDisabled ? 'composer-reference-menu-item-disabled' : undefined
- }
- leadingIcon={<IconContexts />}
- onClick={agentFilesDisabled ? undefined : openAgentFilesModal}
- onFocus={() => setComposerSubmenu(agentFilesDisabled ? 'agent-files' : null)}
- onMouseEnter={() =>
- setComposerSubmenu(agentFilesDisabled ? 'agent-files' : null)
- }
- role="menuitem"
- trailingIcon={
- agentFilesDisabled ? <span aria-hidden="true">&gt;</span> : undefined
- }
- >
- Agent Files
- </MenuItem>
- <MenuItem
- leadingIcon={<IconAttachFile />}
- onClick={openGlobalFilesModal}
- role="menuitem"
- >
- Global File System
- </MenuItem>
+ {SHOW_AGENT_FILES_UI ? (
+ <MenuItem
+ aria-disabled={agentFilesDisabled}
+ className={
+ agentFilesDisabled ? 'composer-reference-menu-item-disabled' : undefined
+ }
+ leadingIcon={<IconContexts />}
+ onClick={agentFilesDisabled ? undefined : openAgentFilesModal}
+ onFocus={() =>
+ setComposerSubmenu(agentFilesDisabled ? 'agent-files' : null)
+ }
+ onMouseEnter={() =>
+ setComposerSubmenu(agentFilesDisabled ? 'agent-files' : null)
+ }
+ role="menuitem"
+ trailingIcon={
+ agentFilesDisabled ? <span aria-hidden="true">&gt;</span> : undefined
+ }
+ >
+ Agent Files
+ </MenuItem>
+ ) : null}
+ {SHOW_GLOBAL_FILE_SYSTEM_COMPOSER_ITEM ? (
+ <MenuItem
+ leadingIcon={<IconAttachFile />}
+ onClick={openGlobalFilesModal}
+ role="menuitem"
+ >
+ Global File System
+ </MenuItem>
+ ) : null}
<MenuItem
leadingIcon={<IconUpload />}
onClick={openUploadPicker}
@@ -718,7 +728,7 @@ export function ComposerPanel({ inline = false, agentSelector }: ComposerPanelPr
)}
</span>
) : null}
- {composerSubmenu === 'agent-files' ? (
+ {SHOW_AGENT_FILES_UI && composerSubmenu === 'agent-files' ? (
<span
className="composer-reference-submenu composer-reference-submenu--agent-files"
role="menu"
diff --git a/desktop-app/ui/src/components/agents/__tests__/AgentTitleSelector.test.tsx b/desktop-app/ui/src/components/agents/__tests__/AgentTitleSelector.test.tsx
index f19048423..533d50b18 100644
--- a/desktop-app/ui/src/components/agents/__tests__/AgentTitleSelector.test.tsx
+++ b/desktop-app/ui/src/components/agents/__tests__/AgentTitleSelector.test.tsx
@@ -120,6 +120,15 @@ describe('AgentTitleSelector', () => {
expect(onOpenRoute).toHaveBeenCalledWith('beta', 'mcp-servers' as AgentWorkspaceRoute)
})
+ it('temporarily hides Agent Files from the sections sub-menu', () => {
+ renderSelector()
+ openMenu()
+
+ fireEvent.click(findDotsItem('Beta'))
+
+ expect(screen.queryByRole('menuitem', { name: 'Agent Files' })).toBeNull()
+ })
+
it('toggles the sections sub-menu off when the dots are clicked again', () => {
renderSelector()
openMenu()
diff --git a/desktop-app/ui/src/components/agents/agentRoutes.ts b/desktop-app/ui/src/components/agents/agentRoutes.ts
index 9ac529594..50726005d 100644
--- a/desktop-app/ui/src/components/agents/agentRoutes.ts
+++ b/desktop-app/ui/src/components/agents/agentRoutes.ts
@@ -1,5 +1,9 @@
import type { AgentWorkspaceRoute } from '../../uiTypes'
+// Temporary UI-only gate. Restore every Agent Files entry point by flipping
+// this to true; the route, views, handlers, and APIs remain untouched.
+export const SHOW_AGENT_FILES_UI = false
+
export const AGENT_ROUTE_LABELS: Record<AgentWorkspaceRoute, string> = {
details: 'Details',
'mcp-servers': 'Connectors',
@@ -12,6 +16,6 @@ export const AGENT_ROUTE_OPTIONS: AgentWorkspaceRoute[] = [
'details',
'mcp-servers',
'contexts',
- 'shared-files',
+ ...(SHOW_AGENT_FILES_UI ? (['shared-files'] as AgentWorkspaceRoute[]) : []),
'activity',
]
diff --git a/docs/testing/control-ui-headful-journeys.md b/docs/testing/control-ui-headful-journeys.md
index b7a42056e..fed9c7710 100644
--- a/docs/testing/control-ui-headful-journeys.md
+++ b/docs/testing/control-ui-headful-journeys.md
@@ -16,6 +16,8 @@ signs in with the exact admin identity from `.env.qa-recorder`, shares
launch/login/proof plumbing in `e2e/qa-recorder-helpers.ts`, and records a WebM +
PNG per test under `.local-notes/qa-recorder/runs/control-ui/` (git-ignored).
+### Inventory & navigation (read-only, plus the create-agent wizard)
+
| Journey | Spec | Tests | Confirm flag | Status |
| --- | --- | --- | --- | --- |
| Login & shell | `qa-recorder-login.spec.ts` | 2 — sign-in page, authenticated shell | — | ✅ |
@@ -30,12 +32,59 @@ PNG per test under `.local-notes/qa-recorder/runs/control-ui/` (git-ignored).
| Traces | `qa-recorder-traces.spec.ts` | 2 — dashboard, state | — | ✅ |
| Settings | `qa-recorder-settings.spec.ts` | 1 — read-only settings | — | ✅ |
| Marketplace & plugins | `qa-recorder-marketplace.spec.ts` | 2 — connectors, plugins | — | ✅ |
+| Marketplace browse | `qa-recorder-marketplace-browse.spec.ts` | 1 — search, filter, plugins tab, entry detail (skips if empty) | — | ✳️ |
| Create agent | `qa-recorder-agent-create.spec.ts` | 1 — full create wizard | `QA_RECORDER_CONFIRM_MUTATIONS` (required) | ✅ |
-**Totals: 13 specs, 17 tests.** Read-only journeys need no confirmation flag; every
-journey still calls the loopback reachability guard on both URLs. The only
-mutating journey (create agent) requires `QA_RECORDER_CONFIRM_MUTATIONS=1` and
-cleans up its temporary agent/context in a `finally`.
+### Workflow & combo journeys (create / edit / delete / grant)
+
+Full mutating user journeys. Each is self-contained — it creates its own
+resources with `uniqueE2EName(...)` and tears them down via the Control API in a
+`finally`, so none depend on pre-seeded data or real external credentials
+(dummy `qa-recorder-*` values are used where a form wants a value but no real
+credential). Run with `npm run qa:recorder:<journey>`.
+
+| Journey | Spec | Tests | Confirm flag | Status |
+| --- | --- | --- | --- | --- |
+| Context create + detail tour | `qa-recorder-context-create.spec.ts` | 1 | `CONFIRM_MUTATIONS` | ✳️ |
+| Context + stdio discovery connector + attach | `qa-recorder-context-connector.spec.ts` | 1 | `CONFIRM_MUTATIONS` | ✳️ |
+| Connector edit egress | `qa-recorder-connector-edit.spec.ts` | 1 | `CONFIRM_MUTATIONS` | ✳️ |
+| LLM model add → disable → remove | `qa-recorder-llm-model-lifecycle.spec.ts` | 1 | `CONFIRM_MUTATIONS` | ✳️ |
+| Recipe secret (shared, dummy) | `qa-recorder-secret-recipe.spec.ts` | 1 | `CONFIRM_MUTATIONS` | ✳️ |
+| Connector secret (dummy) | `qa-recorder-secret-connector.spec.ts` | 1 | `CONFIRM_MUTATIONS` | ✳️ |
+| SharedFileSystem provision + upload + delete | `qa-recorder-shared-fs-upload.spec.ts` | 1 | `CONFIRM_MUTATIONS` | ✳️ |
+| SharedFileSystem folder create + rename | `qa-recorder-shared-fs-folders.spec.ts` | 1 | `CONFIRM_MUTATIONS` | ✳️ |
+| Global file system folder + upload + rename | `qa-recorder-global-fs.spec.ts` | 1 | `CONFIRM_MUTATIONS` | ✳️ |
+| Team create + detail tour | `qa-recorder-team-create.spec.ts` | 1 | `CONFIRM_MUTATIONS` | ✳️ |
+| Create member + cancel invite (sends email) | `qa-recorder-member-invite.spec.ts` | 1 | `CONFIRM_MUTATIONS` | ✳️ |
+| Admin invite (no Desktop) + cancel (sends email) | `qa-recorder-admin-invite.spec.ts` | 1 | `CONFIRM_MUTATIONS` | ✳️ |
+| Marketplace API key create + reveal + revoke | `qa-recorder-marketplace-api-keys.spec.ts` | 1 | `CONFIRM_MUTATIONS` | ✳️ |
+| Token budget (global) create + edit | `qa-recorder-token-budget.spec.ts` | 1 | `CONFIRM_MUTATIONS` | ✳️ |
+| Token budget scoped to a team | `qa-recorder-token-budget-team.spec.ts` | 1 | `CONFIRM_MUTATIONS` | ✳️ |
+| LLM price add → edit → delete | `qa-recorder-llm-price.spec.ts` | 1 | `CONFIRM_MUTATIONS` | ✳️ |
+| Create-form availability smoke (15 forms, no submit) | `qa-recorder-create-form-smoke.spec.ts` | 15 | — | ✳️ |
+| Settings — username + theme + reset alerts | `qa-recorder-settings-account.spec.ts` | 1 | `CONFIRM_MUTATIONS` | ✳️ |
+| Settings — change password + revert | `qa-recorder-settings-password.spec.ts` | 1 | `CONFIRM_MUTATIONS` | ✳️ |
+| Settings — email change + resend + revert (sends email) | `qa-recorder-settings-email.spec.ts` | 1 | `CONFIRM_MUTATIONS` | ✳️ |
+
+### Persona combos (multi-resource, end-to-end)
+
+| Journey | Spec | Tests | Confirm flag | Status |
+| --- | --- | --- | --- | --- |
+| New-team onboarding (team → member → context grant) | `qa-recorder-onboarding-combo.spec.ts` | 1 | `CONFIRM_MUTATIONS` | ✳️ |
+| Cost governance (model → price → model-scoped budget) | `qa-recorder-cost-governance.spec.ts` | 1 | `CONFIRM_MUTATIONS` | ✳️ |
+| Context + connector + global budget | `qa-recorder-context-connector-budget.spec.ts` | 1 | `CONFIRM_MUTATIONS` | ✳️ |
+
+**Totals: 37 specs, 55 tests.** Read-only journeys need no confirmation flag; every
+journey still calls the loopback reachability guard on both URLs. Every mutating
+journey requires `QA_RECORDER_CONFIRM_MUTATIONS=1`, creates only temporary
+`qa-recorder-*` resources, and cleans them up via the Control API in a `finally`
+(reverse order, each deletion best-effort). Invite and email/password journeys
+have external side effects (an email is sent / the admin password is changed) and
+revert to the original state on completion.
+
+**Legend:** ✅ verified against a live `example-dev` environment;
+✳️ implemented and compile-verified (`npx playwright test --config=playwright.qa-recorder.config.ts --list`)
+but not yet exercised against a live environment — re-run to refresh.
## Run
@@ -44,7 +93,7 @@ cd control-ui
npm run qa:recorder:install # one-time: recorder Chromium into .local-notes/qa-recorder/browsers
# control-ui dev server on :3000 + control-api forward on :8090 must be up
npm run qa:recorder:login # one journey
-npm run qa:recorder:all # all 13 specs / 17 tests
+npm run qa:recorder:all # all 37 specs / 55 tests
```
## Proof artifacts (local only, git-ignored)
@@ -56,6 +105,11 @@ find .local-notes/qa-recorder/runs/control-ui -name '*.png' # full-page scree
## Last verified
-2026-07-17 against `example-dev` (GKE) — 17/17 passed, exit 0, with WebM + PNG
-proof for every test. Point-in-time snapshot; re-run `npm run qa:recorder:all`
-to refresh.
+- **Inventory & create-agent (✅):** 2026-07-17 against `example-dev` (GKE) — the
+ original 13 specs / 17 tests passed, exit 0, with WebM + PNG proof for every
+ test. Point-in-time snapshot; re-run to refresh.
+- **Workflow, combo & smoke journeys (✳️):** implemented and compile-verified via
+ `npx playwright test --config=playwright.qa-recorder.config.ts --list` (55/55
+ tests discovered, zero compile errors). Not yet exercised against a live
+ environment — run `npm run qa:recorder:all` (with `QA_RECORDER_CONFIRM_MUTATIONS=1`)
+ to produce WebM + PNG proof and flip these to ✅.