Skip to content

fix(mobile): show only installable updates in update all - #1087

Merged
nixuuu merged 3 commits into
devfrom
fix/mobile-update-availability
Nov 21, 2026
Merged

nixuuu merged 3 commits into
devfrom
fix/mobile-update-availability

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 21, 2026

Copy link
Copy Markdown
Member

Changes

The mobile Updates sheet uses the gateway's update plan for its count, sidebar indicator, and Update all action. When the gateway rejects an empty plan, the phone reloads the snapshot and shows the current state. In Workers settings, Show update progress opens the sheet for the current run.

A paired desktop row gets its state and update action from the desktop control channel. An up-to-date app stays current when its worker disconnects. A downloaded app update remains actionable when the feed omits the target version.

Fixes: #371

Verification

  • All 12 tests in tests/integration/update-center.test.ts passed through bun run check:tmp. Coverage includes remote desktop and binary worker updates, plus an empty Canopy plan with manual updates and an installable agent CLI.
  • Mobile typecheck, edited-file lint, and diff checks passed.
  • On an Android emulator with a controlled gateway, verified the current and downloaded desktop states, the desktop row action, the update count, the CLI-only state, and recovery when the last installable update disappeared. Checked the manual-update summary at 320 dp in the dark theme.
  • Native iOS, a real phone OTA, and opening progress from Workers settings remain unverified. CI handles the full repository gate.

Copy audit

  • “Managed externally” becomes “Up to date” for current paired desktops. “Manual update” and “Manual updates available” identify releases that need a separate installer.
  • The phone's own update shows “Phone update available” when it is the only actionable update.
  • An empty plan refreshes the sheet and clears the obsolete action. If the read cannot confirm the empty plan, the gateway's explanation appears alongside Reload updates. The count, status, and accessible action names communicate availability without relying on color.

@nixuuu
nixuuu enabled auto-merge (squash) November 21, 2026 17:06
nixuuu added a commit that referenced this pull request Nov 21, 2026
## Change

Thread lifecycle writes now take PostgreSQL's `FOR NO KEY UPDATE` lock
on thread rows. A cascade still serializes with other writes. A worker
transaction updating a side thread can finish a foreign-key check on its
parent while the cascade waits for the side thread.

In CI, archive held the parent row while waiting on the child. The
ingest transaction held the child and was waiting on the parent during
the second update of the tuple. Added a regression that observes the
lock wait in PostgreSQL and then lets the child transaction finish
against both archive and soft delete.

Related: #1087

## Verification

- The new archive regression failed with PostgreSQL `40P01` before the
fix.
- Eight focused runs under the same two-CPU limit used to reproduce the
race passed all 40 tests in `thread-snooze.test.ts`.
- The existing schedule-writer concurrency test, integration typecheck,
edited-file lint and diff checks passed. CI handles the full repository
gate.
@nixuuu
nixuuu merged commit 6baa421 into dev Nov 21, 2026
16 checks passed
@nixuuu
nixuuu deleted the fix/mobile-update-availability branch November 21, 2026 17:50
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