You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Site Audit: deleting from the recent-audits list has no confirmation (detail page has one) #614
Deleting an audit from the hub's recent-audits list fires immediately on the trash-icon click, with an optimistic removal and no confirmation. The detail page guards the very same action behind a confirm Dialog, and the deleteConfirm copy already exists in messages/en.json — so the list is both a data-loss hazard and inconsistent with its sibling.
Wrap the list's trash button in the same Dialog used on the detail page (title deleteAudit, description deleteConfirm, destructive confirm). No new copy is needed.
Small adjacent polish, same file: for non-completed audits the list renders the raw status string in the score slot (#L330 — : h.status), so users see lowercase running / failed where a score belongs. Render a small status badge (or translated label) instead.
Acceptance criteria
Deleting from the list requires the same confirmation as the detail page; cancelling keeps the audit.
Non-completed rows show a presentable status label instead of the raw enum string.
Hi @gkhngyk, I'd like to work on this one — could you assign it to me?
I've gone through the code and confirmed the issue:
audit/page.tsx#L333-L341 fires handleDelete(h.id) directly on click, with the optimistic removal in handleDelete (L138-147) meaning the row disappears before any confirmation.
audit/[id]/page.tsx#L122-147 already has the Dialog + deleteConfirm pattern to mirror.
deleteAudit / deleteConfirm / cancel keys already exist in messages/en.json, so no new copy needed for the confirmation part.
Plan:
Wrap the list's trash Button in the same Dialog (title deleteAudit, description deleteConfirm, destructive confirm calling handleDelete(h.id)).
Replace the raw h.status render at L330 with a small status badge/translated label for non-completed rows (will add the missing label key(s) since none currently fit).
Assigned — this pairs naturally with #611 since both reuse the same confirm-dialog pattern. Note the second half of the issue too: the raw status string rendered in the score slot for non-completed audits.
@Adarshhic checking in — still up for this one? No pressure either way, just let us know.
Two things changed since it was assigned, both in your favour:
The scope shrank. The second half — the raw running/failed status rendered in the score slot — was fixed along the way in fix: localize audit hub and report strings #673, so audit/page.tsx now renders it through t('status.${h.status}'). Only the delete confirmation is left.
You've already written the pattern. The confirm dialog you built for the bulk dismiss in fix: gate content dismiss actions behind confirmation and undo #653 is exactly what this needs; the delete button at audit/page.tsx:412 still calls handleDelete(h.id) straight from onClick with no gate.
If you'd rather hand it back, that's completely fine — say the word and we'll return it to the pool.
The trash button at audit/page.tsx:412 still fires handleDelete(h.id) directly with no gate.
Will reuse the Dialog pattern from #653 (bulk dismiss confirm) applied here to wrap this delete button, matching the existing pattern in audit/[id]/page.tsx. Should be quick since the pattern's already proven — will push a PR shortly.
@Adarshhic no hard feelings, and thanks for the analysis on this one; it's been two weeks since the last update so we're returning it to the pool. Plenty of others open if you want to pick one up.
Scope is just the delete confirmation — the status-label half landed in #673. The Dialog in audit/[id]/page.tsx is the pattern to mirror, and deleteAudit / deleteConfirm / cancel already exist in messages/en.json.
@BharadwajKanneveti you hold #756 as well now, and the two are the same pattern: that one moves four confirm() calls onto the Dialog, this one puts the same dialog on a delete that has none. audit/[id]/page.tsx is the reference for both, and all this issue needs is at audit/page.tsx:412, where the trash button still calls handleDelete(h.id) straight from onClick.
Worth doing in one sitting — separate PRs, so each stays easy to review.
Activity
Adarshhic commentedon Aug 3, 2026
Hi @gkhngyk, I'd like to work on this one — could you assign it to me?
I've gone through the code and confirmed the issue:
audit/page.tsx#L333-L341fireshandleDelete(h.id)directly on click, with the optimistic removal inhandleDelete(L138-147) meaning the row disappears before any confirmation.audit/[id]/page.tsx#L122-147already has theDialog+deleteConfirmpattern to mirror.deleteAudit/deleteConfirm/cancelkeys already exist inmessages/en.json, so no new copy needed for the confirmation part.Plan:
Buttonin the sameDialog(titledeleteAudit, descriptiondeleteConfirm, destructive confirm callinghandleDelete(h.id)).h.statusrender at L330 with a small status badge/translated label for non-completed rows (will add the missing label key(s) since none currently fit).Will open a PR referencing this issue once done.
gkhngyk commentedon Aug 3, 2026
Assigned — this pairs naturally with #611 since both reuse the same confirm-dialog pattern. Note the second half of the issue too: the raw status string rendered in the score slot for non-completed audits.
gkhngyk commentedon Aug 10, 2026
@Adarshhic checking in — still up for this one? No pressure either way, just let us know.
Two things changed since it was assigned, both in your favour:
running/failedstatus rendered in the score slot — was fixed along the way in fix: localize audit hub and report strings #673, soaudit/page.tsxnow renders it throught('status.${h.status}'). Only the delete confirmation is left.audit/page.tsx:412still callshandleDelete(h.id)straight fromonClickwith no gate.If you'd rather hand it back, that's completely fine — say the word and we'll return it to the pool.
Adarshhic commentedon Aug 10, 2026
Hi @gkhngyk, still in on this one — thanks for the check-in. Confirmed both points:
main(t('status.${h.status}')at L405), so only the delete confirmation is left, as you said.audit/page.tsx:412still fireshandleDelete(h.id)directly with no gate.Will reuse the
Dialogpattern from #653 (bulk dismiss confirm) applied here to wrap this delete button, matching the existing pattern inaudit/[id]/page.tsx. Should be quick since the pattern's already proven — will push a PR shortly.BharadwajKanneveti commentedon Aug 23, 2026
@gkhngyk this one was open for sometime can I pick it up?
gkhngyk commentedon Aug 23, 2026
@BharadwajKanneveti yes — reassigning to you.
@Adarshhic no hard feelings, and thanks for the analysis on this one; it's been two weeks since the last update so we're returning it to the pool. Plenty of others open if you want to pick one up.
Scope is just the delete confirmation — the status-label half landed in #673. The
Dialoginaudit/[id]/page.tsxis the pattern to mirror, anddeleteAudit/deleteConfirm/cancelalready exist inmessages/en.json.gkhngyk commentedon Aug 25, 2026
@BharadwajKanneveti you hold #756 as well now, and the two are the same pattern: that one moves four
confirm()calls onto theDialog, this one puts the same dialog on a delete that has none.audit/[id]/page.tsxis the reference for both, and all this issue needs is ataudit/page.tsx:412, where the trash button still callshandleDelete(h.id)straight fromonClick.Worth doing in one sitting — separate PRs, so each stays easy to review.