Repository navigation
Description
Task
T-087b· Milestone M8 — Dashboard · Size M · Priority P0 · Epic #8Implements FR-DSH-001 · FR-SCN-007
Branch
feat/t-087b-new-campaign-wizard-4-steps— one task = one branch = one PR (doc 32 §6)
Summary
Implement features/campaigns/wizard/ per doc 13 §3.2: Space (pin sliders, live dimension count), Robot & backend (disabled when no worker online, with explanation), Strategy (plain-language cards, budget/batch/seed, advanced params form generated from /meta JSON Schemas), Review (YAML preview equal to CLI config, estimated duration, Start now).
Context / motivation
US-002: start a campaign in ≤ 5 min with all defaults (SC-6).
Scope
In scope
- Form state with schema validation (zod generated from JSON Schema or ajv).
- Server errors mapped to fields via problem+json
errors[].pointer.
Implementation guidance
- Folder
features/campaigns/wizard/withWizardPage.tsx,steps/{SpaceStep,RobotStep,StrategyStep,ReviewStep}.tsx,wizardState.ts(reducer + derived values),toYaml.ts(deterministic YAML equal to theroboprobe campaign create -finput;yamlpackage with sorted keys). - Step 1:
useSpaces()+ version select; parameter table with range sliders (Radix Slider) to pin values (FR-SCN-007); live dimension count = enabled − pinned. - Step 2:
useSutProfiles(); backend radio cards disabled with an explanation whenuseWorkers()shows none online for that backend; repeats input. - Step 3: strategy cards from
/meta(descriptiontext from the API); budget, batch size (default = online workers for the chosen backend), seed (random default, editable); the Advanced accordion renders a form from the strategy's JSON Schema (params_schema) validated with Ajv (draft 2020-12). - Step 4: YAML preview with copy button; estimated duration =
budget × typical_episode_s(backend) / workers, with typical time taken from/metabackend capabilities (not hard-coded); "Start now" checkbox →POST /campaignswithstart: trueand anIdempotency-Key(uuid per wizard session). - Server-side 422 errors are mapped to steps/fields using
errors[].pointer; navigation jumps to the first step with an error. - Standards: respect the layering contracts (doc 16 §2) and conventions in doc 34; no hard-coded tunables — thresholds/defaults come from typed settings (doc 27); no magic numbers (ruff
PLR2004); public APIs typed (mypy strict) and documented.
Acceptance criteria
- Create flow works against MSW; server validation errors appear on the right fields.
- YAML preview round-trips with
roboprobe campaign create -f. - All defaults pre-filled: Next×3 + Create works with zero edits (SC-6).
- Double-clicking Create does not create two campaigns (idempotency).
- YAML preview snapshot equals the CLI fixture.
- Tests listed below added and green in CI; coverage of new code meets the gate in doc 18 §3.
- Docs, config reference and CHANGELOG
Unreleasedupdated where behaviour, keys or interfaces changed. - Definition of Done (doc 32 §3) satisfied.
Tests required
features/campaigns/wizard/*.test.tsx; Playwright flow in T-118.
Dependencies
Blocked by: #165 (T-085d), #166 (T-086a), #120 (T-060)
Blocks: #187 (T-118)
Parallelization notes
Files / paths owned by this task — avoid editing other paths; shared files (pyproject.toml entry points, cli/main.py, api/routers/__init__.py, router.tsx, docker/compose.yaml, ci.yml) are append-only:
web/src/features/campaigns/wizard/**
Independent feature folder.
Definition of Done
Per doc 32 §3 and AGENTS.md §5: lint, format, mypy strict and import-linter green; tests added and passing; docs updated; PR template completed with Closes #<this issue>; Conventional Commit messages referencing T-087b (doc 16 §6); commits authored only by the repository owner identity (AGENTS.md §4); CI green; reviewer checklist (doc 32 §5.1) satisfied.
References
Design docs: doc 13 §3.2 · doc 12 §3.1 · doc 03 §UC-02
Requirements: FR-DSH-001 · FR-SCN-007 (traceability: doc 28)
External:
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsBacklog
Activity
/config.json), SSE client with reconnect/Last-Event-ID and query-cache patching #165/meta(schemas for the wizard) #120feat(web): build Bench and campaign creation wizard (#303)
CodewithJha commentedon Nov 22, 2026
Shipped on main (merged PR).
fix(web): verify seeded Bench and campaign wizard (T-087a/b) (#313)