WIZ-1 Onboarding state table + /onboarding/should-redirect trigger #672
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Blocks
Depends on
#673 WIZ-2 Wizard shell + 6-step stepper
charles/claude-hooks
#679 WIZ-8 Apply transaction + Done screen — atomic apply, master-key backup nag
charles/claude-hooks
#680 WIZ-9 Re-run wizard affordance + admin reset
charles/claude-hooks
#670 WIZ-prereq-A Role-keyed dispatch refactor + default type rename
charles/claude-hooks
#671 WIZ-prereq-B POST /agents/types/{old}/rename — transactional type rename
charles/claude-hooks
Reference
charles/claude-hooks#672
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User story
As a platform engineer, I want the
setuptable,/onboarding/stateendpoints, and the dashboard-level redirect logic, so that a fresh deploy lands the operator on the wizard automatically after their first OAuth login.Acceptance criteria
Schema
setuptable:Endpoints
GET /onboarding/statereturns the row (or default-shaped object on first access).PATCH /onboarding/statebody{ ...partial }upserts fields. Operator-auth-gated.POST /onboarding/skipsetsclaude-hooks/wizard-skippedcookie (90 d), returns 204.POST /onboarding/reset(admin-only) clears the row + cookie +wizard_completed_at. Hidden under admin route.GET /onboarding/should-redirectreturns{ redirect: bool }based on the trigger logic in the spec.Trigger
apps/web/src/main.tsxor app-shell init) fetches/onboarding/should-redirectonce on first dashboard load. Whenredirect: true, navigate to/onboarding.session presentANDagents_count === 0ANDsecrets_count === 0ANDwizard_completed_at === nullAND skip-cookie absent → redirect./onboardingis NOT session-gate-exempt — runs after OAuth.Tests
/onboarding/should-redirectreturns the right decision across boundary states (authed empty vs authed populated vs unauth).wizard_completed_atset) → redirect off.Out of scope
References
specs/first-login-wizard.md§Story WIZ-1apps/server/src/infrastructure/database/migrations/apps/web/src/main.tsx🤖 Auto-assigned to boss (heuristic: area:agents → boss (architecture-touching)). Reply
/unassignto reroute.