-
Notifications
You must be signed in to change notification settings - Fork 97
feat(SharedBlueprints): put global blueprint proposals behind FF - AB… #1253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughThis pull request adds feature flag gating for the "Propose as global blueprint" option in the deployment settings panel. A new computed property checks for the "global_blueprint_proposals" feature flag and conditionally renders the relevant UI element. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ 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 |
HackerOne Code Security Review🟢 Scan Complete: 1 Issue(s) Here's how the code changes were interpreted and info about the tools used for scanning. 📖 Summary of ChangesThe changes involve adding a computed property to conditionally render a global blueprint option in the BuilderSettingsDeploySharedBlueprint Vue component. The new property checks feature flags to determine whether the global blueprint option should be displayed, implementing a dynamic visibility control for the UI element.
ℹ️ Issues DetectedNOTE: These may not require action! Below are unvalidated results from the Analysis Tools that ran during the latest scan for transparency. We investigate each of these for accuracy and relevance before surfacing them as a potential problem. How will I know if something is a problem?
🧰 Analysis tools
⏱️ Latest scan covered changes up to commit 0a8134d (latest) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/ui/src/builder/settings/BuilderSettingsDeploySharedBlueprint.vue (1)
31-43: Add feature flag re-check inhandleDeploybefore proposing as global blueprint.Line 151 checks
form.value.proposeAsGlobalwithout re-validating the feature flag. If the feature flag is disabled mid-session after the user checks the "Propose as global blueprint" checkbox, the global proposal would still attempt even though the feature flag is now off. Add a defensive check:- if (form.value.proposeAsGlobal) { + if (form.value.proposeAsGlobal && isGlobalBlueprintProposalsEnabled.value) { // Propose as global blueprint via GitHub PR const result = await writerApi.proposeSharedBlueprintGlobal({
🧹 Nitpick comments (1)
src/ui/src/builder/settings/BuilderSettingsDeploySharedBlueprint.vue (1)
84-88: Consider watching feature flag changes to reset form state.While the current implementation is functional, consider adding a watcher to reset
form.value.proposeAsGlobaltofalseif the feature flag is disabled during an active session. This would prevent any state inconsistencies if the flag changes while the modal is open.🔎 Optional enhancement to watch feature flag changes
Add a watcher after the existing watch on
isOpen:// Initialize form when modal opens watch(isOpen, (newValue) => { if (newValue) { resetForm(); } }); + +// Reset proposeAsGlobal if feature flag is disabled mid-session +watch(isGlobalBlueprintProposalsEnabled, (newValue) => { + if (!newValue && form.value.proposeAsGlobal) { + form.value.proposeAsGlobal = false; + } +});
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
src/ui/src/builder/settings/BuilderSettingsDeploySharedBlueprint.vue
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: build (3.9)
- GitHub Check: build (3.12)
- GitHub Check: build (3.10)
- GitHub Check: build (3.13)
- GitHub Check: build (3.11)
- GitHub Check: tests (chromium)
- GitHub Check: tests (firefox)
- GitHub Check: tests (webkit)
🔇 Additional comments (1)
src/ui/src/builder/settings/BuilderSettingsDeploySharedBlueprint.vue (1)
84-88: LGTM!The feature flag check is implemented correctly with proper defensive programming. The
Array.isArraycheck handles edge cases wherefeatureFlagsmight be undefined or null.
|
✅ Graham C reviewed all the included code changes and associated automation findings and determined that there were no immediately actionable security flaws. Note that they will continue to be notified of any new commits or comments and follow up as needed throughout the duration of this pull request's lifecycle. Reviewed with ❤️ by PullRequest |
…-908
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.