Skip to content

feat: add delete buttons to provider tests and standings tables - #4

Merged
tmimmanuel merged 1 commit into
mainfrom
feat/admin-delete-buttons
Jul 23, 2026
Merged

feat: add delete buttons to provider tests and standings tables#4
tmimmanuel merged 1 commit into
mainfrom
feat/admin-delete-buttons

Conversation

@tmimmanuel

Copy link
Copy Markdown
Contributor

Summary

  • Adds a Delete button (danger-styled, confirm dialog, per-row loading state) to each row of the "Single provider benchmark tests" table and the "Current standings" leaderboard table.
  • New deleteEvaluation/deleteSubmission API client functions in admin/src/lib/api.ts, calling the new DELETE /api/admin/evaluations/{id} and DELETE /api/admin/submissions/{id} backend endpoints (companion PR in minirouter, feat: add DELETE endpoints for evaluations/submissions + fix schema-lock contention minirouter#242).
  • New button-danger CSS utility and danger Button variant, following existing styling conventions (no prior destructive-button pattern existed in this repo).
  • Deleting a row filters it out of local state immediately; 401s route through the existing expireSession() flow like every other mutating call here.

Test plan

  • npm run build (tsc + vite build) passes
  • npm run lint (oxlint) passes
  • Manually delete a row in each table against a running backend and confirm it disappears and doesn't reappear on refresh

Adds a Delete action to each row of the "Single provider benchmark
tests" and "Current standings" tables, backed by new
DELETE /api/admin/evaluations/{id} and DELETE /api/admin/submissions/{id}
endpoints. Confirms via window.confirm, shows a per-row spinner while
in flight, and removes the row from local state on success (with the
usual 401 -> expireSession handling).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@tmimmanuel
tmimmanuel merged commit 12616fa into main Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant