Skip to content

fix(todo): create a ticket in team cs "[feature request/ux] - policy de#3328

Merged
tofikwest merged 1 commit into
mainfrom
tofik/cs-694-create-a-ticket-in-team
Jul 2, 2026
Merged

fix(todo): create a ticket in team cs "[feature request/ux] - policy de#3328
tofikwest merged 1 commit into
mainfrom
tofik/cs-694-create-a-ticket-in-team

Conversation

@tofikwest

@tofikwest tofikwest commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

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.

  • Bug Fixes
    • Updated PolicyDeleteDialog copy to name the policy and warn it deletes the entire policy and all its versions, not only the current version.
    • Adjusted unit test to assert the new wording.

Written for commit 2a6b892. Summary will update on new commits.

Review in cubic

## 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
@linear

linear Bot commented Jul 2, 2026

Copy link
Copy Markdown

CS-694

@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Jul 2, 2026 7:09am
comp-framework-editor Ready Ready Preview, Comment Jul 2, 2026 7:09am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
portal Skipped Skipped Jul 2, 2026 7:09am

Request Review

@cubic-dev-ai cubic-dev-ai Bot 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.

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

Linked issue: CS-694: create a ticket in team CS "[Feature Request/UX] - Policy delete: clarify confirmation wording (whole policy vs version) and add soft-delete/recovery"

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.

Re-trigger cubic

@tofikwest tofikwest merged commit 5d0b0f1 into main Jul 2, 2026
11 checks passed
@tofikwest tofikwest deleted the tofik/cs-694-create-a-ticket-in-team branch July 2, 2026 13:24
@claudfuen

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.95.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants