Skip to content

feat: add Software Updates Dashboard - #60

Merged
bburda merged 14 commits into
mainfrom
feature/updates-dashboard
Apr 12, 2026
Merged

feat: add Software Updates Dashboard#60
bburda merged 14 commits into
mainfrom
feature/updates-dashboard

Conversation

@bburda

@bburda bburda commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

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:

  • UpdateCard - single update card with status badge, progress bar, sub-progress list, action buttons, and View Details dialog
  • UpdatesDashboard - grid of UpdateCards with summary counts, empty/error/501 states, and adaptive polling (5s idle, 2s when active)
  • useUpdatesPolling hook - self-contained polling with visibility pause, AbortController cleanup, and error recovery
  • updates-api.ts - raw fetch helpers for all 7 update endpoints (generated client has broken type resolution, tracked in [BUG] Published npm package missing generated/ types - paths resolves to any ros2_medkit_clients#19)

Navigation: new "Software Updates" button in sidebar Quick Actions, new updates-dashboard ViewMode.


Issue


Type

  • Bug fix
  • New feature
  • Breaking change
  • Documentation only

Testing

  • 42 new tests across 4 test files (updates-api, useUpdatesPolling, UpdateCard, UpdatesDashboard)
  • 332 total tests passing, no regressions
  • npm run lint and npm run typecheck clean
  • Manual verification: sidebar button visible, dashboard renders all states

Checklist

  • Breaking changes are clearly described (and announced in docs / changelog if needed)
  • Linting passes (npm run lint)
  • Build succeeds (npm run build)
  • Docs were updated if behavior or public API changed

Copilot AI review requested due to automatic review settings April 12, 2026 15:33
@bburda bburda self-assigned this Apr 12, 2026
@bburda
bburda requested a review from mfaferek93 April 12, 2026 15:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-api helper module (with typed errors) plus a useUpdatesPolling hook with adaptive polling and visibility pause.
  • Adds UpdatesDashboard and UpdateCard UI (status badges, progress/sub-progress, actions, details dialog) with corresponding tests.
  • Wires navigation into the sidebar quick actions and adds a new updates-dashboard view 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.

Comment thread src/hooks/useUpdatesPolling.ts
Comment thread src/lib/updates-api.ts
Comment thread src/components/UpdateCard.tsx
Comment thread src/components/EntityTreeSidebar.tsx Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Comment thread src/components/UpdateCard.tsx
Comment thread src/components/UpdateCard.tsx Outdated
Comment thread src/components/UpdateCard.tsx
Comment thread src/components/EntityTreeSidebar.tsx

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Comment thread src/components/UpdatesDashboard.tsx

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Comment thread src/hooks/useUpdatesPolling.ts
Comment thread src/components/UpdateCard.tsx Outdated
Comment thread src/components/UpdateCard.tsx
Comment thread src/lib/updates-api.ts Outdated
Comment thread src/lib/updates-api.ts Outdated
Comment thread src/components/UpdateCard.tsx
@mfaferek93
mfaferek93 self-requested a review April 12, 2026 16:49

@mfaferek93 mfaferek93 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@bburda
bburda merged commit bee0a82 into main Apr 12, 2026
3 checks passed
@bburda
bburda deleted the feature/updates-dashboard branch April 12, 2026 17:42
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.

Add Software Updates tab

3 participants