---
id: w5/m15/t003
title: Settings form — name, branch, root directory, instance type, env vars
worker: worker5
status: todo
estimate: 45m
depends_on: [w5/m15/t002]
---

## Objective

The second wizard step, Render-shaped: **Name** (DNS-label validation matching `store.ValidAppName`), **Branch** (default `main` or the picked repo's default), **Root Directory** (optional, monorepo), **Instance type** (reuse the plan-picker cards from w5/m7), **Environment variables** (key/value rows, add/remove) — plus, for the image source, the image ref instead of branch/rootDir.

## Context

- Field set mirrors what bex's create actually honors (parity ledger create row): `type`/`name`/`repo`/`branch`/`rootDir`/`image`/`envVars`/`plan`/`numInstances`/`healthCheckPath` — don't render fields bex ignores (no region/runtime/buildCommand; bex auto-detects Dockerfile/CNB).
- Render's form collects region/runtime/build/start commands — deliberately omitted; note the divergence for t006.
- Reuse: plan cards (w5/m7), env-var row editor patterns from the Environment tab (w4/m6.5).
- Client-side validation mirrors server rules so errors appear pre-submit; server errors still render (t004).

## Steps

1. Form component with per-source field visibility (repo vs image).
2. Validation (name pattern, required-ness per source, env key syntax).
3. Wire from both t001's URL/image tabs and t002's repo pick.

## Files

- `dashboard/src/features/services/create/settings-form.tsx` (new)

## Acceptance criteria

- [ ] All fields round-trip into wizard state; invalid input blocked pre-submit with i18n messages
- [ ] Plan cards + env-var editor reused, not re-implemented

## Out of scope

- Secret files / env-group linking at create time (post-create Environment tab covers them)
