feat(updates): add passive release update indicator - #845
Conversation
🔐 Codex Security Review
Review SummaryOverall Risk: NONE FindingsNo security, correctness, or reliability findings were identified in the reviewed diff. NotesReviewed Generated by Codex Security Review | |
e65112d to
67ae89e
Compare
67ae89e to
0ab51c9
Compare
0ab51c9 to
4eb031f
Compare
4f0e268 to
a041e05
Compare
a041e05 to
a2f61e0
Compare
There was a problem hiding this comment.
Pull request overview
Adds a proactive release-update notification UX to Proto Fleet, backed by a permission-aware update-status poller, and extends the shared toaster system to support persistent, clickable “info” toasts.
Changes:
- Added
useUpdateStatuspolling (15 min) forinstance:updatepermission holders and a newuseUpdateNotificationhook to drive a persistent toast + dismissible header pill. - Introduced
infotoast status andonClicksupport in the shared toaster/Toast UI, including a clickable toast body. - Added an Update Notification modal for the manual update command + release notes, wired globally via
AppLayoutandPageHeader.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| client/src/shared/features/toaster/types.ts | Adds optional onClick callback to toast type/props. |
| client/src/shared/features/toaster/constants.ts | Adds info status to toaster status set. |
| client/src/shared/features/toaster/components/Toaster/Toaster.tsx | Renders info toasts as “basic” toasts and passes onClick through to Toast. |
| client/src/shared/features/toaster/components/Toaster/Toaster.stories.tsx | Adds Storybook example for persistent clickable “update available” toast. |
| client/src/shared/features/toaster/components/Toast/Toast.tsx | Adds Info icon rendering and clickable toast-body button support. |
| client/src/shared/features/toaster/components/Toast/Toast.test.tsx | Tests clickable informational toast body behavior. |
| client/src/protoOS/features/settings/components/MiningPools/constants.ts | Adds STATUSES.info label mapping (“Notice”). |
| client/src/protoFleet/features/updates/useUpdateNotification.ts | New notification lifecycle hook (toast, dismissal storage, header pill, modal open/close). |
| client/src/protoFleet/features/updates/useUpdateNotification.test.tsx | Tests notification toast/pill/modal behavior and dismissal semantics. |
| client/src/protoFleet/features/updates/constants.ts | Adds localStorage key constant for dismissed update tag. |
| client/src/protoFleet/features/updates/components/UpdateNotificationModal.tsx | New modal rendering install command + release notes link. |
| client/src/protoFleet/features/updates/components/UpdateNotificationModal.stories.tsx | Storybook story for the update notification modal. |
| client/src/protoFleet/features/updates/api/useUpdateStatus.ts | New permission-aware polling hook with deduping to avoid unnecessary rerenders. |
| client/src/protoFleet/features/settings/components/Updates.test.tsx | Switches dismissed-tag key to shared constant import. |
| client/src/protoFleet/components/PageHeader/PageHeader.tsx | Adds update pill widget support and positioning in header widgets. |
| client/src/protoFleet/components/PageHeader/PageHeader.test.tsx | Adds test asserting update pill placement relative to “Continue setup”. |
| client/src/protoFleet/components/PageHeader/PageHeader.stories.tsx | Adds story demonstrating update pill alongside setup pill state. |
| client/src/protoFleet/components/PageHeader/headerWidgetLayout.ts | Includes update pill in phone header widget count/stacking logic. |
| client/src/protoFleet/components/NavigationMenu/NavigationMenu.stories.tsx | Adds permission seeding + baseline reset for deterministic nav rendering in stories. |
| client/src/protoFleet/components/AppLayout/AppLayout.tsx | Globally mounts update notification modal and plumbs header pill data. |
| client/src/protoFleet/components/AppLayout/AppLayout.test.tsx | Mocks update notification hook/modal and tests phone offset calculation with update pill. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: edfbec4104
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8c41aebb74
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a73f552a1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 584cc8fc2d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
584cc8f to
ad58b4a
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ad58b4a682
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
3e78949 to
54d2f82
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5c1133b2a9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
8498340 to
1b48092
Compare
Reviewable diff: +208/-57 across 6 files (excludes generated, test, and story files).
Summary
Adds a passive Update available pill to eligible Proto Fleet headers. Permission holders can use it to open
/settings/updates, which remains the authoritative place for release details and the install command. Because update discovery is useful but not operationally critical, fullscreen and other headerless routes intentionally do not poll or render the indicator.Stack: #841, #842, #843, and #844 are merged; this PR is 5/5 of phase one and its diff is relative to
main. It relies on those PRs for release discovery, theinstance:updatepermission, update-status RPC, and authoritative Settings workflow. Privileged host execution and true one-click upgrade remain out of scope here and are stacked in #835 → #836 → #837 → #838 → #839 → #840.How it works
On a route with the normal Fleet header, an authenticated
instance:updateholder polls status every 15 minutes and retains only the eligible version. An available version renders a compact header pill; activating it navigates to Settings, where status is fetched independently before any release notes or install command are shown. Hiding the shell header or entering the Updates page disables the indicator poll, and background failures simply hide stale indicator text without mutating global auth or permissions.Diagrams
Areas of the code involved
features/updates/api/useAvailableUpdate.tsfeatures/updates/useUpdateIndicator.tscomponents/AppLayoutcomponents/PageHeaderdocs/plans/...release-update-notifications-plan.mdKey technical decisions & trade-offs
/settings/updatesso the actionable page owns its status while mounted.Testing & validation
npm run test -- --runacross the update hooks, AppLayout, PageHeader, Settings Updates, and App: 62 passed, 3 skipped.npm exec --no -- tsc --noEmit.npm run lint.git diff --checkand pre-push client typecheck.