---
id: w5/m15/t002
title: Repo picker over repos query — search, default branch, connect-prompt empty state
worker: worker5
status: todo
estimate: 45m
depends_on: [w5/m15/t001]
---

## Objective

The GitHub tab lists the connected installation's repos (GraphQL `repos`, from w2/m8): client-side search/filter, private badge, default branch shown; picking one pre-fills repo/branch in the settings form. Without a connection (or backend 503), the tab shows a connect prompt linking to the Settings card (w2/m8/t006) instead of a dead list.

## Context

- Blocked on **w2/m8** (the `repos` query + `gitConnection`). Build against the schema once it lands.
- Render's UX: repo list with search + "Connect" per repo, plus a "configure GitHub App" escape hatch (`render.com/docs/github`); mirror the list + search, one-click pick.
- Refetch on window focus so a connect round-trip in another tab shows repos without reload (same trick as the settings card).

## Steps

1. GraphQL documents + codegen for `repos`/`gitConnection`.
2. List UI: search box, repo rows (fullName, private badge, default branch), loading/empty/error states.
3. Connect-prompt empty state for no-connection and 503.
4. Selection → wizard state (`repo`, `branch` = default branch).

## Files

- `dashboard/src/features/services/create/repo-picker.tsx` (new) + GraphQL documents

## Acceptance criteria

- [ ] Connected: repos listed, searchable, pick pre-fills the form
- [ ] Not connected / 503: actionable connect prompt, no crash

## Out of scope

- Grant management (lives on GitHub; the Settings card deep-links it)
