Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
feat(control-ui): drop deleted-mapping tombstones from access tabs (D9)
Miguelon Peluchon9665f032809c
diff --git a/control-ui/app/globals.css b/control-ui/app/globals.cssindex 8ef4f1a47..b6a7ab354 100644--- a/control-ui/app/globals.css+++ b/control-ui/app/globals.css@@ -9050,11 +9050,6 @@ textarea.cu-input {justify-content: flex-end;}-.cu-deleted-access-heading {- margin-top: var(--cu-space-4);- font-size: 0.875rem;-}-.cu-grant-row {display: flex;flex-wrap: wrap;diff --git a/control-ui/app/profile-admin/teams/[teamId]/page.tsx b/control-ui/app/profile-admin/teams/[teamId]/page.tsxindex 3150b27d2..2a4da6431 100644--- a/control-ui/app/profile-admin/teams/[teamId]/page.tsx+++ b/control-ui/app/profile-admin/teams/[teamId]/page.tsx@@ -1140,42 +1140,6 @@ export default function TeamDetailsPage() {</table></div>)}- {!initialLoading &&- (deletedAgentNames.length > 0 || deletedContextIds.length > 0) ? (- <>- <p className="cu-muted cu-deleted-access-heading">Removed access</p>- <div className="cu-table-wrap">- <table className="cu-table">- <tbody>- {deletedAgentNames.map(agentName => (- <tr key={agentName}>- <td>{agentDisplay(agentName)}</td>- <td className="cu-muted">Deleted</td>- </tr>- ))}- {deletedContextIds- .filter(contextId => {- const owned = [...hostsByName.values()].some(- host =>- String(- (host.spec as { contextRef?: string } | undefined)- ?.contextRef || ''- ).trim() === contextId &&- grantedAgentNames.includes(String(host.metadata?.name ?? ''))- )- return !owned- })- .map(contextId => (- <tr key={contextId}>- <td className="cu-muted">{accessLabelFor(contextId).label}</td>- <td className="cu-muted">Deleted</td>- </tr>- ))}- </tbody>- </table>- </div>- </>- ) : null}</>)}</div>diff --git a/control-ui/app/profile-admin/users/[userId]/page.tsx b/control-ui/app/profile-admin/users/[userId]/page.tsxindex 2c374f9b8..ab2b38e83 100644--- a/control-ui/app/profile-admin/users/[userId]/page.tsx+++ b/control-ui/app/profile-admin/users/[userId]/page.tsx@@ -1107,42 +1107,6 @@ export default function UserDetailsPage() {</table></div>)}- {!initialLoading && (deletedAgentNames.length > 0 || deletedContextIds.length > 0) ? (- <>- <p className="cu-muted cu-deleted-access-heading">Removed access</p>- <div className="cu-table-wrap">- <table className="cu-table">- <tbody>- {deletedAgentNames.map(agentName => (- <tr key={agentName}>- <td>{agentDisplay(agentName)}</td>- <td className="cu-muted">Deleted</td>- </tr>- ))}- {deletedContextIds- .filter(contextId => {- // Scope tombstones that a still-listed agent owns are- // represented by the agent row above instead.- const owned = [...hostsByName.values()].some(- host =>- String(- (host.spec as { contextRef?: string } | undefined)?.contextRef || ''- ).trim() === contextId &&- grantedAgentNames.includes(String(host.metadata?.name ?? ''))- )- return !owned- })- .map(contextId => (- <tr key={contextId}>- <td className="cu-muted">{accessLabelFor(contextId).label}</td>- <td className="cu-muted">Deleted</td>- </tr>- ))}- </tbody>- </table>- </div>- </>- ) : null}</>)}diff --git a/control-ui/e2e/qa-recorder-member-removed-access.spec.ts b/control-ui/e2e/qa-recorder-member-removed-access.spec.tsindex 305064193..164a02aff 100644--- a/control-ui/e2e/qa-recorder-member-removed-access.spec.ts+++ b/control-ui/e2e/qa-recorder-member-removed-access.spec.ts@@ -1,13 +1,8 @@// control-ui/e2e/qa-recorder-member-removed-access.spec.ts//-// Optional QA recorder journey (MUTATING). Requires QA_RECORDER_CONFIRM_MUTATIONS=1.-// Video-tours the member Access tab's tombstone story (D8): a scope granted-// to a member whose backing Context is then deleted out-of-band renders under-// the "Removed access" heading (cu-deleted-access-heading) with the resolved-// agent display name and a "Deleted" marker — never a bare contextId row in-// the active table. The member's original contextIds AND agentNames are-// restored via PUT and the seeded host is deleted in the finally; the Context-// stays deleted (it is the journey's fixture), so it is never deleted twice.+// MUTATING journey: seeds an access scope for the first member, deletes the+// backing context out-of-band, and proves the Access tab shows+// bookkeeping and is never rendered).//// Contract: docs/testing/optional-playwright-qa-recorder.md ("Extending the// recorder").@@ -140,17 +135,17 @@ test.describe('optional QA recorder: Control UI member removed access', () => {})).toBeVisible({ timeout: 20_000 })+ // D9: the deleted mapping leaves NO residue — no "Removed access"+ // section, no tombstone row, no raw context id anywhere on the page.+ await expect(page.locator('.cu-deleted-access-heading')).toHaveCount(0)+ await expect(page.getByText('Removed access')).toHaveCount(0)await expect(- page.locator('.cu-deleted-access-heading').filter({ hasText: 'Removed access' })- ).toBeVisible({ timeout: 20_000 })-- const removedRow = page- .getByRole('row')- .filter({ has: page.getByRole('cell', { name: hostDisplayName, exact: true }) })- await expect(removedRow).toBeVisible({ timeout: 20_000 })- await expect(removedRow.getByText('Deleted', { exact: true })).toBeVisible()- // The raw wire contextId never renders for the tombstone.- await expect(removedRow).not.toContainText(contextId)+ page+ .getByRole('row')+ .filter({ has: page.getByRole('cell', { name: hostDisplayName, exact: true }) })+ ).toHaveCount(0)+ await expect(page.getByText(contextId)).toHaveCount(0)+ await expect(page.getByText('No access assigned yet.', { exact: true })).toBeVisible()await screenshotAndLog(page, testInfo, `${journey}-deleted-scope`)// Restore: the member's original contextIds, which never contained thediff --git a/control-ui/e2e/qa-recorder-team-access.spec.ts b/control-ui/e2e/qa-recorder-team-access.spec.tsindex 1e6a214c8..ab4bdb56c 100644--- a/control-ui/e2e/qa-recorder-team-access.spec.ts+++ b/control-ui/e2e/qa-recorder-team-access.spec.ts@@ -158,8 +158,8 @@ test.describe('optional QA recorder: Control UI team Access tab', () => {await expect(page.getByRole('status').filter({ hasText: 'Team access updated.' })).toBeVisible({ timeout: 20_000 })- // The mapping moves to the "Removed access" tombstone (deleted history),- // so the actionable row disappears but a read-only row may remain.+ // Removed mappings leave no residue (D9): deleted history is backend+ // bookkeeping and is no longer rendered.await expect(row.getByLabel('Remove access')).toHaveCount(0)await expect(page.getByText('No access assigned yet.', { exact: true })).toBeVisible()await screenshotAndLog(page, testInfo, `${journey}-removed`)diff --git a/control-ui/package-lock.json b/control-ui/package-lock.jsonindex 364ead2b7..8d1df5173 100644--- a/control-ui/package-lock.json+++ b/control-ui/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-ui",- "version": "0.1.473",+ "version": "0.1.474","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-ui",- "version": "0.1.473",+ "version": "0.1.474","dependencies": {"@clerum/display-field": "file:../packages/display-field","@clerum/llm-providers": "file:../packages/llm-providers",diff --git a/control-ui/package.json b/control-ui/package.jsonindex f2cc6c72e..543e0c7c0 100644--- a/control-ui/package.json+++ b/control-ui/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-ui",- "version": "0.1.473",+ "version": "0.1.474","private": true,"scripts": {"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",diff --git a/docs/features/control-ui-context-removal.md b/docs/features/control-ui-context-removal.mdindex 92af46c3a..3350c8cf3 100644--- a/docs/features/control-ui-context-removal.md+++ b/docs/features/control-ui-context-removal.md@@ -80,6 +80,7 @@ Old `/contexts/*` bookmarks are redirected (see §6.3), not 404'd. For the full| D4 | Access model naming | Users/teams "Contexts" tabs → **"Access"** tabs; rows labeled with resolved agent names; writes unchanged || D5 | Context deletion guardrail | Moot: after Category A removal there is **no user-facing context-delete path** left in the UI || D6 | Multi-agent GFS mounts via context detail | **Accepted loss** of that surface (was the only multi-agent mount UI). Single-agent GFS access continues via existing GFS grant surfaces; documented for product follow-up |+| D9 | Deleted-mapping history in UI | **Removed entirely.** The "Removed access" tombstone section (backend `deletedContextIds`/`deletedAgentNames` soft-delete history) is operator noise — internal reconciliation bookkeeping, not actionable state — so the Access tabs no longer render it. The backend keeps its guard data untouched; the UI just stops displaying archaeology. Verified by the rewritten `member-removed-access` journey (deleted scope ⇒ zero residue: no section, no row, no raw id) || D8 | Member/team Access tabs | **One concept: agents.** The Access tab lists agents (display name + Connectors column with the same pill/hover as the Agents table; click → agent's Connectors tab). The separate member/team "Agents" tabs are folded in (old URLs redirect to `…/access`). Writes are composite: granting agent X updates BOTH `PUT /{users,teams}/:id/agents` and `PUT /{users,teams}/:id/contexts` (scope synced, legacy scope-only mappings preserved), so whichever table the runtime enforces, the grant works. Granted rows = agent mapping ∪ agents resolved from legacy scope mappings; tombstones show deleted agents (+ unowned deleted scopes). The team wizard collapses to `Team → Members → Access` with an agent picker. Wire frozen — both endpoints already existed || D7 | Connector access-grid people | The connectors list + connector-edit Access tab derive Teams/Users from the **agent-centric grants** (`/admin/agents/:name/{users,teams}`) merged across the connector's agents — NOT from the legacy scope-centric `/admin/contexts/:id/{users,teams}`. The operator's chain: connector → agent (scope allowlist) → user/team (Access/Agents tabs). Connector↔user/team direct grants remain out of scope (would need backend) |@@ -284,6 +285,7 @@ Tests updated in the same commit: `HostTable.test.tsx` (hover card now asserts a| 2026-08-27 | e2e | Video-format answer + MP4 pipeline: Playwright/Chromium records **WebM** natively (not MP4) — `qa:recorder:convert-mp4` added (`scripts/qa-recorder/convert-videos-mp4.sh`, ffmpeg H.264 + faststart, `--replace` to drop originals; round-trip verified against a synthetic clip). Recorder doc + §9 updated. **No video evidence exists yet anywhere in `.local-notes/` — zero journeys have been executed in this lane; videos are produced only when a journey runs against a live cluster.** || 2026-08-28 | e2e | **Execution campaign (mock-backed).** Full T2 bootstrap was ruled out on this host (7 GB RAM, ~3 available → OOM risk; both minikube profiles Stopped, stale branch.mk ownership → fail-closed per repo rules). Instead: built `scripts/qa-recorder/mock-control-api.mjs` — an in-memory control-api implementing the audited wire contract (auth cookie, resourceVersion/409 semantics, users/teams contexts mappings with deleted-history, hosts/contexts/mcp-servers CRUD, registry entries + install, budgets, recipes, rotation `DeploymentReady` simulation) — and ran the REAL control-ui dev server against it. Environment fights solved along the way: mock must bind dual-stack (`localhost` → `::1` first for Playwright's request context); Next dev daemon ignores env/port and grabs its own port (verify + set `CONTROL_UI_URL` per run); each playwright invocation wipes the outputDir (run batches in ONE invocation, copy evidence out after). Spec fixes found by real rendering: connectors rows use `role="button"` (kills `row` role; target `Expand/Collapse connector <name>`), team Access rows are `listitem`s, sort headers expose `Sort by access …` aria-names, tombstone rows persist after removal (assert actionability, not absence), toasts stack (`.last()`), 10s auto-refresh detaches click targets (retry), journeys must re-navigate after seeding (login pre-seed landing makes sidebar clicks no-ops). || 2026-08-28 | e2e | **Two REAL production bugs found by the journeys, fixed in `f2eebbc8a`:** (1) member detail page crashed wholesale — `accessLabeler` useMemo was declared after its consumer in `availableContextOptions` (TDZ ReferenceError; no unit tests covered those pages); (2) connectors-page search-by-agent silently broke in the Phase-1 rework (`summary.agents` emptied while the search haystack still reads it). Both fixed; search-by-agent locked with a new unit regression test (`McpServerTable.test.tsx`); unit suite now **1701/1701**, `tsc` clean. |+| 2026-08-28 | D9 | Operator review killed the "Removed access" tombstone section on member/team Access tabs (backend soft-delete history = bookkeeping, not UI). Section + dead CSS removed from both pages; `member-removed-access` journey rewritten to assert ZERO residue after an out-of-band scope deletion (no heading, no row, no raw id, clean empty state); `team-access` comment updated. Verified: `tsc` clean, unit suite green, 4 affected recorder journeys green against the mock stack (member-access ×3 incl. removed-access, team-access). || 2026-08-28 | D8 | **Access tabs = agents** (operator-approved design): member + team Access tabs rebuilt as agent tables with the shared Connectors column (extracted `components/ConnectorCountCell.tsx`, now also used by the Agents list — same pill, same hover, same click-through); separate "Agents" tabs folded in with legacy redirects; team wizard collapsed to 3 steps with an agent picker; writes are composite (`agents` + `contexts` mappings synced, legacy scope-only mappings preserved). Verified: `tsc` clean, unit suite green (2 known load flakes pass solo), and all 7 affected recorder journeys re-executed green against the mock stack (member-access ×3, team-access ×2, team-create, onboarding-combo). Spec fallout updated incl. api-client agent-mapping helpers and restore-agentNames hygiene. || 2026-08-28 | D7 | **Connector access grid now rides agent grants** (operator decision after flow review): connectors list + connector-edit Access tab fetch Teams/Users via `GET /admin/agents/:name/{users,teams}` merged across each connector's agents, replacing the legacy scope-centric `GET /admin/contexts/:id/{users,teams}` reads. Wire untouched (both endpoints already existed); `getContextUsers/getContextTeams` no longer called from the connectors surfaces. Mock control-api gained the agent-grant endpoints (reverse of the Users & Teams mappings). Verified: `tsc` clean, unit suite 1701/1701 (one unrelated 5s-timeout flake re-run green), and the affected recorder journeys re-executed green against the live mock stack (connectors-agent-access, connector-edit ×2 incl. the rotation journey). Canonical chain documented as: connector → agent (scope allowlist) → user/team (grants). || 2026-08-28 | ops | Operator stopped the machine mid-run (commit `3daf915d8` preserved the in-flight spec fixes — thank you). The interrupted final invocation still produced **37 passing journeys / 51 WebM videos + 132 PNG proofs**, preserved in `.local-notes/qa-recorder/evidence-final/`. Two core journeys (marketplace-install, recipe-scope-copy) were environment-killed mid-flight and re-queued; their root causes were fixed (recipe fixture needed `spec.triggers`; the L1 banner fires at the deploy step, not review — verified via validator probe: `validateRecipe` excludes the L1 check by design). Pre-existing journeys needing real cluster depth (rotation-demo, cost-usage/governance, llm-lifecycle/price, invitations, gfs) fail against the mock by design — they belong to the cluster/T2 lane. |