Repository navigation
feat(mobile): tell users when a newer app binary is installable - #23755
Conversation
With OTA page updates, store releases get rare and users stop looking. The shell now asks the channel that installed it. Android sideload reads GitHub's mobile-android-v* tag refs and proves the release has an APK. iOS reads the App Store lookup. A home card above Desktops, dismissible per version, and Settings rows surface the result. The check runs on the desktop updater's cadence: cold start, foreground once 24 h have passed, and a 1 h retry after a failure. The releases atom feed was not used because it lists only the 10 newest releases, which are all desktop builds, so it never carries a mobile tag. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
The anti-slop gate refuses Reflect.get on dynamic input. The GitHub refs, the release, the App Store lookup and the stored update record are now parsed into named schemas before they are read. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
Record why the Android source reads tag refs. The releases atom feed and /releases?per_page=100 are both newest-first windows that desktop releases fill. Either would silently report "current" once a run of desktop builds pushes the newest mobile release out. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
Every check and dismissal now awaits one shared store load. This replaces the merge that guessed whether a check had landed during the load. A manual check that fails while the store loads therefore keeps its 1 h retry instead of re-checking at once. - checking is derived from the in-flight check. - start() uses a per-start flag, so a StrictMode double start applies one load. - A check that finishes after stop() writes nothing. - A corrupt stored update record loses only itself. - Tag refs are parsed with a single schema. - The runtime wiring is folded into one file, and the card moves to home/. - The recorded App Store fixture is oxfmt-formatted, with the same parsed value. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
A check that stayed in flight across stop and restart returned 'failed' without rescheduling. The restart skipped arming because a check was in flight, which left a live checker with no timer until the next foreground. The stop counter is removed. schedule() already arms nothing while no start is active, and saving a real result after a stop is harmless. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe mobile app now checks Android GitHub releases and iOS App Store listings for newer versions. It stores check results and dismissed versions, schedules checks and retries, and starts the checker when the root layout mounts. The home screen displays available updates with update and dismiss actions. Settings displays version and check status and provides a manual check action. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The new mobile flow checks for updates and surfaces available releases. A backward clock adjustment does not strand its scheduled check, and no concrete issue in the reviewed changes warrants delaying merge. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to Update links come from fixed Apple or GitHub services and open only after a user taps, but the app does not restrict a returned link to the expected store or release page. This creates a limited, conditional risk if update data is manipulated. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description explains the implementation and testing in detail, but it does not follow the required template. It omits the ELI5, Why, Linked Issue, Visual Proof, Review, Notes, Agent skill upstream boundary, and Checklist sections. The UI change also lacks before-and-after proof or an explicit N/A justification. Resolution Add the missing template sections. Provide the linked issue, the rationale and plain-language summary, visual proof or an explicit N/A explanation, review and compatibility notes, the Agent skill upstream boundary confirmation, and the completed testing and checklist items.
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
ℹ️ No critical issues — one low-probability scheduler edge and one forward-looking assumption, both inline.
Reviewed changes
- Android source — reads
git/matching-refs/tags/mobile-android-v, filters tags newer than installed, numerically sorts descending, probes at most three releases for a published release carrying an.apk, and opens the releasehtml_url. - iOS source — Apple lookup by bundle id, offers when the store version is newer, opens the app's App Store page.
- Scheduler —
createAppUpdateCheckerwith the desktop cadence (24h interval, 1h retry, 8s bound, cold-start/foreground-when-due, single-flight, dismissal scoped to one version). - Persistence — three AsyncStorage keys; a corrupt
latestrecord is dropped without losing the check time or dismissal. - UI — home card above DESKTOPS (dismissible per version) and Settings rows (Update row survives dismissal; manual check with relative "last checked"), wired into
_layout.tsxandsettings.tsx.
ℹ️ Prior bot findings independently assessed
I checked greptile's two P1 Android findings against the live API and they do not reproduce: GET /git/matching-refs/tags/{prefix} ignores per_page, returns no Link header, and returned all 24 mobile tags (it has an undocumented ~500-ref cap and no pagination, irrelevant at this tag count), so nothing newer is dropped; and the three-probe bound is the documented behavior, not a regression.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
- The load sets prefs and the due time only. start() re-arms the schedule after it. - The Settings result hides through one effect keyed on the result. - onUpdate receives the URL. - The version row is bound once. - The retry and timeout constants are no longer exported. - The unused AppUpdateChecker type is deleted. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
The armed timer is the due time. Re-checking the wall clock when the timer fired meant a clock stepped back skipped the check and re-armed nothing. The due-time guard now applies only on foreground. The binary version still comes from expoConfig.version. SDK 55 removed Constants.nativeAppVersion, so the no-expo-updates invariant is now named in the comment. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Scheduler clock-step fix — The armed timer now runs the check directly (
if (activeStarts > 0 && inFlight === null) void checkNow()) instead of routing throughrunIfDue(), so a backward wall-clock step no longer leaves no timer armed; thedeps.now() >= nextDueAtguard stays only on the foreground path.ensureLoadednow just recordsnextDueAtandstart()arms it. The added test genuinely fails on the old code. - Settings result auto-hide —
settings-app-update-section.tsxreplaces the manualuseReftimer with auseEffect([result])cleanup, and the update row'sonUpdatenow passes the url so the caller can handopenAppUpdatestraight through. - Settings rows — Extracts a
versionRowelement; the separator is rendered only when that row exists. Behavior and rendered output unchanged (tests pass). - Dead exports removed —
APP_UPDATE_RETRY_INTERVAL_MS,APP_UPDATE_CHECK_TIMEOUT_MSandtype AppUpdateCheckerare no longer exported; no in-repo importers.
Both prior pullfrog threads (the scheduler stall and the expo-updates dependency invariant) are addressed by c39a11e. Verified the two changed mobile suites (19 tests) and pnpm --dir mobile run typecheck locally.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
If the device clock was ahead when a check ran and was corrected later, the stored check time is in the future. Cold starts then armed a timer for the whole skew, and foreground never came due. The stored state now reads as never checked in that case. The iOS link is the lookup's trackViewUrl instead of a URL built from trackId. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Future check-time recovery —
ensureLoadednow treats a storedlastCheckedAtthat isnullor ahead of the injected clock as never checked (nextDueAt = 0), so a backward clock correction no longer defers the daily check indefinitely. The added test ("treats a stored check time ahead of the clock as never checked") genuinely fails against the previouslastCheckedAt + intervallogic. - iOS link from Apple's reply —
app-store-update-source.tsnow returns the lookup's owntrackViewUrlinstead of constructinghttps://apps.apple.com/app/id{trackId}, and the zod schema dropstrackIdaccordingly. The recorded fixture carriestrackViewUrl; the sources test asserts the exact value. - Comment width —
b4ab74creflows the new future-check-time comment only.
Both prior pullfrog threads (the timer/clock-step stall and the expo-updates installed-version invariant) were already addressed and resolved at c39a11e; nothing remains open.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

