Skip to content

fix: refresh audit stats after deleting audit - #674

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
BharadwajKanneveti:fix/audit-delete-refresh-state
Aug 7, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
BharadwajKanneveti:fix/audit-delete-refresh-state

Conversation

@BharadwajKanneveti

Copy link
Copy Markdown
Contributor

Summary

Refresh audit hub data after deleting an audit so the trend card, chart, and quota counter stay in sync with the audit history.

Changes:

  • Kept the existing optimistic history list update.
  • Triggered the existing refetch() flow after a successful deleteAudit.
  • Preserved rollback behavior when deletion fails by restoring the previous history state.

Related issue

Closes #669

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.

Right fix for #669 — refetch() after a successful delete brings the trend card and quota back in sync while keeping the optimistic list update. Thanks!

@gkhngyk
gkhngyk merged commit 9f1836f into ansvisor:main Aug 7, 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: deleting an audit leaves the trend card and quota counter stale

2 participants