Skip to content

Add Synvya-themed support-admin user detail view#15

Merged
alejandro-runner merged 1 commit intosynvya-stagingfrom
feature/synvya-admin-user-detail
Apr 14, 2026
Merged

Add Synvya-themed support-admin user detail view#15
alejandro-runner merged 1 commit intosynvya-stagingfrom
feature/synvya-admin-user-detail

Conversation

@alejandro-runner
Copy link
Copy Markdown
Member

Summary

  • Adds a light Synvya theme variant to /support-admin, activated only on auth.synvya.com / auth.staging.synvya.com via the existing getLoginUrl() switch. diVine deployments render unchanged.
  • Surfaces per-user team memberships, their team-owned restaurant keys, and the NIP-46 authorizations on each key (with Synvya Server (24/7) vs Synvya Client (interactive) accents).
  • New backend endpoint GET /api/admin/user-teams?pubkey=<hex> (support-admin only, tenant-scoped), lazy-loaded from the frontend on row expand.
  • Reflects the Keycast boundary: authorizations are team-scoped, not user-scoped — the UI shows them under the restaurant key with a "shared across the team" hint.

Access

Same URL as today: https://auth.staging.synvya.com/support-admin. Gated by the existing is_support_admin UCAN check.

Test plan

  • Log in as a support admin on auth.staging.synvya.com/support-admin and confirm the white Synvya theme renders
  • Search a Synvya user that belongs to a restaurant team; expand the row and verify Teams & Restaurants + Authorizations load
  • Confirm Synvya Server (staging) auth shows the green 24/7 pill; Synvya Client (staging) shows the blue interactive pill
  • Search a user with no team membership — expect "This user is not a member of any team."
  • On a diVine deployment (if applicable), confirm the dark theme still renders and the new section does not appear
  • Confirm non-admins hit "Access Denied"; confirm GET /api/admin/user-teams returns 403 for non-admin tokens

🤖 Generated with Claude Code

Adds a light Synvya theme variant to /support-admin and surfaces per-user
team memberships with their team-owned restaurant keys and NIP-46
authorizations. The theme activates only on auth.synvya.com /
auth.staging.synvya.com via the existing getLoginUrl() switch, so diVine
deployments are unchanged.

Backend:
- New GET /api/admin/user-teams?pubkey=<hex> (support-admin only,
  tenant-scoped) returning teams → restaurant_keys → authorizations with
  label, bunker pubkey, relays, connected/expires/created timestamps.

Frontend:
- Support-admin page dual-modes via isSynvyaManaged; Synvya variant uses
  a white admin surface with Synvya logo header.
- New "Teams & Restaurants" section (Synvya-only) lazy-loads user-teams
  on expand and groups authorizations under their restaurant key, with
  visual accents for Synvya Server (24/7) vs Synvya Client (interactive)
  labels and a "shared across the team" hint reflecting the Keycast
  boundary: authorizations are team-scoped, not user-scoped.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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