fix: keep internal boot candidates aligned with devs.ini#1935
fix: keep internal boot candidates aligned with devs.ini#1935
Conversation
|
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)
WalkthroughAdds 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
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)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 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)
📝 Coding Plan
Comment |
There was a problem hiding this comment.
💡 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".
| 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) |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
🧹 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
📒 Files selected for processing (3)
web/__test__/components/Onboarding/OnboardingInternalBootStep.test.tsweb/src/components/Onboarding/steps/OnboardingInternalBootStep.vueweb/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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
|
This plugin has been deployed to Cloudflare R2 and is available for testing. |
Summary
devs.iniinstead of widening the list from general disk discoverydevs.inidisks in onboarding with a warning so they can still be selecteddevs.iniboundaryTesting
pnpm test -- web/__test__/components/Onboarding/OnboardingInternalBootStep.test.ts web/__test__/components/Onboarding/OnboardingSummaryStep.test.tspnpm 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@unraid/sharedresolution issue before reaching the onboarding specSummary by CodeRabbit
New Features
UI
Tests
Chores