fix(todo): create a ticket in team cs "[feature request/ux] - policy de#3328
Merged
Conversation
## Problem
A customer accidentally deleted an entire policy when they intended to delete only a single version. The confirmation dialog in PolicyDeleteDialog.tsx uses generic wording ("Are you sure you want to delete this policy?") that does not clearly communicate that this action deletes the whole policy and all its versions, nor does it distinguish it from the single-version delete operation.
## Root cause
The platform has two separate delete operations: deletePolicy (whole policy with cascading deletes of framework-control-policy links) and deletePolicyVersion (single version only). However the UI confirmation dialogs are asymmetric in their clarity. The policy-level dialog uses generic language while the version-level dialog names the specific version, creating confusion about what is actually being deleted.
## Fix
Updated PolicyDeleteDialog.tsx to clarify the confirmation title and description text. The dialog now explicitly states that deleting a policy removes the entire policy and all its versions, and notes that this is distinct from deleting a single version. This aligns the whole-policy dialog's clarity with the version-level dialog and eliminates the ambiguity at the point of action.
## Explicitly NOT touched
Soft-delete and recovery functionality. That requires schema changes and is out of scope for this fix.
## Verification
✅ PolicyDeleteDialog confirmation text now clearly distinguishes whole-policy delete from version delete
✅ Dialog title and description updated to state "entire policy and all its versions"
✅ Stale test assertions updated to match new wording
✅ Manual confirmation: policy delete dialog shows updated copy, version delete dialog behavior unchanged
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
cubic analysis
No issues found across 2 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Linked issue analysis
| Status | Acceptance criteria | Notes |
|---|---|---|
| ✅ | Policy delete confirmation text explicitly states that deleting a policy removes the entire policy and all of its versions (distinct from deleting a single version) | The PolicyDeleteDialog description was changed to mention the entire policy and all versions and to note it is distinct from deleting the current version. |
| ✅ | Unit tests updated to assert the new wording | A test was added that asserts the dialog warns about deleting all versions and that it distinguishes this from deleting the current version. |
| ✅ | Version-level delete dialog behavior remains unchanged (still names the specific version) | PR indicates the version delete dialog behavior was not modified and no changes to version-delete files appear in the diff, consistent with keeping its clearer wording. |
Contributor
|
🎉 This PR is included in version 3.95.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A customer accidentally deleted an entire policy when they intended to delete only a single version. The confirmation dialog in PolicyDeleteDialog.tsx uses generic wording ("Are you sure you want to delete this policy?") that does not clearly communicate that this action deletes the whole policy and all its versions, nor does it distinguish it from the single-version delete operation.
Root cause
The platform has two separate delete operations: deletePolicy (whole policy with cascading deletes of framework-control-policy links) and deletePolicyVersion (single version only). However the UI confirmation dialogs are asymmetric in their clarity. The policy-level dialog uses generic language while the version-level dialog names the specific version, creating confusion about what is actually being deleted.
Fix
Updated PolicyDeleteDialog.tsx to clarify the confirmation title and description text. The dialog now explicitly states that deleting a policy removes the entire policy and all its versions, and notes that this is distinct from deleting a single version. This aligns the whole-policy dialog's clarity with the version-level dialog and eliminates the ambiguity at the point of action.
Explicitly NOT touched
Soft-delete and recovery functionality. That requires schema changes and is out of scope for this fix.
Verification
✅ PolicyDeleteDialog confirmation text now clearly distinguishes whole-policy delete from version delete
✅ Dialog title and description updated to state "entire policy and all its versions"
✅ Stale test assertions updated to match new wording
✅ Manual confirmation: policy delete dialog shows updated copy, version delete dialog behavior unchanged
Fixes CS-694
Summary by cubic
Clarifies the policy delete confirmation to state it removes the entire policy and all versions, not just the current version. Reduces accidental deletions and addresses CS-694.
PolicyDeleteDialogcopy to name the policy and warn it deletes the entire policy and all its versions, not only the current version.Written for commit 2a6b892. Summary will update on new commits.