Skip to content

feat: admin page, Google sign-in and invite pages - #121

Merged
flexdinesh merged 1 commit into
feat/google-invitesfrom
feat/admin-web
Oct 26, 2026
Merged

flexdinesh merged 1 commit into
feat/google-invitesfrom
feat/admin-web

Conversation

@flexdinesh

@flexdinesh flexdinesh commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Stack 3/3: admin page, Google sign-in and invite pages.

  • Behavior owner and resulting change: admin.tsx (new) renders /admin for the admin only: Invites (create with the one-time link shown once with Copy, status badges, revoke with confirmation; setup hint when Google is not configured) and Accounts (disable and delete with confirmation, enable; no actions on the admin). account.tsx: Sign in offers "Continue with Google" when configured and reports callback outcomes once (?signin= cleared); /invite reads the fragment, drops it from history, looks up the invite, shows the email and starts Google sign-in with it (re-reads on hashchange); Settings shows a Google user's email and links the admin page; shared AccountPage layout. main.tsx routes /invite and /admin; members and local mode are redirected away from /admin.
  • Contracts/invariants affected; local/remote implications: AccountUser gains required nullable email (latest Google email; null for the admin), served by a new GoogleEmail read. Anonymous auth requests (Google start, invite lookup and start) carry no CSRF and never trigger sign-out. Local mode unaffected.
  • Validation results; remaining risks: mise run check and pre-push pass. New browser tests: Google start without CSRF and callback message once, no Google action when unconfigured, invite page (secret hidden, start with token), unusable invite, second invite in the same tab, member email and no admin access, admin invite create/link/revoke, disable/enable/delete with confirmation and CSRF. Real binary in a browser: setup, Settings link, /admin invite creation, signed-out /invite, revoke then invalid link; "Continue with Google" reached Google (fake client rejected as expected). Member actions were exercised with mocked routes and Go tests, not a real Google account.
  • Intentional architecture/design changes and rationale: the plan asked Settings to show a Google user's email, which needed the bootstrap contract change above. Disable asks for confirmation because it revokes API tokens irreversibly.
  • UI evidence: light theme desktop (1280) screenshots of /admin and /invite reviewed; existing primitives only (Button, Input, Badge status tones, ConfirmDialog, ErrorState); confirm dialogs focus Cancel; all actions keyboard reachable with labels; check:design passes; Pierre untouched.

/admin lists accounts (disable, enable, delete with confirmation) and
invites (create with a one-time link, status, revoke). Sign in offers
Google with callback outcomes; /invite shows the invited email and starts
Google sign-in. Settings shows a Google user's email and links the admin
page. Bootstrap user gains email.
@flexdinesh
flexdinesh added this pull request to stack #122 October 26, 2026 13:32
@flexdinesh
flexdinesh merged commit f6065cc into main Oct 26, 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