diff --git a/pkg/hold/admin/handlers_crew.go b/pkg/hold/admin/handlers_crew.go index d64bb50..0f872c7 100644 --- a/pkg/hold/admin/handlers_crew.go +++ b/pkg/hold/admin/handlers_crew.go @@ -614,12 +614,13 @@ func (ui *AdminUI) handleCrewDelete(w http.ResponseWriter, r *http.Request) { slog.Info("Crew member removed via admin panel", "did", member.Member, "by", session.DID) - // For HTMX requests, return 204 No Content. The row uses + // For HTMX requests, return an empty 200. The row uses // hx-swap="outerHTML" so htmx replaces it with the empty response body - // and the row disappears. Explicit 204 is the stable idiom (plain 200 - // with empty body works today but is implementation-defined). + // and the row disappears. Not 204: htmx's default responseHandling maps + // 204 to swap:false, so the deleted row would stay on screen until a + // manual refresh. if r.Header.Get("HX-Request") == "true" { - w.WriteHeader(http.StatusNoContent) + w.WriteHeader(http.StatusOK) return }