---
id: w5/m16/t002
title: Build the instance-count stepper component
worker: worker5
status: done
estimate: 30m
depends_on: [w5/m16/t001]
---

## Objective

Build the stepper component: read current `replicas` from the existing `services` query, +/- controls, client-side bounds validation mirroring the backend's (reject <1).

## Context

- Backend bounds: `w2/m12/t001` — `N ≥ 1`, upper bound from tier/sane cap (`lego/backend/internal/apps/service.go`).
- Follow the m7 instance-type picker's component structure for consistency.

## Steps

1. Add a stepper component matching the t001 capture's visual pattern (shadcn primitives per `dashboard/CLAUDE.md`).
2. Source current count from the existing `services` GraphQL query — no new query needed.
3. Client-side reject <1 before submit, matching the backend's bound.

## Files

- `dashboard/src/routes/services.$serviceId.settings.tsx`
- new component file alongside it if the settings route is already large

## Acceptance criteria

- [ ] Stepper renders the current instance count and enforces the same lower bound as the backend.

## Out of scope

- Wiring the mutation (t003).
