Commit 0bc7498
authored
refactor(registration): remove flash drive references for internal boot support (#1880)
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
- Replace all "flash drive" / "USB Flash" terminology in the
registration UI and error messages with generic "boot device" language.
- Add a `bootDeviceType` computed property that derives device type from
GUID prefixes (`01-` = internal boot single-device, `02-` = internal
boot multi-device, `03-` = TPM, no prefix = flash).
- Display the detected boot device type in the registration page's Boot
Device section.
- Conditionally show flash vendor and flash product rows only when the
boot device is USB flash (these fields carry real data from the API for
flash users).
- Remove `computedArray` and `arrayWarning` from the registration
component (array status is no longer displayed).
## Implications / Review Concerns
- The GUID prefix mapping (`01-` = internal boot, `02-` = internal boot
multi-device, `03-` = TPM) is based on the Asana task specification. If
these prefixes change, only `server.ts` needs updating.
- Dead locale keys (`registration.flashDrive`, `registration.flashGuid`,
`registration.arrayStatus`, `registration.transferLicenseToNewFlash`)
were removed from `en.json`. Other locale files still carry the old keys
— they are harmless but could be cleaned up in a follow-up.
- The `GetCoreSettings` GraphQL query now also fetches
`customization.activationCode.system` — verify the API schema supports
this field.
## Behavior Changes
- Registration page now shows "Boot Device" section header instead of
"Flash Drive".
- "Flash GUID" label becomes "Device GUID".
- New "Boot device type" row appears showing "USB Flash", "Internal
Boot", "Internal Boot (Multi-device)", or "TPM" based on the GUID
prefix.
- Flash vendor and flash product rows are shown **only for USB flash
boot devices**, hidden for internal boot and TPM.
- Array status row is no longer displayed.
- "Transfer License to New Flash" becomes "Transfer License to New
Device".
- All error/state messages (blacklisted, GUID mismatch, missing keyfile,
etc.) now use "boot device" instead of "USB Flash".
## Implementation Summary
- **`web/src/store/server.ts`**: Added `bootDeviceType` computed
property mapping GUID prefixes to device types. `02-` now maps to
`'internalBootMulti'` (distinct from `01-` = `'internalBoot'`).
- **`web/src/components/Registration.standalone.vue`**: Replaced
`flashDriveItems` with `bootDeviceItems`, conditionally shows flash
vendor/product only for flash boot type, removed
`computedArray`/`arrayWarning` usage, updated template labels.
- **`web/src/locales/en.json`**: Added new keys (`bootDevice`,
`bootDeviceType.*` including `internalBootMulti`, `deviceGuid`,
`transferLicenseToNewDevice`), removed dead keys (`flashDrive`,
`flashGuid`, `arrayStatus`, `transferLicenseToNewFlash`), retained
`flashVendor`/`flashProduct` (still used conditionally), updated all
`server.state.*` messages.
- **`web/__test__/components/Registration.test.ts`**: Updated assertions
to match new label keys, removed `flashVendor`/`flashProduct` from
initial state.
- **`web/src/composables/gql/gql.ts` / `graphql.ts`**: Regenerated —
`GetCoreSettings` query now includes
`customization.activationCode.system`.
## Tests
| Command | Environment | Result |
|---|---|---|
| `pnpm test` (web) | macOS / Node 22 / Vitest 3.2.4 | 517 passed, 6
skipped, 56 files |
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Core settings now include activation-code system info.
* UI now recognizes multiple boot device types (flash, internal,
internalMulti, tpm) so device-specific rows render appropriately.
* **Refactor**
* Terminology updated from "Flash" to "Boot Device"; "Device GUID"
replaces "Flash GUID".
* License action relabeled to "Transfer License to New Device".
* Translation keys updated for boot device labels and types.
* **Bug Fixes**
* Tests updated to reflect label changes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent aaa0372 commit 0bc7498
File tree
6 files changed
+64
-54
lines changed- web
- __test__/components
- src
- components
- composables/gql
- locales
- store
6 files changed
+64
-54
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | | - | |
127 | 125 | | |
128 | 126 | | |
129 | 127 | | |
| |||
219 | 217 | | |
220 | 218 | | |
221 | 219 | | |
222 | | - | |
| 220 | + | |
223 | 221 | | |
224 | 222 | | |
225 | 223 | | |
| |||
269 | 267 | | |
270 | 268 | | |
271 | 269 | | |
272 | | - | |
| 270 | + | |
273 | 271 | | |
274 | 272 | | |
275 | 273 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
48 | 46 | | |
| 47 | + | |
49 | 48 | | |
50 | 49 | | |
51 | | - | |
52 | | - | |
53 | 50 | | |
| 51 | + | |
| 52 | + | |
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
| |||
135 | 134 | | |
136 | 135 | | |
137 | 136 | | |
138 | | - | |
| 137 | + | |
139 | 138 | | |
140 | 139 | | |
141 | 140 | | |
142 | 141 | | |
143 | | - | |
| 142 | + | |
144 | 143 | | |
145 | 144 | | |
146 | 145 | | |
147 | 146 | | |
148 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
149 | 156 | | |
150 | 157 | | |
151 | 158 | | |
152 | 159 | | |
153 | 160 | | |
154 | 161 | | |
155 | 162 | | |
156 | | - | |
| 163 | + | |
157 | 164 | | |
158 | 165 | | |
159 | 166 | | |
| |||
174 | 181 | | |
175 | 182 | | |
176 | 183 | | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | 184 | | |
187 | 185 | | |
188 | 186 | | |
| |||
268 | 266 | | |
269 | 267 | | |
270 | 268 | | |
271 | | - | |
| 269 | + | |
272 | 270 | | |
273 | 271 | | |
274 | 272 | | |
| |||
329 | 327 | | |
330 | 328 | | |
331 | 329 | | |
332 | | - | |
| 330 | + | |
333 | 331 | | |
334 | | - | |
| 332 | + | |
335 | 333 | | |
336 | 334 | | |
337 | | - | |
| 335 | + | |
338 | 336 | | |
339 | | - | |
| 337 | + | |
340 | 338 | | |
341 | 339 | | |
342 | 340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
430 | | - | |
| 430 | + | |
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
| |||
0 commit comments