Skip to Content
Living documentation — last reviewed 2026-05-28
FeaturesAdmin AppAdmin App — QA Plan

Admin App — QA Plan

Access control

StepExpected
Sign in as a Clerk user without platformRole = 'admin'Every /admin/** request returns 403; UI shows “Platform admin access required”.
Sign in as a Clerk user with platformRole = 'admin'Resources load.
Demote an admin in Clerk while they have an open sessionAccess persists for up to 5 minutes (Redis TTL). Confirm and document.
Manually delete platform-admin:<clerkId> from RedisNext request re-fetches from Clerk and reflects the new role.

Audit trail

StepExpected
Reset a user’s passwordaudit_logs row with action = 'user.reset_password', actor_clerk_id = caller, metadata.adminAction = true.
Refund a payment without a reasonAPI rejects with 400.
Refund a payment with reasonaudit_logs carries metadata.reason.
Impersonate a userAudit row carries metadata.impersonatedUserId; PostHog admin.impersonate event captured.

Pages — smoke

PageSmoke check
Organizations listLoads paginated; filter by tier returns matching rows.
Organization detailMembers, subscriptions, audit recent panel render.
Users listSearch by email returns the right user.
PaymentsFilter by status: failed returns failed transactions.
SubscriptionsSort by next_charge_date ascending.
LeadsReassign a lead to an org; status changes.
JobsFilter by status / source; retry a failed import.
Audit LogsFilter by actor, by resource, by metadata.agent = true.
QueuesEach BullMQ queue listed; pause + resume work.
SystemHealth pings return green.
CostsDaily spend chart renders; export to CSV works.
BillingOrg with outstanding debt shows the debt total.
Platform BillingMRR + tier distribution match the platform-billing service.
ObservabilityRecent agent traces visible; click-through to PostHog deep link works.
Actions”Rebuild cache” action returns success; an audit row appears.
Canonical MovementsEdit a canonical exercise; change persists.

Negative / error paths

  • API returns 500 on /admin/organizations → admin app surfaces an Ant Design error toast with the message and a copy-trace-id action.
  • API returns 401 (token expired) → Clerk refreshes the token; retry succeeds.
  • API returns 403 on a previously-allowed user → admin app shows “Access revoked” and routes to /login.

Performance

  • Org list page should render < 1s on a warm cache; < 3s cold.
  • Queues page polls every 10s — no thundering herd against the API on tab focus.

Localization

  • Admin app is English-only. No i18n. Confirm Hebrew/Russian Clerk users see English UI without breaking.

Deploy

  • Vercel preview deployments must not be indexable. Robots disallow + Vercel preview password gate.
  • Production domain must not be reachable from the marketing site (avoid accidental leak via internal link).