Repository navigation
fix(mobile): keep the reconnect status steady while retrying - #507
Merged
Merged
Conversation
nixuuu
added a commit
that referenced
this pull request
Nov 10, 2026
Linked bots can stay missing in web/desktop even when both computers
show connected. `ListBots` served only the in-memory peer-read cache
while a home was online, so a cold/evicted cache or an A gateway restart
returned no remote bots despite a committed bot mirror. The background
read eventually completed, but the web bot store ignored
`linkedReadCompleted("ListBots")`. Since #458 disabled polling when the
gateway advertises pushed bots, that incomplete list could persist until
another bot change or client reload.
Use the committed mirror while the online read cache is loading or
stale, and continue refreshing the authoritative home list in the
background. Bot mirror commits also mark the home's list cache due and
announce a list invalidation. The web bot store now handles that
invalidation. Mobile already handles it through `OverviewInvalidation`
in its shared query bus, so its implementation remains unchanged.
Existing dimmed/read-only rows and gateway rejection of offline writes
remain in place. Updating A restarts its gateway and client
subscription, restores the persisted mirror immediately and refreshes
from B automatically; no manual resync, database repair or re-pairing is
required.
The original cold-cache behavior comes from #348; #458 turned a
transient incomplete web list into persistent missing rows. History does
not implicate #502 (worker command delivery), #507 (connection
recovery), #500 (workspace/config sharing) or #475 (row badge
rendering). A plain warm-cache B restart did not fail in the baseline.
The cold-cache and A-restart cases reproduce a failure path matching the
report; the maintainer's live stack and databases were not inspected or
changed.
Extract the unchanged feed-negotiation helper from `routed-overview.ts`
to keep the file and watch function within the repository's size limits.
Update the Polish bot and linked-computer documentation.
## Verification
- RED, before the production fix: `TMPDIR=/var/tmp bun run check:tmp
tests/integration/linked-bots-resync.test.ts` — 2 failed, 2 passed. The
cold online-cache read and first list after A restarted omitted B's bots
despite their persisted mirror. Temp cleanup passed.
- GREEN: **30/30 sequential complete-file runs passed**, one test
process at a time using the same `check:tmp` command. Each final-file
run passed all five integration scenarios (150 scenario passes in total)
and left nothing in its private temp directory.
- Coverage: two real gateways, separate PostgreSQL databases and an
actual mTLS link; active and archived bots with last-message previews;
same-version B restart and restart with advertised app version changing
from nightly.119 to nightly.121; A's one ongoing overview watch and
fresh API reads; read-only/offline write rejection; A gateway restart
with its database retained; deletion, archive/unarchive and message
changes made while B was away, then convergence after a fresh B runtime.
Version coverage changes the handshake version on the current
implementation; it does not run historical release binaries. The client
is exercised at the public API/feed boundary; no UI test suite was
added.
- Related suites, run sequentially one file at a time through
`check:tmp`: `linked-reads` (4 passed), `linked-list-retention` (1
passed), `linked-agents` (16 passed). All three temp cleanup checks
passed.
- `bun install`, `bun run typecheck`, `bun run lint`, `bun run
format:check`: passed. Implementation and regression coverage received a
self-review. Full unfiltered tests, `gen:check`, a web build and
browser/device checks were not run locally under the workspace
verification limits; CI covers the broader automated checks.
Copy audit (`docs/copy.md` §8): no UI text added or changed.
Fixes: #458
Related: #348
nixuuu
added a commit
that referenced
this pull request
Nov 11, 2026
A phone paired to a desktop gateway can see its linked computers' update
actions, but cannot update its own paired computer. Remote web clients
have the same gap.
Expose the home desktop app as an update target and send confirmed owner
UI requests through the existing LocalAppControl → RemoteAppUpdate path.
Keep the installer, durable journal/receipts, idle barrier, Windows
silent install and planned-departure/reconnect handling. The UI shows
real updater progress and refusal reasons. Older gateways/desktops show
a one-time manual-update instruction.
Home app installation requires explicit restart confirmation, lists
known running turns and checks unsent-work blockers before dispatch.
Update all continues to exclude the home app. Standalone gateway and
worker updaters keep their existing actions. Phone credentials cannot
open or report on the desktop control channel. Changes are additive in
canopy.ui.v1; canopy.update.v1 is untouched.
Validation:
- Paired-app gRPC integration: 7 passing tests / 55 assertions,
including owner refusal, confirmation, old/disconnected/disabled
desktop, rate limits/admin failures, receipts, idle barrier, gateway
replacement and recovery using the same paired token.
- Existing linked-updates (10), desktop-updates (8), gateway-departures
(3) and updates-bundled (2) tests pass, one file at a time.
- bun install, gen:check, typecheck, lint, format:check and web build
pass.
- Full check:tmp: passed once, sequentially: 2367 pass, 165 skip, 0 fail
across 440 files (29325 assertions); “nothing left in the temp dir”.
- Manual web fixture review in light/dark at 390, 768 and 1440 px: home
action, progress, older-desktop instructions, running turns, Cancel
focus, long names and blockers. The blocker was also checked again after
opening confirmation.
- EAS CLI 27.4.1 production fingerprints match on both platforms: iOS
6ddec9ef559ee0095ac33e94ff9418a942053b17; Android
5f6eae3ab278f1cd543e9ed763f923a319b65ec9. Mobile changes are JS/TS only.
- Native mobile visual QA is unverified: local device platforms are
unavailable, and the remote device host still reported “Could not
communicate with device support” after its suggested refresh. No native
install or Windows GUI installer was exercised; those paths are reused
unchanged.
Copy audit (§8):
- Before: the home app row had no usable update action. After: named
computer + “Update Canopy on {name}”; the confirmation repeats “Update”
and explains restart, automatic reconnection and the idle barrier.
- Before: the own app needed an update from its computer without a clear
route. After: “Update this computer from its own window once to enable
remote updates.” The dependency and next action stay visible.
- “Send or discard your drafts and files before updating this computer.”
gives a concrete action. Existing failure details remain expandable. New
text uses the glossary, sentence case, present tense, typographic quotes
and correct plurals; no new jargon, empty states or decorative copy.
- Reviewed typical/short and long names on desktop and phone widths.
Actions have accessible text labels; statuses and blocker explanations
do not depend on color. Native layout remains the visual-verification
gap above.
Related: #373
Related: #471
Related: #479
Related: #507
This was referenced Nov 13, 2026
nixuuu
added a commit
that referenced
this pull request
Nov 19, 2026
…1009) ## Mobile thread catch-up Opening a saved conversation started the outage deadline before the first history window arrived. Each partial batch briefly set the view to syncing while the same deadline continued to run. After 12 seconds the thread could report an unavailable gateway even as the replay advanced. The initial thread watch now waits for its window. An incoming controls frame or partial batch confirms transport activity. The view stays in catch-up until a ready snapshot or batch arrives. A real drop, premature end, or permission error still goes through normal watch recovery. The sidebar continues to use its own overview stream. This change addresses the misleading status during successful loads and does not establish a cause for a separate HTTP 403. ## Verification Tested locally on nix-pc at 449af29. - The new Connect regression exercises initial controls, partial replay across the outage deadline, an actual stream error, reconnection, catch-up completion, a controls refresh, and a terminal permission error. - All 22 distinct cases passed across mobile-thread-sync-status, connection-recovery, and thread-watch-failures. The checks covered exponential backoff, permission failures, a premature end, and checkpoint recovery. The temporary directory checks passed. - A local run of the same Connect scenario held the partial replay open for 13 real seconds, then dropped the stream. It completed successfully in 14.0 seconds on the PR revision. - Mobile TypeScript and oxlint on the changed files passed. Native device verification is pending. Auto-merge is off. ## Copy audit “Reconnecting…” becomes “Connecting…” on initial open and “Syncing…” during catch-up. “Retrying…” is reserved for recovery. The accessible label derives from the displayed status. Existing thread progress and retry actions are reused. No new terms, errors, empty states or variable-length names. The two fixed labels fit the reserved status width in Chromium text-fit checks at 320, 390 and 1280 px in both themes. This was a copy fit check, not a native device run. Fixes: #507
nixuuu
added a commit
that referenced
this pull request
Nov 19, 2026
The mobile Threads and Bots lists use the measured header height to position their first row. The update and connection strip used a zero-height absolute overlay in the sidebar, so a persistent or wrapped message could cover the first item and intercept taps. Render the strip inside the measured header, as on the other mobile screens. The list now reserves the visible message's actual height and reclaims it when the message clears. This applies to both the phone list and the tablet sidebar. Local verification passed for the mobile TypeScript project, Expo lint and oxlint on both edited components, and the diff whitespace check. CI owns the repository-wide checks. Fixes: #507
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.
Repeated failures against an unreachable paired gateway made the mobile sheet alternate between “Reconnecting…” and “Gateway unavailable”. Route probes erased their previous results, the sheet changed height, and the sidebar banner could unmount an open sheet. Independent requests could also start another failed route race as soon as the preceding race finished.
Availability and retry activity now use one shared domain state machine across mobile and web/desktop. After 3 failures or 12 seconds without success, “Gateway unavailable” stays until a successful stream snapshot/resynchronization. Retry activity appears in a reserved line. Retries use 1/2/4/8/16/30-second backoff with 80–100% jitter; network/foreground/manual reconnect reset the delay without clearing unavailable.
docs/mobile.mdanddocs/ui-api.md. No native, dependency or protocol changes.Validation
bun install,bun run gen:check,bun run typecheck, rootbun run lint,bun run format:check, and the production web build.[email protected]are unchanged: iOS6ddec9ef559ee0095ac33e94ff9418a942053b17, Android5f6eae3ab278f1cd543e9ed763f923a319b65ec9.Limitations: native iOS/Android visual QA was unavailable. Full
check:tmpwas not run; this task’s verification scope permits focused tests. Additional Expo ESLint reports existing errors in unchanged files; changed mobile UI files have no ESLint errors (the keyed recovery memo has one dependency warning). Root oxlint and all requested checks above pass. Evidence is kept outside the repository.Copy audit — docs/copy.md §8
Regression attribution
The merged diff for #361 explicitly introduced
down && stale === subscriptionKey && !routes.pending, which returns the availability presentation to reconnecting whenever a new probe begins. This fixes that condition and the resulting presentation instability. #366’s Tailscale hint and fixed retry interval were checked as context; they did not introduce that condition.Fixes: #361
Related: #366