frontend: add Create-profile setup screen for brand-new accounts

LoginGate now shows CreateProfile (display name only) instead of App when
an authenticated session has no provisioned geniusrun profile yet, backed
by the new POST /api/setup endpoint and session/me's has_profile flag.
This commit is contained in:
2026-07-25 18:42:23 +02:00
parent d62544f1cc
commit 7f5d2da6a2
5 changed files with 115 additions and 2 deletions

View File

@@ -46,6 +46,11 @@ export const api = {
// browser navigation. Logout must POST (see server.go's route), which an
// <a href> can't do, hence the form.
getSessionInfo: () => request<SessionInfo>("/api/session/me"),
setup: (displayName: string) =>
request<{ user_id: number; display_name: string }>("/api/setup", {
method: "POST",
body: JSON.stringify({ display_name: displayName }),
}),
// Auth
login: () => request<AuthResponse>("/api/auth/login", { method: "POST" }),