Skip to content

fix: keep internal boot candidates aligned with devs.ini#1935

Closed
elibosley wants to merge 4 commits intomainfrom
codex/internal-boot-devs-ini-candidates
Closed

fix: keep internal boot candidates aligned with devs.ini#1935
elibosley wants to merge 4 commits intomainfrom
codex/internal-boot-devs-ini-candidates

Conversation

@elibosley
Copy link
Member

@elibosley elibosley commented Mar 19, 2026

Summary

  • keep onboarding internal boot candidates sourced from devs.ini instead of widening the list from general disk discovery
  • continue surfacing partitioned devs.ini disks in onboarding with a warning so they can still be selected
  • add backend and web coverage for partitioned candidates and the devs.ini boundary

Testing

  • pnpm test -- web/__test__/components/Onboarding/OnboardingInternalBootStep.test.ts web/__test__/components/Onboarding/OnboardingSummaryStep.test.ts
  • pnpm exec eslint --config .eslintrc.ts src/unraid-api/graph/resolvers/onboarding/onboarding-internal-boot.service.ts src/unraid-api/graph/resolvers/onboarding/onboarding-internal-boot.service.spec.ts
  • API Vitest in this VM expands into the full suite and fails early on an existing @unraid/shared resolution issue before reaching the onboarding spec

Summary by CodeRabbit

  • New Features

    • Shows non-blocking warnings for disks with existing partitions during onboarding; disks remain selectable.
  • UI

    • Adds a warning-only eligibility panel and per-disk warning listings with localized messages.
  • Tests

    • Expanded tests covering disk eligibility, partition handling, warnings, and internal-boot flows.
  • Chores

    • GraphQL now fetches partition info for assignable disks; added i18n strings for warning titles/descriptions/codes; store sync changed to perform immediate updates.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 19, 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: eee039e9-2a94-4893-bc29-c69d891f2592

📥 Commits

Reviewing files that changed from the base of the PR and between 53d5f52 and 52e1523.

📒 Files selected for processing (2)
  • api/src/unraid-api/config/store-sync.service.spec.ts
  • api/src/unraid-api/config/store-sync.service.ts

Walkthrough

Adds partition-awareness to internal-boot: backend delegates candidate-disk lookup to a new helper; GraphQL now queries disk partitions; frontend computes and displays non-blocking partition warnings while keeping disks selectable; tests and locales updated to reflect partitions and warning text.

Changes

Cohort / File(s) Summary
Backend service & tests
api/src/unraid-api/graph/resolvers/onboarding/onboarding-internal-boot.service.ts, api/src/unraid-api/graph/resolvers/onboarding/onboarding-internal-boot.service.spec.ts
Added private getInternalBootCandidateDisks() delegating to disksService.getAssignableDisks(), renamed locals/log messages from assignableDiskscandidateDisks, expanded test mocks to include getDisks and partitions, and added assertions ensuring getDisks is not called in specific flows.
Frontend GraphQL documents & generated types
web/src/components/Onboarding/graphql/getInternalBootContext.query.ts, web/src/components/Onboarding/graphql/refreshInternalBootContext.mutation.ts, web/src/composables/gql/gql.ts, web/src/composables/gql/graphql.ts
Extended query/mutation selection sets to request assignableDisks.partitions { name } and updated generated documents/types to include partitions on disk objects.
Frontend component & tests
web/src/components/Onboarding/steps/OnboardingInternalBootStep.vue, web/__test__/components/Onboarding/OnboardingInternalBootStep.test.ts, web/__test__/components/Onboarding/OnboardingSummaryStep.test.ts
Added HAS_PARTITIONS warning code and warningCodes on device options; compute and render disk-warning issues in eligibility UI; updated test fixtures to include partitions and added a test asserting partition warnings do not block disk selection.
Localization
web/src/locales/en.json
Added i18n keys for partition-warning UI (eligibility.warningOnlyTitle, eligibility.warningOnlyDescription, eligibility.codes.HAS_PARTITIONS, eligibility.diskWarningTitle).
Config store sync (backend)
api/src/unraid-api/config/store-sync.service.ts, api/src/unraid-api/config/store-sync.service.spec.ts
Removed debounced write logic and timers; subscription now triggers immediate sync with duplicate-state suppression retained; tests adjusted to remove fake timers and assert immediate set calls/unsubscribe behavior.

Sequence Diagram(s)

sequenceDiagram
  participant UI as "Frontend UI"
  participant GQL as "GraphQL API"
  participant Service as "Onboarding Service"
  participant Disks as "DisksService"

  UI->>GQL: Query GetInternalBootContext (requests assignableDisks.partitions)
  GQL->>Service: resolve internalBootContext
  Service->>Disks: getAssignableDisks()
  Disks-->>Service: return candidate disks (with partitions)
  Service-->>GQL: internalBootContext (assignableDisks with partitions)
  GQL-->>UI: Response
  UI->>UI: compute warningCodes where partitions.length > 0
  UI-->>User: show eligibility + partition warnings (non-blocking)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 I hopped through drives with gentle eyes,

