Dashboard: repos page #7

Open
opened 2026-08-07 12:39:44 +00:00 by grenade · 0 comments
Owner

Part of #1. Depends on: Repo CRUD over /v1

Goal

Replace the placeholder on /repos with a working page: list tracked repos, add
one, remove one, and edit each one's schedule and quiet window.

This is what closes stage 1's done-when — a repo's cadence changeable without a
redeploy. @tanstack/react-query is already a dependency and unused; use it
rather than hand-rolled fetch state.

Types come from src/api/generated, written by ts-rs from the Rust domain
types. Do not hand-write interfaces that duplicate them, and do not edit the
generated files.

Files

  • dashboard/src/routes/Repos.tsx — the page
  • dashboard/src/api/repos.ts — new; typed query and mutation hooks
  • dashboard/src/main.tsx — install the react-query provider
  • dashboard/src/index.css — styles for the table and form

Steps

  1. Add a QueryClientProvider at the app root.
  2. Write typed hooks over api.get/post/patch/delete in api/client.ts,
    importing TrackedRepo and PollSchedule from api/generated.
  3. Render the repo list: forge, owner/repo, default branch, interval, enabled,
    last polled.
  4. Add a form to add a repo, and a per-row control to remove one, with a
    confirmation on remove.
  5. Make interval, quiet window and enabled editable inline, invalidating the
    list query on success.
  6. Show the server's clamped interval after saving, so a user who asks for 30s
    sees that they got 120s rather than believing otherwise.
  7. Show errors from the API in the UI. A failed mutation must not look like a
    successful one.

Acceptance

  • cd dashboard && npm run lint && npm run build
  • cargo test --workspace (unchanged, but the gate is the whole gate)
  • Adding, editing and removing a repo works against a running API, and the list
    reflects each change without a page reload.

Out of scope

  • The Jobs and Lanes pages. They stay placeholders until stages 2 and 3.
  • Authentication or any notion of a user.
  • Editing files under src/api/generated — they are written by
    cargo test -p tireless-entities. If a type is wrong, change the Rust.
  • A component library or CSS framework. The dashboard is deliberately small;
    keep it that way.
Part of #1. Depends on: Repo CRUD over /v1 ## Goal Replace the placeholder on `/repos` with a working page: list tracked repos, add one, remove one, and edit each one's schedule and quiet window. This is what closes stage 1's done-when — a repo's cadence changeable without a redeploy. `@tanstack/react-query` is already a dependency and unused; use it rather than hand-rolled fetch state. Types come from `src/api/generated`, written by ts-rs from the Rust domain types. Do not hand-write interfaces that duplicate them, and do not edit the generated files. ## Files - `dashboard/src/routes/Repos.tsx` — the page - `dashboard/src/api/repos.ts` — new; typed query and mutation hooks - `dashboard/src/main.tsx` — install the react-query provider - `dashboard/src/index.css` — styles for the table and form ## Steps 1. Add a `QueryClientProvider` at the app root. 2. Write typed hooks over `api.get`/`post`/`patch`/`delete` in `api/client.ts`, importing `TrackedRepo` and `PollSchedule` from `api/generated`. 3. Render the repo list: forge, owner/repo, default branch, interval, enabled, last polled. 4. Add a form to add a repo, and a per-row control to remove one, with a confirmation on remove. 5. Make interval, quiet window and enabled editable inline, invalidating the list query on success. 6. Show the server's clamped interval after saving, so a user who asks for 30s sees that they got 120s rather than believing otherwise. 7. Show errors from the API in the UI. A failed mutation must not look like a successful one. ## Acceptance - `cd dashboard && npm run lint && npm run build` - `cargo test --workspace` (unchanged, but the gate is the whole gate) - Adding, editing and removing a repo works against a running API, and the list reflects each change without a page reload. ## Out of scope - The Jobs and Lanes pages. They stay placeholders until stages 2 and 3. - Authentication or any notion of a user. - Editing files under `src/api/generated` — they are written by `cargo test -p tireless-entities`. If a type is wrong, change the Rust. - A component library or CSS framework. The dashboard is deliberately small; keep it that way.
grenade added the tireless/implement label 2026-08-07 12:40:56 +00:00
Sign in to join this conversation.