feat: add node update alerts with changelog tab and skip-version handling (#1463)

* feat: add node update alerts with changelog tab and skip-version handling

- Add node_update_available notification category with blue/brand bell dot
- Route node_update_available notifications to Fleet -> Node updates sheet
- Add Changelog tab to NodeUpdatesSheet with GitHub release notes
- Add per-node skip-version persistence (node_update_skips table)
- Skip hides update CTA on node card and sheet; re-surfaces on newer version
- Skipped nodes excluded from Update all backend filter
- Add pulsating dot indicator on Changelog tab when updates available
- Always-visible View changelog action in notification row bottom
- Admin-only for all mutating controls (skip, unskip, update)
- Backend tests for skip-version semantics (15 tests)
- Update fleet-view.mdx, remote-updates.mdx, and OpenAPI spec

* fix: address audit findings - nested button, stale changelog, semver normalization, mobile intent

- Move View changelog button outside routable button (sibling element)
- Fix aria-label for node_update_available notification rows
- Support ?recheck=true on release-notes endpoint
- Invalidate release notes cache on forced recheck
- Store normalized semver (semver.valid strips v prefix)
- Skip fleetUpdatesIntent on mobile (desktop only)
- Add v-prefix normalization test

* fix: restore View changelog on same line as timestamp, opposite sides

The button is always visible at the bottom right of the notification card,
on the same row as the timestamp (just now), using justify-between layout.

* fix: update tests for node_update_available category and release-notes fetch

- Backend: monitor-service tests now expect node_update_available instead of system
- Frontend: NodeUpdatesSheet tests mock release-notes API call to prevent undefined then()

* fix: resolve ci lint failures
This commit is contained in:
Anso
2026-06-26 00:07:51 -04:00
committed by GitHub
parent 0384c47d1e
commit 315e8b6379
21 changed files with 789 additions and 49 deletions
+85
View File
@@ -2372,11 +2372,96 @@ paths:
type: string
nullable: true
enum: [updating, completed, timeout, failed, null]
skipActive:
type: boolean
skippedVersion:
type: string
nullable: true
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
/api/fleet/nodes/{nodeId}/skip-version:
post:
operationId: skipNodeVersion
tags: [Fleet]
summary: Skip a node version
description: Marks a version as skipped for a node, hiding the update prompt and excluding it from update-all. Admin only.
parameters:
- name: nodeId
in: path
required: true
schema:
type: integer
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [version]
properties:
version:
type: string
description: Semver version string to skip.
responses:
"204":
description: Skip recorded.
"400":
description: Invalid parameters.
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"404":
description: Node not found.
delete:
operationId: unskipNodeVersion
tags: [Fleet]
summary: Clear a node version skip
description: Removes the skipped-version record for a node. Admin only.
parameters:
- name: nodeId
in: path
required: true
schema:
type: integer
responses:
"204":
description: Skip cleared.
"400":
description: Invalid parameters.
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"404":
description: Node not found.
/api/fleet/update-status/release-notes:
get:
operationId: getFleetReleaseNotes
tags: [Fleet]
summary: Release notes for the latest Sencho version
description: Returns the GitHub release body and URL for the latest Sencho release, used by the Changelog tab.
responses:
"200":
description: Release notes.
content:
application/json:
schema:
type: object
properties:
releaseNotes:
type: string
nullable: true
htmlUrl:
type: string
nullable: true
"401":
$ref: "#/components/responses/Unauthorized"
/api/fleet/nodes/{nodeId}/update:
post:
operationId: triggerNodeUpdate