Skip to content

fix(onboarding): hide boot pool info alert when storage boot is unavailable#1973

Open
Ajit-Mehrotra wants to merge 1 commit intomainfrom
worktree-hide-boot-pool-alert
Open

fix(onboarding): hide boot pool info alert when storage boot is unavailable#1973
Ajit-Mehrotra wants to merge 1 commit intomainfrom
worktree-hide-boot-pool-alert

Conversation

@Ajit-Mehrotra
Copy link
Copy Markdown
Contributor

@Ajit-Mehrotra Ajit-Mehrotra commented Mar 27, 2026

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-if condition on both UAlert components used hasEligibleDevices:

v-if="isStorageBootSelected && hasEligibleDevices && isDedicatedMode"
v-if="isStorageBootSelected && hasEligibleDevices && !isDedicatedMode"

hasEligibleDevices only 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:

  1. internalBootTransferState — must be 'enabled' (derived from the enableBootTransfer GraphQL field being 'yes')
  2. bootEligibilityState — must be 'eligible' (derived from the bootEligible GraphQL field being true)

The component already has a computed property canConfigure that combines all three checks:

const canConfigure = computed(
  () =>
    internalBootTransferState.value === 'enabled' &&
    bootEligibilityState.value === 'eligible' &&
    deviceOptions.value.length > 0
);

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 hasEligibleDevices with canConfigure in both UAlert v-if conditions:

v-if="isStorageBootSelected && canConfigure && isDedicatedMode"
v-if="isStorageBootSelected && canConfigure && !isDedicatedMode"

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

  • Existing tests updated and all passing (635 tests, 64 files)
  • Verify in internal boot wizard: select "Storage Drive(s)" when storage boot is unavailable — the dedicated/hybrid boot pool info alert should not appear
  • Verify in onboarding setup boot step: same behavior
  • Verify when storage boot is available: the info alert still appears as expected

Summary by CodeRabbit

  • Bug Fixes
    • Improved accuracy of internal boot configuration warnings during onboarding setup. These alerts now display only when storage boot is selected and the system is properly configured, ensuring users receive timely and relevant guidance while configuring boot options.

…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
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: de577c5d-7129-448f-bda3-8d59f61d467c

📥 Commits

Reviewing files that changed from the base of the PR and between 7f04f8e and ccdd4b6.

📒 Files selected for processing (2)
  • web/__test__/components/Onboarding/OnboardingInternalBootStep.test.ts
  • web/src/components/Onboarding/steps/OnboardingInternalBootStep.vue

Walkthrough

The 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

Cohort / File(s) Summary
Onboarding Boot Step Logic
web/src/components/Onboarding/steps/OnboardingInternalBootStep.vue, web/__test__/components/Onboarding/OnboardingInternalBootStep.test.ts
Updated conditional rendering for warning alerts from isStorageBootSelected && hasEligibleDevices to isStorageBootSelected && canConfigure. Test expectation inverted to reflect intro panel absence in blocked storage boot scenario.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Alerts now shine with focused sight,
When config's blessed and boot's made right,
No false warnings in the way,
Just clarity for users today!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: hiding the boot pool info alert when storage boot is unavailable by changing the conditional from hasEligibleDevices to canConfigure.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch worktree-hide-boot-pool-alert

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.08%. Comparing base (7f04f8e) to head (ccdd4b6).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown
Contributor

This plugin has been deployed to Cloudflare R2 and is available for testing.
Download it at this URL:

https://preview.dl.unraid.net/unraid-api/tag/PR1973/dynamix.unraid.net.plg

@Ajit-Mehrotra Ajit-Mehrotra requested a review from elibosley March 27, 2026 22:46
@Ajit-Mehrotra Ajit-Mehrotra marked this pull request as ready for review March 27, 2026 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant