🐛 Disable reset/save buttons when no flaw changes#784
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR adds a ChangesButton Disablement Feature
🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CHANGELOG.md`:
- Line 4: Fix the typo in the changelog entry by replacing the incorrect `"Reset
CHanges"` text with the correctly capitalized `"Reset Changes"` in the
CHANGELOG.md entry that currently reads: * Disable "Save Changes" and "Reset
CHanges" buttons when no flaw changes have been made (`OSIDB-4973`).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Enterprise
Run ID: 89ea890b-3d0d-4064-854c-cfce04b5a9ef
⛔ Files ignored due to path filters (1)
src/components/__tests__/__snapshots__/FlawForm.spec.ts.snapis excluded by!**/*.snap
📒 Files selected for processing (2)
CHANGELOG.mdsrc/components/FlawForm/FlawForm.vue
| const hasAnyChanges = computed(() => { | ||
| return isFlawUpdated.value | ||
| || wereAffectsEditedOrAdded.value | ||
| || wasFlawCvssModified.value | ||
| || removedAffects.size > 0; | ||
| }); |
There was a problem hiding this comment.
This is missing labels and jira task creation for legacy flaws
| const hasAnyChanges = computed(() => { | |
| return isFlawUpdated.value | |
| || wereAffectsEditedOrAdded.value | |
| || wasFlawCvssModified.value | |
| || removedAffects.size > 0; | |
| }); | |
| const hasAnyChanges = computed(() => { | |
| return isFlawUpdated.value | |
| || wereAffectsEditedOrAdded.value | |
| || wasFlawCvssModified.value | |
| || removedAffects.size > 0 | |
| || shouldCreateJiraTask.value | |
| || areLabelsUpdated.value; | |
| }); |
There was a problem hiding this comment.
Good catch, and I agree in the labels approach.
For the Jira task I think is better to handle directly in the button condition, so it is not disabled if the checkbox is marked. The reason is cause the Jira task is not something that changed in the flaw but an async operation to be made on the save action.
Does that makes sense to you?
Co-authored-by: Cursor <cursoragent@cursor.com>
722b38e to
ff2f680
Compare
OSIDB-4973 Disable reset/save buttons when no flaw changes
Checklist:
Summary
Prevents users from saving or resetting flaws when no changes have been made, avoiding unnecessary API calls and potential programmatic feedback issues.
Changes
Closes
OSIDB-4973