What
With OTA, store releases of the mobile app are rare, so nobody looks for them. The app now tells users when a newer binary is installable, the way the desktop does.
Source of truth: whoever can install it. No manifest, no new tags, no backend, no release-workflow change.
mobile-android-v*): the app lists those tags from GitHub's public API, takes the newest plain-semver tag above the installed version, and confirms a published release with an.apkexists for it (a failed build leaves a release-less tag; at most three candidates are tried). Tap opens that release's page. The releases atom feed and the first page of the releases list were rejected: both are newest-first windows that desktop releases fill, and a pushed-out mobile release would silently read as "current". Every mobile release is a pre-release, so that flag is not filtered on.AppUpdateSourceseam; nothing above it changes.Cadence: the desktop's (
src/main/updater-events.ts). Check on cold start when the last success is 24 h old, on foreground when due, retry after 1 h on failure, and a manual "Check for updates". A check is one 8 s-bounded request chain, single-flight, never on the render path. Last check time, last seen version and the dismissed version live in AsyncStorage; "available" is derived at render time as latest > installed, so installing the update clears it at once.UI (approved mockup). Home: a card above DESKTOPS in the host-card style, "Orca 0.0.51 is available / Tap to update", monochrome icon, an X that dismisses that version only (it returns for the next one). Settings: "Update to Orca 0.0.51 / Update", which stays after dismissal; a plain "Version 0.0.48" row when current; and "Check for updates / Last checked 2 h ago". No launch modal, no toast, no badge, no colour accent.
Scope. Shell code only, so it ships in the next store build and both the native and OTA shells show it. The page bundle, the RPC wire and the existing compat wall are untouched. Installed version is the binary's embedded version (
expo-constants), which the OTA page cannot change.Tests
html_urlis used, prerelease-suffixed tags ignored, App Store empty/lower/non-semver all read as current.