Dashboard: repos page #7
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #1. Depends on: Repo CRUD over /v1
Goal
Replace the placeholder on
/reposwith a working page: list tracked repos, addone, 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-queryis already a dependency and unused; use itrather than hand-rolled fetch state.
Types come from
src/api/generated, written by ts-rs from the Rust domaintypes. Do not hand-write interfaces that duplicate them, and do not edit the
generated files.
Files
dashboard/src/routes/Repos.tsx— the pagedashboard/src/api/repos.ts— new; typed query and mutation hooksdashboard/src/main.tsx— install the react-query providerdashboard/src/index.css— styles for the table and formSteps
QueryClientProviderat the app root.api.get/post/patch/deleteinapi/client.ts,importing
TrackedRepoandPollSchedulefromapi/generated.last polled.
confirmation on remove.
list query on success.
sees that they got 120s rather than believing otherwise.
successful one.
Acceptance
cd dashboard && npm run lint && npm run buildcargo test --workspace(unchanged, but the gate is the whole gate)reflects each change without a page reload.
Out of scope
src/api/generated— they are written bycargo test -p tireless-entities. If a type is wrong, change the Rust.keep it that way.