Skip to content

Check for mobile app updates on launch - #4958

Merged
juliusmarminge merged 4 commits into
mainfrom
t3code/9dc5eb78
Jul 30, 2026
Merged

Check for mobile app updates on launch#4958
juliusmarminge merged 4 commits into
mainfrom
t3code/9dc5eb78

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Jul 30, 2026

Copy link
Copy Markdown
Member

What Changed

  • Added centralized Expo app update checking with support for downloads, reloads, rollback-to-embedded directives, and failure reporting.
  • Automatically checks for updates once when the mobile home screen launches.
  • Added a hidden five-tap version-row gesture for manually triggering an update check from Settings.
  • Added focused tests covering update flows, rollback handling, launch deduplication, disabled updates, failures, and the hidden gesture.
  • Downgraded @legendapp/list to 3.2.0 and updated its patch accordingly.
  • Removed custom iOS text-drop handling from the composer editor.

Why

Mobile builds now detect and apply available Expo updates at launch while preserving a deliberate manual fallback in Settings. The update logic is isolated and tested so rollback and failure cases behave consistently. The Legend List version change and iOS cleanup keep the mobile build aligned with the supported implementation.

UI Changes

The Settings version row no longer displays an update icon or embedded/OTA bundle label. Manual update checks remain available through five taps on the version row. No before/after screenshots or video are included.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Medium Risk
Automatic OTA check/download/reload on launch can restart the app for users when an update is available; logic is tested and coalesced but still affects startup behavior app-wide.

Overview
Centralizes Expo OTA update logic in app-updates and runs a single check when the home route mounts, with concurrent launch and manual callers sharing one in-flight operation (including rollback-to-embedded and failure reporting).

Settings no longer shows the refresh spinner, embedded/OTA bundle label, or one-tap “check for updates.” Manual checks now require five taps on the version row; status text still appears briefly while checking or when up to date.

Adds unit tests for download/restart, rollback, coalescing, launch deduplication, failures, and the hidden tap gesture.

Reviewed by Cursor Bugbot for commit 9bdfdcb. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Check for app updates on launch and gate manual update checks behind five taps

  • Adds checkForAppUpdateOnLaunch called once when HomeRouteScreen mounts, replacing ad-hoc update logic with a single-shot launch check that runs at most once per JS runtime.
  • Introduces runAppUpdateCheck with coalescing: concurrent callers share a single in-flight check and receive state updates and failures via callbacks rather than starting duplicate operations.
  • Manual update checks in SettingsRouteScreen now require five taps on the version row via registerHiddenUpdateTap; the refresh icon is removed and failures surface as an Alert.
  • Update state progresses through checking → downloading → restarting with rollback handling; the settings status label shows transient states or 'Up to date' then clears.

Macroscope summarized 9bdfdcb.

- Add tested OTA update and rollback handling
- Trigger manual checks after five version-row taps
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ec373c35-5e1d-4c3a-a042-ff4a6c6e0671

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Jul 30, 2026
Comment thread apps/mobile/src/features/updates/app-updates.ts
@macroscopeapp

macroscopeapp Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces new runtime behavior by adding automatic update checks on app launch and changes the manual update trigger from an explicit button to a hidden 5-tap gesture. These are new user-facing features that warrant human review despite the well-tested implementation.

You can customize Macroscope's approvability policy. Learn more.

Prevent launch and manual update checks from running the Expo update flow concurrently, and cover the shared guard with a regression test.

Co-authored-by: codex <codex@users.noreply.github.com>
Comment thread apps/mobile/src/features/updates/app-updates.ts

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but a cloud agent failed to start.

Reviewed by Cursor Bugbot for commit 9166f7d. Configure here.

Comment thread apps/mobile/src/features/updates/app-updates.ts
- Notify coalesced manual checks of state changes and failures
- Add coverage for launch/manual check overlap
Comment thread apps/mobile/src/features/updates/app-updates.ts Outdated
- Prevent reentrant checks from starting duplicate update requests
- Add regression coverage for synchronous state callback re-entry
@juliusmarminge
juliusmarminge merged commit 6154b46 into main Jul 30, 2026
17 checks passed
@juliusmarminge
juliusmarminge deleted the t3code/9dc5eb78 branch July 30, 2026 14:57
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Jul 30, 2026
## What's Changed
* docs: split user and maintainer docs, fix 100+ stale claims by @t3dotgg in pingdotgg/t3code#4807
* fix(web): server updates no longer look like warnings by @t3dotgg in pingdotgg/t3code#4992
* fix(connect): reboots no longer strand the relay link, 403s now say why by @t3dotgg in pingdotgg/t3code#4988
* Add project file picker (⌘P) and project content search (⇧⌘F) by @jakeleventhal in pingdotgg/t3code#4855
* Check for mobile app updates on launch by @juliusmarminge in pingdotgg/t3code#4958


**Full Changelog**: pingdotgg/t3code@v0.0.32-nightly.20260730.956...v0.0.32-nightly.20260730.957

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.32-nightly.20260730.957
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant