refactor(registration): remove flash drive references for internal boot support#1880
refactor(registration): remove flash drive references for internal boot support#1880
Conversation
…ernal boot device types Replace flash-specific terminology with generic boot device language throughout the registration page. Add computed boot device type derived from GUID prefixes (01-/02- = internal boot, 03- = TPM, default = flash). Remove unused fields (flashVendor, flashProduct, arrayStatus) from the component and clean up dead locale keys.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Repository UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (2)
WalkthroughRefactors "flash drive" terminology to "boot device", adds a new Changes
Sequence Diagram(s)sequenceDiagram
participant Component as RegistrationComponent
participant Store as ServerStore
participant GQL as GraphQLClient
participant Backend as API/Server
Component->>Store: read server state (guid, bootDeviceType)
Note right of Store: bootDeviceType computed from guid
Store-->>Component: bootDeviceType, vendor, product, GUID
Component->>GQL: request GetCoreSettings (includes customization.activationCode)
GQL->>Backend: execute GetCoreSettings query
Backend-->>GQL: return vars, server, display, systemTime, info, customization.activationCode.system
GQL-->>Component: resolved data (activationCode + settings)
Component->>Component: render UI using bootDeviceType and device GUID label
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 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 unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 32b8fd742f
ℹ️ 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".
| class="rounded-lg border border-gray-200 p-4 dark:border-gray-700" | ||
| > | ||
| <h4 class="mb-3 text-lg font-semibold">{{ t('registration.flashDrive') }}</h4> | ||
| <h4 class="mb-3 text-lg font-semibold">{{ t('registration.bootDevice') }}</h4> |
There was a problem hiding this comment.
Add translations for new registration i18n keys
The component now renders new keys like registration.bootDevice/registration.deviceGuid, but this commit only defines those keys in web/src/locales/en.json; checking web/src/locales/*.json shows other locales still only have the old registration.flash* keys. For non-English users, the registration section will regress to English fallback text (and emit missing-key warnings in dev) instead of localized strings that previously existed, so this change should either add the new keys to all locale files or keep backward-compatible key names.
Useful? React with 👍 / 👎.
…lash boot devices These fields carry real data from the API (via var.ini) for USB flash boot users. Show them only when the detected boot device type is flash, keeping the UI clean for internal boot and TPM users.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1880 +/- ##
==========================================
+ Coverage 48.06% 48.08% +0.02%
==========================================
Files 1002 1002
Lines 66511 66502 -9
Branches 6672 6675 +3
==========================================
+ Hits 31968 31978 +10
+ Misses 34422 34403 -19
Partials 121 121 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…e-device 02- GUID prefix now maps to 'internalBootMulti' instead of 'internalBoot', displaying as "Internal Boot (Multi-device)" in the registration UI.
|
This plugin has been deployed to Cloudflare R2 and is available for testing. |
The registration page uses flash-drive-specific terminology that doesn't apply to internal boot or TPM-based license types; this PR replaces those references with generic boot device language, adds dynamic device type detection from GUID prefixes, and conditionally preserves flash-specific details for USB flash users.
Why This Exists
With internal boot support (single drive, multi-drive redundant) and TPM-based licensing, the registration page still referred exclusively to "USB Flash" — showing flash vendor/product fields and "Flash GUID" labels that are meaningless for non-flash boot devices. Users on internal boot or TPM setups saw confusing, inaccurate UI.
Resolution
bootDeviceTypecomputed property that derives device type from GUID prefixes (01-= internal boot single-device,02-= internal boot multi-device,03-= TPM, no prefix = flash).computedArrayandarrayWarningfrom the registration component (array status is no longer displayed).Implications / Review Concerns
01-= internal boot,02-= internal boot multi-device,03-= TPM) is based on the Asana task specification. If these prefixes change, onlyserver.tsneeds updating.registration.flashDrive,registration.flashGuid,registration.arrayStatus,registration.transferLicenseToNewFlash) were removed fromen.json. Other locale files still carry the old keys — they are harmless but could be cleaned up in a follow-up.GetCoreSettingsGraphQL query now also fetchescustomization.activationCode.system— verify the API schema supports this field.Behavior Changes
Implementation Summary
web/src/store/server.ts: AddedbootDeviceTypecomputed property mapping GUID prefixes to device types.02-now maps to'internalBootMulti'(distinct from01-='internalBoot').web/src/components/Registration.standalone.vue: ReplacedflashDriveItemswithbootDeviceItems, conditionally shows flash vendor/product only for flash boot type, removedcomputedArray/arrayWarningusage, updated template labels.web/src/locales/en.json: Added new keys (bootDevice,bootDeviceType.*includinginternalBootMulti,deviceGuid,transferLicenseToNewDevice), removed dead keys (flashDrive,flashGuid,arrayStatus,transferLicenseToNewFlash), retainedflashVendor/flashProduct(still used conditionally), updated allserver.state.*messages.web/__test__/components/Registration.test.ts: Updated assertions to match new label keys, removedflashVendor/flashProductfrom initial state.web/src/composables/gql/gql.ts/graphql.ts: Regenerated —GetCoreSettingsquery now includescustomization.activationCode.system.Tests
pnpm test(web)Summary by CodeRabbit
New Features
Refactor
Bug Fixes