Found tiny parts where old data lies.
A soft little flag, not a stern stop sign,
We'll wipe and prepare — your choice stays fine.
Hooray for warnings — cautious and kind!

🚥 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: keeping internal boot candidates aligned with devs.ini instead of general disk discovery, with added support for partitioned disks.
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 codex/internal-boot-devs-ini-candidates
📝 Coding Plan
  • Generate coding plan for human review comments

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

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 13d73bc4d6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 333 to +338
const shouldShowEligibilityDetails = computed(
() =>
!contextError.value &&
(systemEligibilityCodes.value.length > 0 || diskEligibilityIssues.value.length > 0)
(systemEligibilityCodes.value.length > 0 ||
diskEligibilityIssues.value.length > 0 ||
diskWarningIssues.value.length > 0)

Choose a reason for hiding this comment

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

P2 Badge Distinguish selectable partition warnings from unavailable disks

When HAS_PARTITIONS is the only issue, this new condition now renders the eligibility disclosure even though deviceOptions still allows the disk to be selected. The problem is that eligibilityPanelTitle/eligibilityPanelDescription immediately below still choose the “some disks are unavailable / cannot be selected” copy, so a partitioned-but-selectable disk is presented as blocked. In the warning-only case this tells users the opposite of what the form actually does and can make them abandon a valid internal-boot setup.

Useful? React with 👍 / 👎.

Copy link
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/src/components/Onboarding/steps/OnboardingInternalBootStep.vue (1)

1008-1021: Use the existing fallback helper in the warning list for consistency.

Line 1020 can reuse translateOrFallback(...) to keep all fallback translation behavior centralized.

♻️ Suggested consistency update
-                        {{ t(DISK_WARNING_MESSAGE_KEYS[code], DISK_WARNING_FALLBACK_MESSAGES[code]) }}
+                        {{
+                          translateOrFallback(
+                            DISK_WARNING_MESSAGE_KEYS[code],
+                            DISK_WARNING_FALLBACK_MESSAGES[code]
+                          )
+                        }}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@web/src/components/Onboarding/steps/OnboardingInternalBootStep.vue` around
lines 1008 - 1021, In the disk warning rendering inside
OnboardingInternalBootStep.vue (the v-for over disk.codes), replace the inline
t(DISK_WARNING_MESSAGE_KEYS[code], DISK_WARNING_FALLBACK_MESSAGES[code]) call
with the centralized translateOrFallback helper so the component uses a single
fallback strategy; locate the list item using disk.codes and swap the
translation call to translateOrFallback(DISK_WARNING_MESSAGE_KEYS[code],
DISK_WARNING_FALLBACK_MESSAGES[code]) ensuring you keep the same DI constants
(DISK_WARNING_MESSAGE_KEYS, DISK_WARNING_FALLBACK_MESSAGES) and the surrounding
markup intact.
🤖 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/src/components/Onboarding/steps/OnboardingInternalBootStep.vue`:
- Around line 1008-1021: In the disk warning rendering inside
OnboardingInternalBootStep.vue (the v-for over disk.codes), replace the inline
t(DISK_WARNING_MESSAGE_KEYS[code], DISK_WARNING_FALLBACK_MESSAGES[code]) call
with the centralized translateOrFallback helper so the component uses a single
fallback strategy; locate the list item using disk.codes and swap the
translation call to translateOrFallback(DISK_WARNING_MESSAGE_KEYS[code],
DISK_WARNING_FALLBACK_MESSAGES[code]) ensuring you keep the same DI constants
(DISK_WARNING_MESSAGE_KEYS, DISK_WARNING_FALLBACK_MESSAGES) and the surrounding
markup intact.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b030dd58-1e1a-466c-b544-7804e44e9d8d

📥 Commits

Reviewing files that changed from the base of the PR and between 13d73bc and 61238ff.

📒 Files selected for processing (3)
  • web/__test__/components/Onboarding/OnboardingInternalBootStep.test.ts
  • web/src/components/Onboarding/steps/OnboardingInternalBootStep.vue
  • web/src/locales/en.json
✅ Files skipped from review due to trivial changes (1)
  • web/src/locales/en.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • web/test/components/Onboarding/OnboardingInternalBootStep.test.ts

@codecov
Copy link

codecov bot commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.56%. Comparing base (50726c4) to head (52e1523).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1935      +/-   ##
==========================================
+ Coverage   51.54%   51.56%   +0.02%     
==========================================
  Files        1021     1021              
  Lines       70464    70496      +32     
  Branches     7809     7819      +10     
==========================================
+ Hits        36321    36353      +32     
  Misses      34021    34021              
  Partials      122      122              

☔ 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
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/PR1935/dynamix.unraid.net.plg

@elibosley elibosley closed this Mar 23, 2026
@elibosley elibosley deleted the codex/internal-boot-devs-ini-candidates branch March 23, 2026 15:29
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