Skip to content

feat: add project reset with confirmation to general settings#135

Merged
liamwalder merged 2 commits intodevelopfrom
feat/project-reset-settings
Apr 6, 2026
Merged

feat: add project reset with confirmation to general settings#135
liamwalder merged 2 commits intodevelopfrom
feat/project-reset-settings

Conversation

@lunenas
Copy link
Copy Markdown
Collaborator

@lunenas lunenas commented Apr 6, 2026

Summary

Add a working "Reset project" button in the general settings danger zone that resets the database via the existing devtools API, with a confirmation dialog to prevent accidental data loss.

Changes

  • Wire up the "Reset project" button to open a confirmation dialog
  • Add confirmation dialog warning that the action is permanent and cannot be undone
  • Call POST /ycode/api/devtools/reset-db on confirm, with loading state and error handling via toast
  • Redirect to /ycode on successful reset

Test plan

  • Navigate to Settings → General → Website tab, scroll to "Danger zone"
  • Click "Reset project" — confirmation dialog should appear
  • Click "Cancel" — dialog should close, nothing happens
  • Click "Reset project" in dialog — should show spinner, reset the database, and redirect to /ycode
  • Verify error toast appears if the API call fails (e.g. network error)

Made with Cursor

Wire up the "Reset project" button in the danger zone section to call
the existing reset-db API endpoint, gated behind a confirmation dialog
that warns the action cannot be undone.

Made-with: Cursor
@lunenas lunenas added the Feature request A new feature request label Apr 6, 2026
@lunenas lunenas self-assigned this Apr 6, 2026
@lunenas lunenas added the Feature request A new feature request label Apr 6, 2026
@liamwalder liamwalder merged commit f153e49 into develop Apr 6, 2026
3 checks passed
@liamwalder liamwalder deleted the feat/project-reset-settings branch April 6, 2026 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature request A new feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants