Invite UX polish and per-user onboarding flow #22

Closed
opened 2026-10-17 00:18:33 +00:00 by agent-pi · 1 comment
Collaborator

The acceptance side of invites works: an invitee redeems a single-use, expiring code at /invite/{code}. But there is no surface that mints an invite — no settings route, no CLI command; create_invite in the data layer has no caller anywhere in the app. Today the only way to onboard a second user is hand-inserting an invites row with sqlite.

Wanted:

  1. An admin-facing way to mint invite links (a section on the settings page is the natural home), producing the /invite/{code} URL to hand to the invitee.
  2. The onboarding polish this issue was originally filed for: what a new user sees first after redeeming, how they're guided to connect Jellyfin, and what expired/already-used invites look like to the invitee.

Spec §7 and §14 (Phase 2).

The acceptance side of invites works: an invitee redeems a single-use, expiring code at `/invite/{code}`. But there is **no surface that mints an invite** — no settings route, no CLI command; `create_invite` in the data layer has no caller anywhere in the app. Today the only way to onboard a second user is hand-inserting an `invites` row with sqlite. Wanted: 1. An admin-facing way to mint invite links (a section on the settings page is the natural home), producing the `/invite/{code}` URL to hand to the invitee. 2. The onboarding polish this issue was originally filed for: what a new user sees first after redeeming, how they're guided to connect Jellyfin, and what expired/already-used invites look like to the invitee. Spec §7 and §14 (Phase 2).
Author
Collaborator

Plan of attack (also carries #41 — the footer rides this branch as its own commit, per Marvin8):

Minting (admin-only, /settings)

  • New "Invites" section on the settings page, hidden for non-admins; the minting POST is a separate route gated by the existing require_admin dependency.
  • Form: optional note, expiry select (1/7/30 days, default 7). Minting generates a token_urlsafe code (same pattern as session tokens), inserts via the existing create_invite, and re-renders the settings page with the full https://…/invite/{code} URL highlighted for copy-paste.
  • Below the form: a table of outstanding invites (unused + unexpired) via a new list_open_invites data function, so links can be re-copied without minting duplicates.

Onboarding

  • After a successful redeem, invite_post mints a session with the existing new_session_token/create_session machinery, sets the cookie exactly as login_post does, and redirects to /settings — no forced second login.
  • Unusable invites currently raise bare HTTPException (JSON). Replace with rendered pages: 410 for expired/already-used ("ask for a fresh link"), 404 for unknown codes.

Branch: feat/issue-22-invite-minting-onboarding
Commits:

  • ✨ Mint invites from the settings page
  • ✨ Sign in new invitees on redemption
  • 🚸 Render friendly pages for unusable invites
  • 🚸 Add version, source, and docs footer (#41)

PR via Forgejo API targeting main with Closes #22 and Closes #41.

Plan of attack (also carries #41 — the footer rides this branch as its own commit, per Marvin8): **Minting (admin-only, `/settings`)** - New "Invites" section on the settings page, hidden for non-admins; the minting POST is a separate route gated by the existing `require_admin` dependency. - Form: optional note, expiry select (1/7/30 days, default 7). Minting generates a `token_urlsafe` code (same pattern as session tokens), inserts via the existing `create_invite`, and re-renders the settings page with the full `https://…/invite/{code}` URL highlighted for copy-paste. - Below the form: a table of outstanding invites (unused + unexpired) via a new `list_open_invites` data function, so links can be re-copied without minting duplicates. **Onboarding** - After a successful redeem, `invite_post` mints a session with the existing `new_session_token`/`create_session` machinery, sets the cookie exactly as `login_post` does, and redirects to `/settings` — no forced second login. - Unusable invites currently raise bare `HTTPException` (JSON). Replace with rendered pages: 410 for expired/already-used ("ask for a fresh link"), 404 for unknown codes. **Branch:** `feat/issue-22-invite-minting-onboarding` **Commits:** - :sparkles: Mint invites from the settings page - :sparkles: Sign in new invitees on redemption - :children_crossing: Render friendly pages for unusable invites - :children_crossing: Add version, source, and docs footer (#41) PR via Forgejo API targeting `main` with `Closes #22` and `Closes #41`.
Sign in to join this conversation.
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
marvin8/xique#22
No description provided.