Skip to content

fix: Clarify missing license device status#1999

Open
elibosley wants to merge 1 commit intomainfrom
codex/clarify-license-device-status
Open

fix: Clarify missing license device status#1999
elibosley wants to merge 1 commit intomainfrom
codex/clarify-license-device-status

Conversation

@elibosley
Copy link
Copy Markdown
Member

@elibosley elibosley commented May 7, 2026

Summary

Clarifies the registration error shown when Unraid cannot find a valid licensing device during internal boot.

Root Cause

The ENOFLASH* state was presented as a boot-device access failure. In internal boot scenarios without TPM or a USB flash device available for licensing, that copy made users think their boot device was broken rather than missing a license-capable device.

Changes

  • Updates the shared ENOFLASH English copy to say no valid TPM or USB flash device was detected for licensing.
  • Makes the onboarding license step map ENOFLASH* states to a clear "No valid license device detected" status instead of Unregistered.
  • Adds regression coverage for both onboarding and the full registration page.

Validation

  • pnpm codegen
  • NODE_OPTIONS=--no-experimental-webstorage pnpm exec vitest run __test__/components/Onboarding/OnboardingLicenseStep.test.ts __test__/components/Registration.test.ts
  • pnpm exec vue-tsc --noEmit --pretty false
  • pnpm exec eslint src/components/Onboarding/steps/OnboardingLicenseStep.vue __test__/components/Onboarding/OnboardingLicenseStep.test.ts __test__/components/Registration.test.ts
  • pnpm exec prettier --check src/components/Onboarding/steps/OnboardingLicenseStep.vue src/locales/en.json __test__/components/Onboarding/OnboardingLicenseStep.test.ts __test__/components/Registration.test.ts
  • pnpm build

FeatureOS: https://product.unraid.net/p/unclear-status-when-there-s-no-licensing-device-available

Summary by CodeRabbit

Release Notes

  • New Features

    • Enhanced the onboarding experience by adding new status messaging that informs users when required license device hardware is unavailable or cannot be detected
  • Tests

    • Expanded test coverage to verify license device detection and registration state handling across onboarding scenarios

- Purpose: clarify the ENOFLASH registration state when no valid licensing device is available.\n- Before: the UI described ENOFLASH as a boot-device access problem, which made internal-boot users think their boot pool was broken.\n- Problem: FeatureOS 451885 reports users without TPM or USB flash licensing devices misread the error as a boot failure instead of a licensing-device issue.\n- New behavior: registration and onboarding now say that no valid license device was detected.\n- Implementation: maps ENOFLASH states to explicit onboarding status text and updates the shared ENOFLASH locale copy to mention TPM and USB flash licensing devices.\n- Validation: added regression coverage for onboarding and registration ENOFLASH rendering; ran web tests, typecheck, lint, prettier, codegen, and build.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 7, 2026

Review Change Stack

Walkthrough

The PR adds support for detecting and displaying a "no valid license device" state in the onboarding license step. The component now uses ReadonlySet membership checks instead of array includes, introduces a NO_LICENSE_DEVICE_STATES constant, adds a corresponding localization key, and includes tests validating the new behavior when the registration state is ENOFLASH.

Changes

License Device Detection

Layer / File(s) Summary
State Constants & Store Setup
web/src/components/Onboarding/steps/OnboardingLicenseStep.vue
VALID_LICENSE_STATES and NO_LICENSE_DEVICE_STATES are introduced as ReadonlySet constants; store refs are adjusted and membership-based computed properties hasValidLicense and hasNoLicenseDevice replace array includes checks.
Localization Entry
web/src/locales/en.json
New translation key onboarding.licenseStep.status.noLicenseDevice with text "No valid license device detected".
Component Status Logic
web/src/components/Onboarding/steps/OnboardingLicenseStep.vue
statusText computed property is refactored to check hasNoLicenseDevice first and display the no-device message, falling back to Registered/Unregistered based on hasValidLicense.
Test Coverage
web/__test__/components/Onboarding/OnboardingLicenseStep.test.ts, web/__test__/components/Registration.test.ts
New test cases verify the ENOFLASH state renders "No valid license device detected" in both components and does not render "Unregistered".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A license device state now shines so bright,
When no flash is found, we show the right message—
ReadonlySets replace old array checks,
Tests confirm the ENOFLASH path works,
Localization whispers "no device detected!" ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title 'fix: Clarify missing license device status' accurately summarizes the main change: updating the UI to provide clearer messaging when no valid license device is detected, replacing the misleading 'Unregistered' status.

✏️ 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/clarify-license-device-status

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

@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.59%. Comparing base (7af4c77) to head (0bdfef3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1999      +/-   ##
==========================================
+ Coverage   52.57%   52.59%   +0.02%     
==========================================
  Files        1033     1033              
  Lines       71659    71682      +23     
  Branches     8176     8180       +4     
==========================================
+ Hits        37673    37701      +28     
+ Misses      33860    33855       -5     
  Partials      126      126              

☔ 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

github-actions Bot commented May 7, 2026

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

@elibosley elibosley changed the title [codex] Clarify missing license device status fix: Clarify missing license device status May 7, 2026
@elibosley elibosley marked this pull request as ready for review May 7, 2026 16:06
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