fix(onboarding): fix shutdown/reboot buttons in internal boot wizard#1972
fix(onboarding): fix shutdown/reboot buttons in internal boot wizard#1972
Conversation
…wizard - The shutdown and reboot buttons in the standalone internal boot wizard were non-functional because the InternalBootConfirmDialog (UModal with z-50) was rendered as a sibling to the full-screen Dialog component, causing z-index stacking issues that blocked interaction with the modal - Removed the InternalBootConfirmDialog from the standalone wizard so reboot/shutdown buttons now trigger the power actions directly - The confirmation dialog is preserved in the onboarding flow (OnboardingNextStepsStep) where it works correctly - Updated tests to reflect the simplified direct-action flow
WalkthroughThe changes simplify the onboarding internal boot workflow by removing an intermediate confirmation dialog. The component and its tests are updated to perform power actions (reboot/shutdown) directly upon button click, eliminating the pending state and confirm-dialog interaction pattern. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 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 #1972 +/- ##
==========================================
- Coverage 52.09% 52.08% -0.01%
==========================================
Files 1031 1031
Lines 71573 71564 -9
Branches 8093 8090 -3
==========================================
- Hits 37284 37275 -9
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. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
web/__test__/components/Onboarding/OnboardingInternalBootStandalone.test.ts (1)
573-617: Consider adding cleanup verification for completeness.The tests verify that the submit functions are called directly, which is the primary behavior change. For additional coverage, you could assert that
cleanupOnboardingStorageMockis called before the power action, but this is optional since the cleanup call is already tested elsewhere in this file (e.g., line 459).📝 Optional: Add cleanup assertions
await wrapper.get('[data-testid="internal-boot-standalone-reboot"]').trigger('click'); await flushPromises(); + expect(cleanupOnboardingStorageMock).toHaveBeenCalledTimes(1); expect(submitInternalBootRebootMock).toHaveBeenCalledTimes(1);await shutdownButton.trigger('click'); await flushPromises(); + expect(cleanupOnboardingStorageMock).toHaveBeenCalledTimes(1); expect(submitInternalBootShutdownMock).toHaveBeenCalledTimes(1);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@web/__test__/components/Onboarding/OnboardingInternalBootStandalone.test.ts` around lines 573 - 617, Add assertions to each test to verify cleanupOnboardingStorageMock is called before the power action: after triggering the step completion (the click on '[data-testid="internal-boot-step-complete"]') assert cleanupOnboardingStorageMock was invoked, then trigger the reboot ('[data-testid="internal-boot-standalone-reboot"]') or shutdown (shutdownButton) and assert submitInternalBootRebootMock or submitInternalBootShutdownMock was called; reference the existing mocks submitInternalBootRebootMock, submitInternalBootShutdownMock and cleanupOnboardingStorageMock and the wrapper interactions used in the tests.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@web/__test__/components/Onboarding/OnboardingInternalBootStandalone.test.ts`:
- Around line 573-617: Add assertions to each test to verify
cleanupOnboardingStorageMock is called before the power action: after triggering
the step completion (the click on '[data-testid="internal-boot-step-complete"]')
assert cleanupOnboardingStorageMock was invoked, then trigger the reboot
('[data-testid="internal-boot-standalone-reboot"]') or shutdown (shutdownButton)
and assert submitInternalBootRebootMock or submitInternalBootShutdownMock was
called; reference the existing mocks submitInternalBootRebootMock,
submitInternalBootShutdownMock and cleanupOnboardingStorageMock and the wrapper
interactions used in the tests.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 0b4c165d-ded5-4b73-a90b-a583b0693208
📒 Files selected for processing (2)
web/__test__/components/Onboarding/OnboardingInternalBootStandalone.test.tsweb/src/components/Onboarding/standalone/OnboardingInternalBoot.standalone.vue
🤖 I have created a release *beep* *boop* --- ## [4.32.0](v4.31.1...v4.32.0) (2026-03-31) ### Features * **onboarding:** force reboot after internal boot setup and lock down wizard ([#1966](#1966)) ([9323b14](9323b14)) * **web:** add standalone internal boot wizard ([#1956](#1956)) ([ea41225](ea41225)) ### Bug Fixes * **api:** defer docker startup tasks until ready ([#1952](#1952)) ([0e004a7](0e004a7)) * check mdState to determine array stopped during onboarding ([#1969](#1969)) ([abe7283](abe7283)) * **connect:** expose IPv6 FQDN routes ([#1976](#1976)) ([86d31ee](86d31ee)) * **docker:** guard primary container name access ([#1977](#1977)) ([7dadaa2](7dadaa2)) * **onboarding:** fix shutdown/reboot buttons in internal boot wizard ([#1972](#1972)) ([7f04f8e](7f04f8e)) * **onboarding:** hide boot pool info alert when storage boot is unavailable ([#1973](#1973)) ([f82681b](f82681b)) * **onboarding:** lower dedicated boot minimum to 6 GiB ([#1979](#1979)) ([c8773f5](c8773f5)) * **onboarding:** prevent Apply Result dialog from being dismissed ([#1971](#1971)) ([0db1410](0db1410)) * **onboarding:** reload after server rename ([#1981](#1981)) ([6897f7e](6897f7e)) * **onboarding:** reset internal boot form on mode switch ([#1980](#1980)) ([a78b895](a78b895)) * **onboarding:** restore page refresh on Go to Dashboard ([#1967](#1967)) ([29f814b](29f814b)) * **onboarding:** surface drive warnings for internal boot ([#1963](#1963)) ([9e0e89e](9e0e89e)) * Revert "fix(web): avoid legacy dropdown id collisions" ([#1961](#1961)) ([ffeb148](ffeb148)) * **server-identity:** handle onboarding persistence mismatches ([#1974](#1974)) ([8432974](8432974)) * **theme:** remove stale dark root class in light mode ([#1960](#1960)) ([2815f85](2815f85)) * **web:** avoid dropdown id collisions with ZFS Master ([#1958](#1958)) ([98d37bb](98d37bb)) * **web:** include connect metadata in callbacks ([#1957](#1957)) ([c392146](c392146)) * **web:** restore dropdown id compatibility safely ([#1962](#1962)) ([d948b32](d948b32)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Summary
InternalBootConfirmDialogfrom the standalone internal boot wizard to fix non-functional shutdown/reboot buttonsUModal(z-50) was rendered as a sibling to the full-screenDialog, causing z-index stacking issues that blocked interaction with the confirmation modalOnboardingNextStepsStep) where it works correctlyTest plan
Summary by CodeRabbit
Release Notes
Bug Fixes
Tests