Skip to content

PR-B5-B — Control Center Interaction Admin View - #33

Merged
man4ish merged 1 commit into
mainfrom
feature/pr-b5b-interaction-control-center
Aug 10, 2026
Merged

PR-B5-B — Control Center Interaction Admin View#33
man4ish merged 1 commit into
mainfrom
feature/pr-b5b-interaction-control-center

Conversation

@man4ish

@man4ish man4ish commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds the Control Center half of B5: a backend proxy and a platform-admin
frontend page exposing omnibioai-auth's already-merged
PR-B5-A #39
(GET /platform/interactions[/{interaction_id}]).

  • auth-service remains authoritative -- require_permission(manage_all_orgs),
    unmodified, is the only real authorization check. This proxy makes no
    authorization/RBAC decision of its own.
  • No Gateway involvement -- follows the exact established pattern
    (routes_audit_proxy.py, routes_sessions_proxy.py): Control Center's
    backend talks directly to auth-service via IAM_URL.
  • No schema changes, no JWT/RBAC changes, no new permission, no new
    producer/worker changes.
  • Pagination/filtering follow the Audit Logs precedent, not Sessions
    -- B5-A's contract (paginated, filtered, manage_all_orgs-gated) matches
    Audit Events' shape exactly, not Sessions' self-service/unpaginated one.
    See this PR's own prior discovery report for the full reasoning.
  • Metadata gets the established client-side defense-in-depth masking
    (maskSensitiveFields, ported verbatim from audit.ts) -- not a
    substitute for the backend's own redaction guarantee, an additional
    layer on top of it, matching this codebase's existing convention for
    any free-form JSON field reaching the DOM.
  • Self-service/org-scoped interaction history remains intentionally
    deferred
    -- same open question Sessions' own precedent defers too.

Scope

backend/src/control_center/api/routes_platform_interactions_proxy.py  (new)
backend/src/control_center/main.py                                    (+2 lines)
backend/tests/test_routes_platform_interactions_proxy.py              (new)
frontend/cc-ui/src/interactions.ts                                    (new)
frontend/cc-ui/src/pages/InteractionsPage.tsx                         (new)
frontend/cc-ui/src/pages/InteractionsPage.test.tsx                    (new)
frontend/cc-ui/src/navigation.ts                                      (+1 PageKey, +1 NavItem)
frontend/cc-ui/src/navigation.test.ts                                 (+1 describe block)
frontend/cc-ui/src/apps/AdminApp.tsx                                  (+1 case, +1 context value)
frontend/cc-ui/src/apps/AdminApp.test.tsx                             (+3 tests)
frontend/cc-ui/tsconfig.app.tsbuildinfo                                (build-cache companion, tracked)

11 files. docker/nginx/api-proxy.conf not touched -- its existing
generic /platform location (added for routes_audit_proxy.py) already
covers /platform/interactions. No other repository touched.

Validation

  • Backend focused: 17/17 passed. Full backend suite: 924 passed,
    99.79% coverage (gate 98%), 0 failures.
  • Frontend focused: 18/18 (page) + 6 (nav) + 3 (AdminApp) passed. Full
    frontend suite: 405 passed across 33 files, 0 failures.
  • tsc -b: clean, 0 errors.
  • Both containers built successfully via docker compose build
    (control-center, control-center-web) -- the frontend build is a
    real Vite production build, not just tsc/vitest.
  • Backend verified to actually start: ran the freshly built image as an
    isolated, throwaway container (never touching the live stack) on the
    studio network; /health returned 200, and the new route matched
    correctly end-to-end -- confirmed via server logs that the proxy
    forwarded to http://auth-service:8001/platform/interactions exactly
    as designed. That specific live smoke test returned a 404 from
    auth-service itself, not from this PR's code: the currently
    running auth-service container predates PR-B5-A's merge (last
    rebuilt during the B4 deployment task, before B5-A existed) and
    genuinely lacks routes_platform_interactions.py -- confirmed
    directly. This is a pre-existing deployment-lag issue in the shared
    dev environment, unrelated to and unaffected by this PR; redeploying
    auth-service is outside this PR's scope (omnibioai-auth is
    explicitly not touched here).
  • git diff --check: clean. Scope verified exact -- no other repository
    modified.

🤖 Generated with Claude Code

PR-B5-B: Control Center backend proxy + frontend admin page for
omnibioai-auth's already-merged GET /platform/interactions[/{id}]
(PR-B5-A #39). auth-service remains the sole authorization boundary
(require_permission(manage_all_orgs), unmodified, reused) -- no
Gateway involvement, no new permission, no JWT/session changes, no
schema changes, no new producer/worker changes.

Backend: routes_platform_interactions_proxy.py, mirroring
routes_audit_proxy.py/routes_sessions_proxy.py's exact thin-relay
shape -- forwards Authorization header and query params unchanged,
forwards upstream status/body unchanged, 503 on connection failure,
no authorization/RBAC/transformation/enrichment/redaction of its own.
No nginx change needed: docker/nginx/api-proxy.conf's existing generic
/platform location already covers it.

Frontend: InteractionsPage.tsx follows AuditLogsPage.tsx's governing
precedent (paginated, filtered, platform-admin-gated, free-form JSON
metadata) rather than SessionsPage.tsx's self-service/unpaginated
shape -- see this PR's own discovery report for why. Free-text filters
for service/interaction_type/status (Interaction has no fixed,
backend-enforced vocabulary for these, unlike AuditEvent.event_type),
dropdown for organization (reuses existing fetchPlatformOrgs), page-
local detail modal with the same client-side defense-in-depth metadata
masking convention audit.ts already established (ported, not
reinvented) -- never a substitute for the backend's own guarantee.
Nav/route gating reuses hasPlatformAdminAccess() exactly as Audit Logs
does -- no new permission helper.

Tests: 17 new backend proxy tests, 18 new frontend page tests, plus
navigation.test.ts/AdminApp.test.tsx coverage for the new nav item and
render case. Full suites: backend 924 passed (99.79% coverage, gate
98%), frontend 405 passed across 33 files, 0 failures either side.

Deferred (see report): self-service/org-scoped interaction history,
display-name enrichment, clickable trace/interaction IDs, a fixed
status vocabulary, URL-persisted filters.
@man4ish
man4ish merged commit 8862e0a into main Aug 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant