Skip to content

fix: prevent duplicate audit reruns - #677

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
BharadwajKanneveti:fix/audit-rerun-pending-state
Aug 8, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
BharadwajKanneveti:fix/audit-rerun-pending-state

Conversation

@BharadwajKanneveti

Copy link
Copy Markdown
Contributor

Summary

Prevent duplicate audit re-runs by adding a pending state to the audit detail page.

Changes:

  • Added rerunning state to track when a re-run request is in progress.
  • Disabled the Re-run button while the request is pending.
  • Added a loading spinner using Loader2 while the audit re-run is being triggered.
  • Prevented users from accidentally starting multiple audits through double-clicks.

Related issue

Closes #667

Type of change

  • feat — New feature
  • fix — Bug fix
  • chore — Maintenance / dependencies
  • docs — Documentation only
  • refactor — Code change that neither fixes a bug nor adds a feature
  • test — Adding or updating tests

Checklist

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly the guard #667 asked for — rerunning state, disabled button, spinner, mirroring the hub's pattern. Thanks!

@gkhngyk
gkhngyk merged commit 505880f into ansvisor:main Aug 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Site Audit detail: Re-run has no pending state — a double click starts two audits and burns quota twice

2 participants