Skip to content

feat(updates): add ordered updates for all connected components - #99

Merged
nixuuu merged 1 commit into
feat/updates-indicator-1from
feat/updates-indicator-2
Nov 4, 2026
Merged

nixuuu merged 1 commit into
feat/updates-indicator-1from
feat/updates-indicator-2

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 4, 2026

Copy link
Copy Markdown
Member

Stage 2: the same indicator becomes an updates center.

  • Items: gateway (self-updatable, or "Managed externally — pull the new image" for Docker), binary workers, agent CLIs on workers (Claude/Codex/Grok install/update), desktop apps connected as workers (remote "Update Canopy app").
  • Durable "Update all" in a safe order: gateway → workers → CLIs → remote desktop apps, gated by worker↔gateway protocol compatibility and owner permissions; a failure stops the chain with a clear error; each item shows state, progress and errors; the icon reflects the most important pending state. Links to Settings → Workers / App updates for details.
  • Grok CLI has no known release-notes source, so it shows versions only.

Checks: install, gen:check, typecheck, lint, format:check, check:tmp (1049 pass, 152 skip, 0 fail), web and desktop shell builds; integration tests for the ordered orchestration (order, compatibility gate, stop on failure, owner scoping). Browser checked in light/dark at desktop and phone widths.

Draft until the stack is done.

@nixuuu
nixuuu added this pull request to stack #100 November 4, 2026 20:53
@nixuuu
nixuuu marked this pull request as ready for review November 4, 2026 20:56
@nixuuu
nixuuu merged commit 2124728 into dev Nov 4, 2026
9 checks passed
@nixuuu
nixuuu deleted the feat/updates-indicator-2 branch November 4, 2026 20:56
nixuuu added a commit that referenced this pull request Nov 4, 2026
The sidebar updates popover covered most of the screen and Settings →
Workers → Updates was one heavy block with an empty accordion.

**Popover** (352 px, content height with a max and inner scroll; a
bottom sheet on phones): small header with the state and icon actions
(info, check now, update all only when something is outdated); one dense
row per item (icon · name · current → available · status chip · small
action), thin inline progress, up-to-date items folded into one line;
explanations moved into tooltips; "What's new" is a drill-in and is
simply absent when there are no notes (no placeholder). Sidebar icon
progress indicator fixed.

**Settings → Workers → Updates** uses the same rows: "All up to date ·
checked 1 min ago" with Check now; Gateway as one row (version · channel
· "Managed externally" once, pull instructions in a tooltip); release
channel saves on change; workers as compact rows with an action only
when outdated or failed; the order/results disclosure exists only after
a run with results. No empty accordions.

**Fix:** a worker stayed "Restarting" with a full progress bar after it
had already reconnected healthy on the target version — the gateway
waited for a final success report that could be lost; it now resolves on
the healthy reconnect.

Checks: install, gen:check, typecheck, lint, format:check, web build,
focused regressions; full suite 1,070 pass / 153 skip / 1 supervisor
timing failure that passes on its own (CI is the gate). Before/after
screenshots of every state with short and long texts, light/dark,
desktop/narrow/phone.

Fixes: #99
nixuuu added a commit that referenced this pull request Nov 5, 2026
…159)

On a gateway running from the Docker image, "Update all" planned the
gateway and then failed with "[failed_precondition] Managed externally —
Managed externally…", leaving "Updates stopped" in the popover.

**Cause:** #99 added Docker and other externally managed components to
the update-all plan, then rejected them when it ran.

**Fix**
- **The plan:** Update all includes only what Canopy updates itself.
- It skips externally managed gateways (Docker), external workers and
CLIs installed by external managers.
  - Skipped items never fail the run.
  - An empty plan is refused without recording a failed run.
- An old failure caused only by an external gateway is hidden once
nothing is actionable.
- **The UI:**
  - Update all appears only when something is actionable.
- External items show "Managed externally" instead of "Available" or
"External". Their info icon gives the steps, e.g. pull the new image
tag, then recreate the gateway container.
- When only external updates exist, the header says "Updates available
outside Canopy".
- **Error text:** the duplicated "Managed externally — Managed
externally" wording is fixed where it is built.

**Tests:** gateway integration tests for the planner.
- External gateway, external CLIs and one Canopy-managed worker: only
the worker updates, and the run succeeds.
- Only external items: the run is refused and no failure is recorded.

Copy audit (`docs/copy.md` §8):
- "Available" and "External" became "Managed externally" on external
items.
- The summary for external-only updates is "Updates available outside
Canopy".
- Update instructions are imperative.
- No fact is repeated.

Fixes: #99
nixuuu added a commit that referenced this pull request Nov 18, 2026
## Change

Canopy now updates supported global mise installations of Claude Code,
Codex and Grok from individual CLI controls and Update all. The recipe
activates exact targets with `mise use --global --yes --pin`, retains
installed versions and reactivates the previous version after failed
validation. Native and npm mise tool identities and custom
`MISE_DATA_DIR` roots are supported. Project overrides, multiple
configured versions, fixed installation paths and mise's `latest`
symlink keep manual instructions. Rollback restores an exact pin even
when the previous selector floated.

Update all no longer disables every CLI control in the popover.
Independent targets remain actionable while their own queued/running
steps, worker updates and computer restarts prevent conflicting actions.
The existing four concurrent scheduler slots and per-worker installer
resource locks remain in effect, including a shared mise configuration
lock through rollback.

CLI steps persist an attempt UUID before dispatch and carry it through
the authenticated local or linked InstallCli route. Stale failures
cannot fail a new attempt, and uncertain acknowledgements wait for
reports instead of failing after 60 seconds. A matching running attempt
waits through validation and rollback; confirmed target or newer
versions reconcile obsolete failures. Existing manual installations of
the same target are followed without another command, and waiting for a
different target remains bounded across gateway restarts.

The additive UI `install_id` field is opaque to computer routing;
WorkerLink compatibility and the frozen UpdateService are unchanged.
Older linked gateways still confirm success through the installed
version, but uncorrelated failures may wait until the step timeout. Full
attempt correlation requires updated gateways on both computers.
Behavior and release availability are documented separately.

## Verification

- Generated contracts with `bun run gen`.
- Focused `check:tmp` suites passed: `mise-cli`, `cli-discovery`,
`provider-cli`, `update-cli-attempts`, `update-center`,
`update-concurrency`, and `update-all-computers`. Coverage includes
rollback, shared resources, stale reports, lost acknowledgements,
durable restart identity, owner scoping and authenticated linked
routing; no temporary files remained.
- Worker, gateway and integration-test TypeScript checks, web Svelte
checks, scoped lint/format checks and diff checks passed locally.
- Inspected the actual popover components in Chromium at desktop and
phone widths in light and dark themes, including long names. Starting
one CLI left an independent CLI on another worker actionable; both
requests overlapped while reserved targets stayed blocked.
- Copy audit (§8): passed. New mise fallback messages explain the
unavailable update and next action; the new waiting timeout names the
problem and asks the user to check the worker and retry. Existing action
labels remain unchanged. No new confirmations, empty states, glossary
terms or decorative copy. Short, typical and long names remain readable;
status words and action labels convey meaning without colour alone.
- Full repository verification and builds are left to CI. Installers are
exercised with isolated fixtures; no live provider CLI updates or real
macOS/Windows verification were performed.

Fixes: #99
Fixes: #213
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.

1 participant