Skip to content

fix(onboarding): fix shutdown/reboot buttons in internal boot wizard#1972

Merged
elibosley merged 1 commit intomainfrom
worktree-fix-internal-boot-buttons
Mar 27, 2026
Merged

fix(onboarding): fix shutdown/reboot buttons in internal boot wizard#1972
elibosley merged 1 commit intomainfrom
worktree-fix-internal-boot-buttons

Conversation

@Ajit-Mehrotra
Copy link
Copy Markdown
Contributor

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

Summary

  • Removes InternalBootConfirmDialog from the standalone internal boot wizard to fix non-functional shutdown/reboot buttons
  • The UModal (z-50) was rendered as a sibling to the full-screen Dialog, causing z-index stacking issues that blocked interaction with the confirmation modal
  • Reboot/shutdown buttons now trigger power actions directly without a confirmation step
  • The confirmation dialog remains in the onboarding flow (OnboardingNextStepsStep) where it works correctly

Test plan

  • All 64 web test files pass (634 tests)
  • Verify reboot button works in the standalone internal boot wizard
  • Verify shutdown button works in the standalone internal boot wizard
  • Verify confirmation dialog still works in the onboarding next steps flow

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Removed unnecessary confirmation dialogs from onboarding's reboot and shutdown options, allowing users to initiate these power actions directly without intermediate confirmation steps.
  • Tests

    • Updated test assertions to reflect direct power action behavior.

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

coderabbitai bot commented Mar 27, 2026

Walkthrough

The 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

Cohort / File(s) Summary
Internal Boot Confirmation Dialog Removal
web/src/components/Onboarding/standalone/OnboardingInternalBoot.standalone.vue, web/__test__/components/Onboarding/OnboardingInternalBootStandalone.test.ts
Removes InternalBootConfirmDialog import and the pendingPowerAction/handleConfirmPowerAction flow. Introduces direct handlePowerAction() handler that immediately executes cleanup and submission. Test cases updated to assert direct submit calls without intermediate dialog assertions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A dialog dismissed, no more delays,
Power flows swift through simpler ways,
Confirm steps fade like morning mist,
Direct action—a refactored twist! ✨

🚥 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 summarizes the main change: fixing shutdown/reboot buttons in the internal boot wizard by removing the problematic confirmation dialog.
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-fix-internal-boot-buttons

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.

@Ajit-Mehrotra Ajit-Mehrotra self-assigned this Mar 27, 2026
@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 (29f814b) to head (261af0a).
⚠️ Report is 2 commits behind head on main.

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.
📢 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/PR1972/dynamix.unraid.net.plg

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 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 cleanupOnboardingStorageMock is 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

📥 Commits

Reviewing files that changed from the base of the PR and between 0db1410 and 261af0a.

📒 Files selected for processing (2)
  • web/__test__/components/Onboarding/OnboardingInternalBootStandalone.test.ts
  • web/src/components/Onboarding/standalone/OnboardingInternalBoot.standalone.vue

@elibosley elibosley merged commit 7f04f8e into main Mar 27, 2026
13 checks passed
@elibosley elibosley deleted the worktree-fix-internal-boot-buttons branch March 27, 2026 18:14
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.

2 participants