Skip to content

Add sites CRUD with admin UI on status page - #22

Merged
jasoncrawford merged 1 commit into
mainfrom
sites-crud
Feb 18, 2026
Merged

jasoncrawford merged 1 commit into
mainfrom
sites-crud

Conversation

@jasoncrawford

Copy link
Copy Markdown
Collaborator

Summary

  • Server actions for add, edit, and delete sites (src/app/sites/actions.ts) with auth checks
  • "Add site" dashed card in the sites grid (admin-only, inline form)
  • Edit pencil icon on each site card with inline edit/delete overlay (admin-only)
  • Status page now checks auth and conditionally shows admin controls
  • 8 new tests covering all CRUD operations and auth enforcement

Closes #6

Test plan

  • Verify addSite inserts a site and revalidates /
  • Verify editSite updates name/url and revalidates
  • Verify deleteSite removes a site
  • Verify unauthenticated users see no admin controls
  • Verify unauthenticated CRUD requests redirect to login
  • All 51 tests pass, build succeeds

🤖 Generated with Claude Code

Server actions for add, edit, and delete sites with auth checks.
Admin-only UI on the status page: dashed "Add site" card and
edit pencil icon on each site card with inline edit/delete form.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jasoncrawford
jasoncrawford merged commit f8d5b73 into main Feb 18, 2026
1 check passed
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.

Implement sites CRUD (admin)

1 participant