feat: add Software Updates Dashboard - #60
Merged
Merged
Conversation
Implements typed fetch wrappers for /updates/* endpoints with UpdatesApiError carrying HTTP status codes for 501 (no backend) vs other error discrimination.
…ests, optional PUT data
…ead code, icons, sidebar labels
There was a problem hiding this comment.
Pull request overview
Adds a new “Software Updates” dashboard view to the React SPA to monitor OTA/software update lifecycle via /api/v1/updates/* endpoints, following a similar UX pattern to the existing Faults Dashboard.
Changes:
- Introduces a raw
updates-apihelper module (with typed errors) plus auseUpdatesPollinghook with adaptive polling and visibility pause. - Adds
UpdatesDashboardandUpdateCardUI (status badges, progress/sub-progress, actions, details dialog) with corresponding tests. - Wires navigation into the sidebar quick actions and adds a new
updates-dashboardview mode in the app shell/detail panel.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib/updates-api.ts | New fetch helpers + UpdatesApiError for updates endpoints. |
| src/lib/updates-api.test.ts | Unit tests for updates API helpers. |
| src/lib/types.ts | Adds update-related types (UpdateStatus, UpdateEntry, etc.). |
| src/hooks/useUpdatesPolling.ts | New polling hook with adaptive interval + visibility handling. |
| src/hooks/useUpdatesPolling.test.ts | Hook tests covering polling/visibility/refresh/error cases. |
| src/components/UpdatesDashboard.tsx | Dashboard UI with summary counts and state handling (loading/error/501/empty). |
| src/components/UpdatesDashboard.test.tsx | Component tests for dashboard rendering and actions. |
| src/components/UpdateCard.tsx | Per-update card UI with progress, actions, and details dialog. |
| src/components/UpdateCard.test.tsx | Component tests for card states and interactions. |
| src/components/EntityTreeSidebar.tsx | Adds “Software Updates” quick action button. |
| src/components/EntityDetailPanel.tsx | Adds updates-dashboard view mode rendering. |
| src/App.tsx | Adds updates dashboard navigation + view mode plumbing. |
…ilable, conditional buttons
mfaferek93
reviewed
Apr 12, 2026
…te, runtime validation, mutation signals
mfaferek93
self-requested a review
April 12, 2026 16:49
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Summary
Add a Software Updates Dashboard view for monitoring OTA update lifecycle. Server-level dashboard (same pattern as Faults Dashboard) that polls
/api/v1/updates/*endpoints and displays update status with progress tracking.New components:
Navigation: new "Software Updates" button in sidebar Quick Actions, new
updates-dashboardViewMode.Issue
Type
Testing
npm run lintandnpm run typecheckcleanChecklist
npm run lint)npm run build)