fix(onboarding): hide boot pool info alert when storage boot is unavailable#1973
fix(onboarding): hide boot pool info alert when storage boot is unavailable#1973Ajit-Mehrotra wants to merge 1 commit intomainfrom
Conversation
…ilable - Previously the "Dedicated boot pool" / "Boot + data pool" UAlert was shown whenever storage boot was selected and eligible devices existed, even if the system reported storage boot as unavailable - This was confusing because the alert described boot pool behavior while a separate panel indicated storage boot could not be configured - Changed the v-if condition from `hasEligibleDevices` to `canConfigure`, which requires boot transfer enabled, boot eligibility, AND eligible devices — so the info alert only appears when setup can actually proceed - Updated test expectation for the unknown-eligibility scenario to expect the intro panel hidden
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThe pull request refines conditional logic in an onboarding component and its test. Two warning alert panels now display only when storage boot is selected AND the system can be configured, replacing a previous check for eligible devices. The test expectation was updated to assert the intro panel is absent in the blocked scenario. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1973 +/- ##
=======================================
Coverage 52.08% 52.08%
=======================================
Files 1031 1031
Lines 71564 71564
Branches 8090 8090
=======================================
Hits 37275 37275
Misses 34164 34164
Partials 125 125 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This plugin has been deployed to Cloudflare R2 and is available for testing. |
Problem
When a user selects "Use Storage Drive(s) to boot Unraid" in the internal boot wizard (or the onboarding setup boot step), an informational UAlert is displayed describing the boot pool behavior — either "Dedicated boot pool" or "Boot + data pool" depending on the selected pool mode.
This alert was always shown whenever eligible storage devices existed, regardless of whether the system actually supports storage boot. This means when the "Storage boot is currently unavailable" eligibility panel is displayed (due to
ENABLE_BOOT_TRANSFER_DISABLED,BOOT_ELIGIBLE_FALSE, etc.), the boot pool info alert would still render directly above it — describing configuration details for a feature the user cannot use.Root Cause
The
v-ifcondition on both UAlert components usedhasEligibleDevices:hasEligibleDevicesonly checks whether assignable disks exist (deviceOptions.value.length > 0). It does not account for the two other system-level requirements that gate storage boot availability:internalBootTransferState— must be'enabled'(derived from theenableBootTransferGraphQL field being'yes')bootEligibilityState— must be'eligible'(derived from thebootEligibleGraphQL field beingtrue)The component already has a computed property
canConfigurethat combines all three checks:This is the same gate used to enable the Continue button and show the configuration form — but the info alerts were not using it.
Solution
Replaced
hasEligibleDeviceswithcanConfigurein both UAlertv-ifconditions:Now the boot pool info alerts only render when storage boot can actually be configured — matching the behavior of the rest of the form.
Test plan
Summary by CodeRabbit