Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: unraid/api
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: unraid/api
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: feat/internal-boot-api
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 8 commits
  • 11 files changed
  • 1 contributor

Commits on Mar 9, 2026

  1. feat(array): expose internal boot disks as BOOT

    - Purpose: align array boot detection with Unraid/webgui by honoring \ entries whose type is \, and expose that distinction in GraphQL.
    - Before: the API parser collapsed internal boot semantics into existing disk categories, so \ could miss internal boot devices and clients could not distinguish boot-pool entries from flash or cache disks.
    - Problem: this diverged from the source-of-truth in emhttp/webgui, caused incorrect \ results for internal boot systems, and hid the boot role from generated client types.
    - Change: add \ to \, preserve \ from \ in the slots parser, and select \ using the same boot-disk precedence as webgui with legacy flash fallback.
    - How: update the array schema and generated GraphQL artifacts, carry non-enumerated fs status needed for boot selection, add parser and array tests, and keep cache/disk grouping separate from boot-only entries.
    Ajit-Mehrotra committed Mar 9, 2026
    Configuration menu
    Copy the full SHA
    a5af026 View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2026

  1. feat(array): expose boot devices collection

    - Purpose: expose all detected boot devices while keeping a single selected boot entry for compatibility.
    - Before: the API only returned one boot disk and could not represent mirrored internal boot members.
    - Problem: internal boot can expose multiple type="Boot" entries in disks.ini, but clients had no way to inspect the full boot set.
    - Change: add array.bootDevices, deprecate array.boot, and select array.boot from the active /boot-mounted boot member when multiple boot disks exist.
    - Details: preserve boot-specific runtime metadata from disks.ini parsing, update array boot selection logic, add tests, and regenerate GraphQL-facing types/schema artifacts.
    Ajit-Mehrotra committed Mar 10, 2026
    Configuration menu
    Copy the full SHA
    937460f View commit details
    Browse the repository at this point in the history
  2. fix(api): build shared before type checks

    - Purpose: make root and api type-check runs deterministic in a clean workspace.
    - Before: api type-check could run before @unraid/shared had built dist artifacts, which broke workspace package resolution.
    - Problem: unresolved @unraid/shared imports cascaded into many false type errors across API models and tests.
    - Change: add a pretype-check step that builds @unraid/shared before running tsc in the API package.
    - Details: this keeps pnpm type-check green without changing runtime behavior or broadening TypeScript path hacks.
    Ajit-Mehrotra committed Mar 10, 2026
    Configuration menu
    Copy the full SHA
    fb3b50a View commit details
    Browse the repository at this point in the history
  3. refactor(array): keep boot field as active disk

    - Purpose: keep the existing array.boot field as a supported part of the contract.
    - Before: array.boot was marked deprecated even though it still represents the active boot disk clients care about.
    - Problem: the deprecation suggested clients should stop using array.boot entirely, which did not match the intended API design.
    - Change: remove the deprecation and update the field description to state that boot returns the active boot disk.
    - Details: update the source GraphQL model and sync the generated schema and client type artifacts in api and web.
    Ajit-Mehrotra committed Mar 10, 2026
    Configuration menu
    Copy the full SHA
    5baaeab View commit details
    Browse the repository at this point in the history
  4. docs(array): clarify boot metadata docs

    - Purpose: address the remaining CodeRabbit review notes on the internal boot API changes.
    - Before: the public disk type docs still said Array even though the enum value is DATA, and the internal-only boot-selection metadata did not explain why it stays off the GraphQL schema.
    - Problem: client typings were misleading and the internal fsStatus/fsMountpoint fields looked like accidental omissions.
    - Change: update the disk type description to reference Data (DATA) and document that fsStatus/fsMountpoint are runtime-only helpers kept out of GraphQL and object serialization.
    - Details: sync the source model, slots parser comment, and generated API/web GraphQL artifacts with the clarified behavior.
    Ajit-Mehrotra committed Mar 10, 2026
    Configuration menu
    Copy the full SHA
    f394c68 View commit details
    Browse the repository at this point in the history
  5. Revert "fix(api): build shared before type checks"

    This reverts commit fb3b50a.
    Ajit-Mehrotra committed Mar 10, 2026
    Configuration menu
    Copy the full SHA
    bce81a6 View commit details
    Browse the repository at this point in the history
  6. fix(onboarding): reject USB disks for internal boot

    - Purpose: block USB transport devices from being used by createInternalBootPool during onboarding.
    - Before: the mutation only rejected duplicate device ids and would accept USB-backed selections if a caller submitted them directly.
    - Problem: internal boot on USB does not make sense and backend acceptance left the API vulnerable even if the UI eventually filtered candidates.
    - Change: validate selected device ids against emhttp disk transport metadata and return a validation error when any selected device resolves to USB.
    - How: normalize submitted identifiers, map emhttp device ids to disk devices, detect usb transport in emhttp disk state, and cover the rejection path with a service spec.
    Ajit-Mehrotra committed Mar 10, 2026
    Configuration menu
    Copy the full SHA
    2412dad View commit details
    Browse the repository at this point in the history
  7. chore(api-cli): commit generated file normalization

    - Purpose: capture the remaining generated API CLI file changes left unstaged after the USB internal-boot fix.
    - Before: the worktree still contained unstaged generated-file diffs in the API CLI output.
    - Problem: leaving generated drift behind makes the branch look dirty and obscures the intentional backend change.
    - Change: commit the generated API CLI formatting and newline normalization separately from the functional onboarding fix.
    - How: stage only the generated files under api/src/unraid-api/cli/generated and record them as a standalone chore commit.
    Ajit-Mehrotra committed Mar 10, 2026
    Configuration menu
    Copy the full SHA
    ba08b20 View commit details
    Browse the repository at this point in the history
Loading