Skip to content

feat(gateway): announce updates and restarts to every client - #369

Merged
nixuuu merged 1 commit into
devfrom
feat/update-announce-1
Nov 8, 2026
Merged

nixuuu merged 1 commit into
devfrom
feat/update-announce-1

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Change

Announce a planned gateway interruption to every overview subscriber and linked computer before updates and restarts. The signal includes the attempt, target version, start time and five-minute window. A private owner-scoped checkpoint survives gateway replacement and exposes the running version with a succeeded, failed or rolled-back outcome.

Wire self-updates, desktop-owned update exits, remote app restart reports and best-effort health restarts into the signal. Linked computers show a returned failure or rollback and retain an available retry action. Already accepted unary calls can return their acknowledgement during a planned departure; no command is replayed.

Only additive UI/link protobuf changes are included. canopy.update.v1 and WORKER_LINK_PROTOCOL remain unchanged. This is the bottom layer of a draft stack targeting dev.

Verification

  • Focused integration checks passed: gateway departures (3), linked updates (9), phone owner scoping (1), updater/supervisor behavior (19). Coverage includes two overview subscribers, real pinned phone TLS, linked presence, durable recovery, failed/rolled-back outcomes and owner isolation.
  • bun install, bun run gen:check, typecheck, lint, formatting and the web build passed. The final full bun run check:tmp passed on the top layer: 1837 pass, 161 skip, 0 fail across 326 files; no test-owned temp entries remained. Opt-in live tests were skipped.
  • Viewed the web update gallery in Chromium: light/dark, 1280 and 390 px widths, short/typical/long names and versions, updating/restarting/rollback states. No UI test suite or screenshots were committed.
  • Not exercised: an installed desktop app's real updater or an unresponsive health restart. A gateway that cannot answer RPC cannot deliver a departure signal.

Copy audit — docs/copy.md §8: a returned peer previously could look current; it now shows “Failed” or “Rolled back”, its version and details with a retry path. New fallback reasons state the outcome and name an action. Sentence case, glossary, short sentences and imperative action labels checked; raw reasons remain in details, no duplicate empty sections, no humour, status words and accessible action labels accompany colours/icons. Short/typical/long web text checked at desktop/phone width in both themes.

Mobile runtime fingerprint: EAS CLI 27.4.1, production, both platforms, before → after the stack: iOS 2a0ef03a2a0fda8e7fad2e3df8609803d2edbda3 → identical; Android c5c880ae8d0f5d7bc867fcbaf8f756b2ca56a07d → identical. No native/dependency changes or EAS builds.

@nixuuu
nixuuu added this pull request to stack #372 November 8, 2026 20:25
@nixuuu
nixuuu marked this pull request as ready for review November 8, 2026 20:40
@nixuuu
nixuuu merged commit 05b0c3c into dev Nov 8, 2026
13 checks passed
@nixuuu
nixuuu deleted the feat/update-announce-1 branch November 8, 2026 20:42
nixuuu added a commit that referenced this pull request Nov 8, 2026
Background refreshes changed a successful peer snapshot from fresh to
stale and back on every poll. The waiting message became a transient
disclosure on mobile and a changing status line on web. Keep the cached
snapshot fresh during refreshes; failed reads still expose stale status
and retain details.

Manual checks from mobile and web now reach the desktop app that owns
the gateway through the existing app-control channel. Linked checks use
the same path at their home. Requests coalesce, have a 10-second
cooldown, and wait up to 30 seconds for a newer completed check report.
Older desktops receive the existing check command without waiting for
unsupported fields. Owner checks remain enforced; checking the app does
not grant permission to replace gateway binaries.

Canopy rows show the app's actual check time, including the phone's OTA
check time. Older apps show `Check time unavailable`. Browser clients of
a desktop gateway also show its local app row.

Validation:
- `bun install`, `bun run gen:check`, `bun run typecheck`, `bun run
lint`, `bun run format:check`, `bun run check:tmp`, and the web build.
- Focused peer-cache regression coverage plus linked update/control and
timeout integration checks, one test file at a time. Includes completion
waiting, throttling, older desktops, non-admin owner checks, and
rejection of an unlinked owner.
- Browser review on an isolated port: light/dark, desktop/phone widths,
short/typical/long names, downloaded/error/offline states and check
timestamps. No UI test suites added.
- EAS CLI 27.4.1 production fingerprint generation before/after for both
platforms: iOS `2a0ef03a2a0fda8e7fad2e3df8609803d2edbda3`, Android
`c5c880ae8d0f5d7bc867fcbaf8f756b2ca56a07d`; unchanged. Mobile edits are
JS/TS only. No native builds or publication.

Copy audit (`docs/copy.md` §8):
- Missing freshness information → `Checked {time}` / `Check time
unavailable`; short sentence-case labels distinguish app checks from
gateway polling.
- Browser omission → `Canopy on this computer`; uses the existing
product and computer terms. Local update guidance uses the existing
compact information control.
- No new errors, confirmations, jargon, repeated facts, or humor.
Existing action names remain verbs. Checked labels and long names at
desktop and phone widths; meaning remains visible without color or icon
shape.

The stale/fresh flip originates in #348; #369–#371 expose or share the
affected data. The local manual-check omission predates them. Release
publishing scripts/workflows and the frozen update protocol are
unchanged. Signed macOS installation/restart remains outside this
check-only verification.

Fixes: #348

Related: #369, #370, #371
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