Skip to content

fix(slm-frontend): fleet store fetch actions return null on error, so a failed load renders as 'no data' #19068

Open

Description

@mrveiss

Problem

autobot-slm-frontend/src/stores/fleet.ts: the NPU fetch actions catch every error, write it to the store-wide error ref and return null. Examples are fetchNpuNodeMetrics (:820) and fetchNpuWorkerConfig (:833); the file has 6 return null sites. A caller therefore can't tell a failed request from "this node has no config or metrics".

Seen in the merge-train 58 review (#19064, the #14780 NPUDetailsPanel node-switch fix). The panel now resets per node and drops stale responses, but a failed load still renders as empty defaults, because the failure only reaches a store-level error the panel does not read for that node.

The fallback messages (Failed to fetch metrics for node ${nodeId}, Failed to fetch config for node ${nodeId}) are also hard-coded English, not i18n keys.

Acceptance criteria

  • The fleet store's fetch actions either rethrow or return a result that tells failure apart from empty, for every return null catch site in fleet.ts. The callers are updated, and NPUDetailsPanel shows a per-node error on a failed load.
  • No user-facing fallback message in fleet.ts is a hard-coded string; each one is an i18n key.
  • A test per action: a rejected API call is reported as a failure, not as null data.

Activity

  1. added
    needs-structureMissing goal milestone, matching phase label or native parent (#19522)
    on Nov 4, 2026
  2. github-actions commented on Nov 4, 2026

    @github-actions
    Contributor

    needs-structure: this issue is missing:

    • a native parent issue (add one, or write Parent: #N in the body), unless this is an umbrella with sub-issues

    The label clears on the next issue event once all three are present (#19522).

  3. github-actions commented on Nov 21, 2026

    @github-actions
    Contributor

    Landed in #21932, merge 9e603ba96c

  4. added
    needs-ac-evidenceClosed by a merge keyword; awaits an AC evidence table comment (#19520)
    on Nov 21, 2026
  5. mrveiss commented on Nov 21, 2026

    @mrveiss
    OwnerAuthor

    Closure evidence for #19068. Commit: 9e603ba (merge of #21932, ancestor of main; content commit 4f48a53). Gate 2: check-issue-close-refs.sh clear.

    • fetch actions rethrow, callers updated, per-node error: the 5 NPU reads in autobot-slm-frontend/src/stores/fleet.ts (e.g. fetchNpuWorkerConfig, ~:805-810) set error.value = errorText(err) then throw err; the only remaining return null is the selectedNode computed at :145, not a catch site. NPUDetailsPanel.vue:177 sets the per-node error, rendered at :196; test NPUDetailsPanel.nodeSwitch.test.ts "shows a per-node error when a load fails, and clears it for the next node (fix(slm-frontend): fleet store fetch actions return null on error, so a failed load renders as 'no data' #19068)".
    • NOT met: no user-facing fallback message in fleet.ts is a hard-coded string. The 25 catch fallbacks now use errorText() (utils/errorText.ts, translated default common.errors.unknown), but three thrown Node ${nodeId} not found errors remain hard-coded English (fleet.ts:460, :679, :715) and AssignNPURoleModal.vue:68 shows e.message to the user. Follow-up: fix(slm-frontend): fleet store 'Node not found' errors are hard-coded English #21963.
    • a test per action: fleet.npuFailures.test.ts "%s rejects and records the error when the API call fails" and "%s keeps a non-Error rejection as text" run for fetchNpuStatus, fetchNpuLoadBalancing, fetchNpuFleetMetrics, fetchNpuNodeMetrics, fetchNpuWorkerConfig.

    Issue stays open for the second criterion (#21963).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfrontendneeds-ac-evidenceClosed by a merge keyword; awaits an AC evidence table comment (#19520)needs-structureMissing goal milestone, matching phase label or native parent (#19522)phase:M3.6SLM platform screens

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions