Repository navigation
feat(updates): show update states at once in a calmer updates popover - #743
Merged
Merged
Conversation
The popover now has one summary line with a single "N of M done" counter and the header divider as the run's bar. Rows keep two lines with a fixed badge slot and one icon action (download, power, repeat, plus, info). Arrow-path is Check now only. Clicking Update all, Retry failed or a row action shows Queued/Starting before the gateway answers. Reads keep going while an action is pending. Rows show the further of their run step and their own report. The gateway launches the first steps before answering Update all, adds retry_failed and UpdateStep.finished_at, and no longer calls a computer that announced its own restart "unavailable". A restart warns only after 3 minutes. This app's restart is disabled while Update all runs. The planner, status vocabulary and computer rows live in @canopy/domain, shared by web and the mobile updates sheet.
nixuuu
added a commit
that referenced
this pull request
Nov 15, 2026
nixuuu
added a commit
that referenced
this pull request
Nov 15, 2026
nixuuu
added a commit
that referenced
this pull request
Nov 15, 2026
Paired desktop apps in remote gateway mode already support whole-app updates through `DesktopControlService`. The shared updates row could still say “Managed externally” or “Offline”, disable its action based on the worker’s separate UpdateService connection, and show the old “updates itself” instructions. Use the desktop control connection and the app’s own newer release for the row, action, and version target in both the footer popover and Settings → Workers → Updates. Show “Update Canopy app” when available, explain how to reconnect or pair when unavailable, and describe whole-app updates when current. Update all skips disconnected apps with a reason. The local bundled gateway/worker remain one row, labelled “This Canopy app”. Related: #536, #743 Validation passed: `bun install`, `bun run gen:check`, full `bun run typecheck` (plus a final web typecheck after the copy changes), `bun run lint`, `bun run format:check`, and the web build. `TMPDIR=/var/tmp nice -n 10 bun run check:tmp tests/integration/desktop-updates.test.ts tests/integration/updates.test.ts tests/integration/update-center.test.ts tests/integration/updates-bundled.test.ts`: **44 passed, 0 failed, nothing left in the temp dir**. Full `bun run check:tmp` terminated with SIGTERM before a final result; it is not counted as passed. This PR stays draft pending that repository-wide gate. Browser review passed for the shared popover and Workers updates rows in light/dark, desktop and phone widths, with short, typical and long names. Confirmed the enabled “Update Canopy app” action without the worker update stream, current-version note, visible recovery instructions, and the single local bundled app row. Used the development gallery in an isolated review checkout, with only its shell connection guard bypassed there; no live gateway or native Electron installation was involved. Removed the review server and checkout afterwards. Copy audit (§8): - “Managed by the Canopy desktop app: it updates itself…” → “Updates with the Canopy app. You can update it here when a new version is available.” Explains the available remote action. - “Update {worker name}” → “Update Canopy app”. Names the whole app being updated. - “Desktop app is offline.” → “Desktop app is offline. Open Canopy on that computer and reconnect to this gateway.” Gives a recovery action, visible below the row. - Pairing fallback now names this gateway and Settings → App updates for an already paired older app. Sentences follow length limits, sentence case, active voice, glossary, and punctuation. No humour, new terms, colour-only cues, or extra empty states. - Unsupported-app copy now explains the version limitation and points to Settings → App updates. “This computer” → “This Canopy app” for the bundled local row names what updates. Checked wrapping and truncation at desktop and phone widths. Native signed macOS installation, notification, and Squirrel restart require a Mac app run. Integration replaces only the Electron main updater boundary; it exercises real pairing, worker proof, gateway, TLS control stream, reports, idle wait, restart/reconnect, and Update all.
nixuuu
added a commit
that referenced
this pull request
Nov 15, 2026
## Change In remote desktop mode, Updates showed the current Canopy app as “This computer” and its worker as a second computer. Show one row with the computer's name in both the sidebar popover and Settings → Workers → Updates. Match by the enrolled worker ID exposed through the desktop bridge. Keep local download progress and cached-package restart controls, combine gateway update-step status and recovery actions, and retain the worker's agent CLIs. Other workers, including computers with the same name, remain separate. Older bridges without the ID keep the existing rows. The change requires a new desktop build. Related: #743, #771 ## Verification - Passed: web and desktop typechecks; lint and formatting for edited files; diff review. - Browser review with development fixtures: light/dark at desktop, narrow and phone widths; short, typical and long names; downloading, downloaded, failed and waiting states. Confirmed duplicate names remain separate, missing identity and web clients keep their workers, cached updates remain restartable after a request failure, and Update targets the correct worker. - Extended desktop runtime integration coverage for enrolled identity across pairing, restart and unavailable-worker mode. All five tests were skipped locally because the built runtime was absent. - Full generation checks, repository-wide checks, tests and selected builds remain with CI. Native signed desktop installation was not exercised locally. ## Copy audit Passed `docs/copy.md` §8. “This computer” plus a repeated worker name → one computer-name row, removing duplicate information. Moved existing Update, Retry, Dismiss and restart copy into the combined row; no new terms or humour. Actions name their effect, failure text gives a recovery action, and meaning does not depend on colour. Checked truncation and wrapping with short, typical and long names at desktop and phone widths in both themes.
This was referenced Nov 16, 2026
nixuuu
added a commit
that referenced
this pull request
Nov 21, 2026
nixuuu
added a commit
that referenced
this pull request
Nov 21, 2026
## Change - Report when the gateway is starting or shutting down, even while GetUpdates can still answer. The Updates panel shows the live phase, refreshes automatically, and brings update actions back when the gateway is ready. - Show the selected version for an active update and only show an available target when there is a newer release. Refresh after a request loses a race with startup or shutdown. - Show binary worker preparation, downloading, restart and reconnection. Keep the restart visible during the expected disconnect and wait for the worker to confirm readiness before recording success. ## Verification - Ran 44 focused tests covering the updater, gRPC lifecycle, durable update state and bulk scheduling. Re-ran the seven shared status tests after the final precedence change. - Generated the protobuf bindings and ran typechecks for gateway, worker, mobile and web. Checked lint, formatting and the diff for changed files. - Exercised the shared web and desktop renderer in Chrome at 390 px and 1280 px, including rejected update requests, automatic refresh and action recovery. - Native sheet verification is pending. There is no configured iOS simulator and the Android emulator host lacks the required build SDK. - CI owns the repository-wide checks and builds. ## Copy audit - “Updated” → “Starting” or “Shutting down” when the gateway is transitioning. The badge and short second line explain when updates resume. - “Updating” → “Downloading” while a binary downloads. “Preparing” and “Reconnecting” identify separate phases with a short explanation in the row. - The rejection message now names the gateway transition and says when to retry. Labels use sentence case and convey state in text. Checked short and long worker names and both browser widths. Fixes: #743
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.
Summary
Redesign of the sidebar Updates popover and the mobile Updates sheet, following the approved audit. The goal: an immediate state on every click, one summary, rows that never move.
Popover
Starting update…,Updating · 2 of 5 done,1 update failed · 4 updated,All 5 updates finished,5 updates available,Up to date · Checked 5:39 PM). The header divider doubles as the run's 2 px progress bar.N of M done. M counts every planned step, including queued ones, so the old "Updating 1" next to "0/2" can't happen.· K failedappears only when K > 0.Settingslink;What's newonly when there are unseen notes; one labelled primary action on the right:Update all,Restart to update,Retry failed, or a disabledStarting…/Updating…with a spinner.arrow-down-tray, with a dot when something waits, a progress ring while updating, andexclamation-circleon failure. No more green check for "downloaded" and no spinning ⟳.Rows (web
UpdateItem, mobileUpdateRow)Always two lines. The badge sits in a fixed slot, the bar in the bottom padding, and the action in a fixed column, so a state change only swaps text (
t-swap). Only an error expands, and only on click.One vocabulary from
@canopy/domain/release/update-status: Up to date (quiet text), Available, Downloaded (was "Ready"), Queued, Starting, Updating, Waiting, Restarting, Updated (the only green, for 1 h, viaUpdateStep.finished_at) and Failed. Edge states keep their own words.Icon actions, one meaning each, with a tooltip and
aria-label:arrow-down-tray<name>power(new)repeat(new)plusinformation-circlearrow-path(⟳) is used only for Check now. There is no cancel glyph, because the API has no cancel action.A feed check no longer turns every row into "Checking".
Immediate states, root cause of the late statuses
reload()was blocked while an action was pending, and rows read the targets' own reports, not the run's steps.UpdatesState(web) and the mobile state apply an overlay as soon as you click: every planned step showsQueued(plannedUpdateRun, the same plan the gateway writes), a row action showsStarting, and Retry failed marks its steps. The gateway's answer replaces the overlay; an error reverts it.UpdateCenter.begin()plans, persists and launches the first steps before answering, and the response reuses the planning snapshot. The first answer to Update all already hasrunningsteps.Calm restarts
Restartingwith "Restarting to update…".Gateway / contracts
ManageUpdates.retry_failed(action string; proto comment only): re-queues every failed or blocked step of the stopped run in one durable write, keeps successes and their versions, and needsconfirm_restartwhen this app is among them.UpdateStep.finished_at = 12.updatePlanmoved into the domain asplannedUpdateRun.computerUpdate()moved from web to@canopy/domain/release/computer-update, so web and mobile derive rows the same way.Bug fix: this app's "Restart to update" stayed enabled during Update all (
CompactAppUpdate.svelte, old line 89). A click restarted this computer mid-run, before the linked computers finished. Row actions are now disabled while a run is active or an action is pending. NoFixes:link: the enable logic dates from #207, and Update all already included this app before #700, so no recent PR introduced it.Mobile parity: the same summary, rows, icons, overlay, footer and trigger. JS/TS only.
bun.lock, the mobilepackage.json, app config, plugins and native folders are unchanged, so the runtime fingerprint is unchanged and this ships OTA. No EAS was run.Tests
packages/domain/src/release/update-status.test.ts: the shared planner predicts the gateway's steps and their row keys (skipped steps apart, this computer last); rows never go back; Updated stays an hour; the single counter; restart grace.tests/integration/update-concurrency.test.ts: Update all answers with its first steps already running, from the snapshot it planned with; Retry failed re-queues every failed step at once, keeps successes, rejects a stale run id and a second retry.linked-updates,paired-app-updates,updates-bundled,apps/desktop/test/update-controller.Checks
bun install·bun run gen:check·bun run typecheck·bun run lint·bun run format:check· the focused tests above (all update suites:update-center,update-concurrency,updates-bundled,stale-app-updates,update-all-computers,paired-app-updates,linked-updates, desktopupdate-controller, domain) ·bun run --filter @canopy/web build·expo exportfor Android and iOS.Copy audit (docs/copy.md §8)
Updates in progress(header)Updating · 2 of 5 doneUpdating 1 · 0 done · 0 failedUpdate results · 0/2(popover)Mac-Studio… · Canopy app · UpdatingReadyDownloadedUpdating…(presence badge)RestartingWaiting for idleWaiting+Restarts after its current turns end.{name} is unavailable. Trying again automatically.(during its own restart)Restarting to update…, after 3 minStill restarting after N min. Check that computer.This Canopy appThis computerChecked 5:39 PMon every rowUp to date · Checked 5:39 PMShow update progressUpdating…while disabled)Update details/App updatesSettingsWhat's newalwaysRestart to update Canopy. This stops agents running on this computer.Restart to update. Agents running on this computer stop.Request update again on XRetryInstalling(CLI)UpdatingAgent CLIs · Installing…(mobile)Agent CLIs · 6 · UpdatingStarting update…,Starting…,Retry failed,1 update failed · 4 updated,All 5 updates finishedGlossary: computer, worker, agent CLI, update channel; no new terms. No sentences with "soul". Live numbers use
tabular-numsand sit at the end of the line. Checked with short, typical and long names (the gallery has "Build server in the rack room · linux-x64 · 64 GB" and "Sleeping computer with a rather long name") at desktop and phone width, light and dark.Browser review
On the review host: the
/dev/updatesgallery against a local gateway, captured with Playwright, light + dark, desktop (1100 px) + phone (390 px), in every state. New gallery params:state=quiet,state=starting,restart=1|slow.States checked: all up to date, available, starting (immediate), updating in parallel with a restarting computer, slow restart, one failed, finished.