fix(app): warn before invalidating policy acknowledgments#2980
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
1 issue found across 8 files
Confidence score: 3/5
- There is a concrete user-impact risk in
apps/app/src/app/(app)/[orgId]/overview/components/overview-quick-actions.tsx: the publish flow without confirmation can be clicked repeatedly while a request is in flight, which may trigger duplicate submissions. - Given the issue’s medium severity (6/10) and high confidence (8/10), this looks like more than a cosmetic edge case, so merge risk is moderate rather than minimal.
- Pay close attention to
apps/app/src/app/(app)/[orgId]/overview/components/overview-quick-actions.tsx- ensure publish actions are gated/disabled during in-flight requests to prevent duplicate publishes.
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
Contributor
Author
|
@cubic-dev-ai review it |
Contributor
@tofikwest I have started the AI code review. It will take a few minutes to complete. |
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.
Summary
Verification
Summary by cubic
Warn before publishing policies when it would invalidate existing acknowledgments, covering bulk publish and approval flows (ENG-217). No warning is shown when there are zero acknowledgments, and duplicate bulk publish submissions are blocked.
New Features
PolicyAcknowledgmentInvalidationDialogusing@trycompai/design-systemAlertDialog, plus helpersgetPolicyAcknowledgmentCountandgetPolicyAcknowledgmentTotal.signedByacross all unpublished policies, shows the dialog only when >0, posts to/api/policies/publish-allafter confirm, and blocks in-flight duplicate submits.Refactors
ConfirmActionDialogand moved quick-action logic intooverview-quick-actions.tsx(usePublishAllPoliciesAction, status formatting, progress calc).Written for commit 8b0b863. Summary will update on new commits.