Fix #39: settings Danger Zone + delete repository #56
No reviewers
Labels
No labels
actions
bug
cli
duplicate
enhancement
fork
forum
git storage
help wanted
insights
invalid
issues
moderation
oidc
ownership transfer
packages
pr/merge protection rules
projects
pull requests
question
releases
sponsorships
tags
webhooks
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub!56
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/issue-39"
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?
Adds a Danger Zone section at the bottom of the repo settings page with Delete Repository as the first entry (typed exact owner/name confirm + disabled-until-match button + double-submit guard; success navigates to /; failures surface plain-text).
No new backend: DELETE /{o}/{r}/api (both lanes, admin-only, 204) + SDK repo.delete() already exist and are httptest-covered — this wires them. Docs: 01 §5.1 (delete + fork/GC semantics: children survive, stale forks.json entries tolerated as miss=skip) + Decisions entries in 01 and 08.
Tests: node --test web/test/unit/*.test.js 238/238 green (incl. 3 new danger matcher tests); vite build clean; real headless-Chrome drive of /demo/walgit/settings in dark + light, zero console errors, full flow verified (arm/disarm states, real DELETE, navigate to /, repo gone server-side). No new deps. No Go changes (coverage gate N/A).
Backend already provides DELETE /{o}/{r}/api on both lanes (admin-only, 204, manifest-first delete) with SDK mirror repo.delete() — this change wires the UI: Danger Zone section at the bottom of Settings, reusable DangerConfirm typed-confirm (exact owner/name, busy guard), success navigates to / since the repo is gone. Docs: 01 §5.1 delete + fork/GC semantics, 08 §2 DangerConfirm contract.