Skip to content

feat(admin-ui): Invites tab — wire FO-1b backend to admin React app - #247

Merged
dwinter3 merged 1 commit into
mainfrom
feat/admin-invites-page
May 13, 2026
Merged

feat(admin-ui): Invites tab — wire FO-1b backend to admin React app#247
dwinter3 merged 1 commit into
mainfrom
feat/admin-invites-page

Conversation

@dwinter3

Copy link
Copy Markdown

Closes task #217. P2 of MVP path.

Adds InvitesPage.tsx + types + api methods wiring the FO-1b /admin/invites endpoints into the admin React UI. Modal for create (email + role + target_l2_id), status-filtered list, revoke action, status/role badges matching existing PersonasPage style.

Test plan

  • pnpm tsc --noEmit
  • pnpm biome check
  • pnpm build (production Vite bundle)
  • Live: provision fresh L2, log in as admin, send invite to dw+test@8th-layer.ai, confirm SES delivery, click magic link, register passkey, end up in admin UI
  • Verify P1 slug router proxies /invite/ from .8th-layer.ai to L2 ALB

🤖 Generated with Claude Code

…P2 / task #217)

Closes the gap between FO-1b (invite endpoints shipped) and a usable
multi-human onboarding flow. Before this, the only way to add invites
to an L2 was a manual curl POST to /admin/invites — no admin-UI path.

Adds InvitesPage.tsx with:
  - Status-filtered list (pending / claimed / expired / revoked / all)
  - "+ Invite member" modal: email + role (enterprise_admin / l2_admin / user)
    + target_l2_id when role != enterprise_admin
  - Revoke action on pending invites
  - Status + role badges matching existing PersonasPage style tokens
  - Empty-state, loading-skeleton, error-banner patterns mirroring
    existing admin pages

Types: InvitePublic, InvitesPublic, InviteRole, InviteStatus,
CreateInviteRequest mirror the backend Pydantic shapes in
invite_routes.py exactly.

API: api.listInvites(status?), createInvite(body), revokeInvite(id).

Route: /admin/invites mounted under the existing ProtectedRoute +
Layout chrome.

Out of scope (for the next PR):
  - Layout.tsx nav-link addition (depends on where the team wants
    Invites in the sidebar — left for the operator to slot in)
  - Component tests (mirroring PersonasPage.test.tsx pattern)

Validated: pnpm tsc --noEmit + pnpm biome check both clean; production
build successful (Vite bundle).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@dwinter3
dwinter3 merged commit 146173a into main May 13, 2026
5 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