fix(admin): delete user button now works reliably #279
Reference in New Issue
Block a user
Delete Branch "fix/delete-user"
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?
Summary
type=button+requestSubmit()pattern on the delete form with atype=submitbutton and an asyncuse:enhancecallback — the pattern the confirm service was designed for and documents in its JSDoccancel()if the user rejects, and callsunsaved.clearOnSuccess()before proceeding so thatbeforeNavigatecan't silently block the post-delete redirectdeleteFormElstate variable andhandleDeletefunctioncancel()calls instead ofrequestSubmit()spiesCloses #277
Test plan
/admin/users, deleted user gone from listnpx vitest run src/routes/admin/users— all 49 tests pass🤖 Generated with Claude Code
5b15991cf3tob6466fcd95