DOB-3: Setup wizard seeds the minimum at scope='global' from code-side presets #795
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
#793 DOB-1: Resolver — drop scope='builtin', fall through to code-side defaults
charles/claude-hooks
Reference
charles/claude-hooks#795
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?
As an operator booting a fresh
claude-hooksinstall, I want the first-login wizard to seed a usable minimum directly into the DB atscope='global'(no JSON file involved), so that I can pick a preset (Blank / TypeScript / Rust / …) and immediately have a working service — withoutsyncBuiltinsFromReporunning.Today the wizard relies on
syncBuiltinsFromRepopopulatingscope='builtin'rows. Once DOB-1 + DOB-2 land, builtin rows don't exist and the resolver doesn't read them — so the wizard needs its own seed path.Acceptance criteria
Presets module
apps/server/src/setup/presets.tsexports a typed map of presets: Shape includes whatever the wizard needs to write so the operator's first dispatch works (one or moreagent_typerows, label catalog entries, optional service overrides). No more, no less — bare minimum.seedPreset(presetName, db)writes the preset's contents asscope='global'rows via the same CRUD code paths the dashboard uses (no direct INSERTs that bypass validation / audit logging).Wizard wiring
seedPreset(...)instead of relying onsyncBuiltinsFromRepo.config_revision) records each row written by the preset withactor='setup-wizard'so the operator can see what was seeded and revision-restore it.Tests
seedPreset('typescript')→ expectedscope='global'rows present, noscope='builtin'rows ever written.seedPreset('blank')→ zero rows written, dashboard service-config endpoint returns the code-side defaults.seedPresetis idempotent (or rejects with a clear message — pick one and document inline).Out of scope
syncBuiltinsFromRepo(DOB-4) — until DOB-4 ships, both paths can coexist; once DOB-4 lands, only the wizard seeds.config/starter-packs.jsonshipped — port one-for-one, polish later.References
apps/web/src/routes/setup.*,apps/server/src/setup/,apps/server/src/infrastructure/agent-env-sync/builtin-sync.ts(current logic to mirror).specs/first-login-wizard.md.🤖 Auto-assigned to code-lead (heuristic: area:dashboard + body 2841 bytes (> 2 KB) — code-lead (heavy)). Reply
/unassignto reroute.