---
id: w2/m9/t004
title: Dashboard — Build & Deploy Auto-Deploy toggle + "deploys via GitHub" source indicator
worker: worker2
status: done
estimate: 40m
depends_on: [w2/m9/t003]
---

## Objective

Surface the loop in the dashboard: the service Settings → Build & Deploy section (w5/m13) gains Render's **Auto-Deploy** toggle (writes `autoDeploy` via the existing update path) and a source indicator showing whether pushes deploy hands-free ("via GitHub app") or need the manual HMAC webhook.

## Context

- Section lives from w5/m13: Source/Branch read-only + Root Directory editable — read `dashboard/CLAUDE.md` first.
- `autoDeploy` is already settable on create (REST `autoDeploy` → `spec.autoDeploy`, parity ledger create row); confirm/extend the PATCH/GraphQL update path carries it — if GraphQL lacks the mutation field, add it (flag as the usual uncaptured-Render-shape extension).
- Render's UI reference: Settings → Build & Deploy → Auto-Deploy (Yes/No), per `render.com/docs` deploys page.
- Indicator logic: App repo matches the workspace GitHub connection ⇒ "Auto-deploys via GitHub"; else show the manual webhook hint.

## Steps

1. Backend gap check: `autoDeploy` editable over PATCH + GraphQL; add if missing (small, same verb).
2. Toggle UI + confirm-less optimistic update, matching the rootDir edit pattern; i18n strings.
3. Indicator wired to `gitConnection` + repo match.
4. Playwright pass; screenshots with bare filenames.

## Files

- `dashboard/src/features/` (build & deploy section) + GraphQL documents
- `lego/backend/internal/apps/` (only if the update path lacks `autoDeploy`)

## Acceptance criteria

- [ ] Toggle flips `spec.autoDeploy` and survives reload
- [ ] Indicator distinguishes GitHub-app repos from manual-webhook repos
- [ ] Render-consistent placement in Build & Deploy

## Out of scope

- Create wizard (`w5/m15`)
