Repository navigation
feat(gateway): announce updates and restarts to every client - #369
Merged
Merged
Conversation
nixuuu
marked this pull request as ready for review
November 8, 2026 20:40
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
This was referenced Nov 13, 2026
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.
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.v1andWORKER_LINK_PROTOCOLremain unchanged. This is the bottom layer of a draft stack targetingdev.Verification
bun install,bun run gen:check, typecheck, lint, formatting and the web build passed. The final fullbun run check:tmppassed 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.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; Androidc5c880ae8d0f5d7bc867fcbaf8f756b2ca56a07d→ identical. No native/dependency changes or EAS builds.