From 54bd4e6fdc8ca573d4f1f512a8a7d9ec668ee2e1 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Tue, 21 Jul 2026 20:40:43 -0700 Subject: [PATCH] fix(mobile): version-agnostic update links so release URLs never go stale --- mobile/src/components/UpdateNudgeBanner.tsx | 2 +- .../components/mobile-app-update-link.test.ts | 11 +++++------ mobile/src/components/mobile-app-update-link.ts | 17 +++++++---------- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/mobile/src/components/UpdateNudgeBanner.tsx b/mobile/src/components/UpdateNudgeBanner.tsx index bb989ba2fbe..551c6561f5f 100644 --- a/mobile/src/components/UpdateNudgeBanner.tsx +++ b/mobile/src/components/UpdateNudgeBanner.tsx @@ -46,7 +46,7 @@ export function UpdateNudgeBanner({ return null } - const storeUrl = getMobileAppUpdateUrl(Platform.OS, recommendedVersion) + const storeUrl = getMobileAppUpdateUrl(Platform.OS) return ( Update the Orca app for the best experience diff --git a/mobile/src/components/mobile-app-update-link.test.ts b/mobile/src/components/mobile-app-update-link.test.ts index 8c7e5a52769..d11f21c6a73 100644 --- a/mobile/src/components/mobile-app-update-link.test.ts +++ b/mobile/src/components/mobile-app-update-link.test.ts @@ -3,19 +3,18 @@ import { getMobileAppUpdateUrl } from './mobile-app-update-link' describe('getMobileAppUpdateUrl', () => { it('uses the native App Store listing on iOS', () => { - expect(getMobileAppUpdateUrl('ios', '0.0.31')).toBe( + expect(getMobileAppUpdateUrl('ios')).toBe( 'itms-apps://apps.apple.com/app/orca-ide/id6766130217' ) }) - it('links Android to the exact advertised GitHub release', () => { - expect(getMobileAppUpdateUrl('android', '0.0.31')).toBe( - 'https://github.com/stablyai/orca/releases/tag/mobile-android-v0.0.31' + it('links Android to the mobile-filtered GitHub releases list', () => { + expect(getMobileAppUpdateUrl('android')).toBe( + 'https://github.com/stablyai/orca/releases?q=mobile-android' ) - expect(getMobileAppUpdateUrl('android')).toBe('https://github.com/stablyai/orca/releases') }) it('fails open without a supported distribution', () => { - expect(getMobileAppUpdateUrl('web', '0.0.31')).toBeNull() + expect(getMobileAppUpdateUrl('web')).toBeNull() }) }) diff --git a/mobile/src/components/mobile-app-update-link.ts b/mobile/src/components/mobile-app-update-link.ts index a5532e9a89c..a564c5c867d 100644 --- a/mobile/src/components/mobile-app-update-link.ts +++ b/mobile/src/components/mobile-app-update-link.ts @@ -1,19 +1,16 @@ const IOS_APP_STORE_URL = 'itms-apps://apps.apple.com/app/orca-ide/id6766130217' -const ANDROID_RELEASES_URL = 'https://github.com/stablyai/orca/releases' +// Why: filter to mobile release tags so daily desktop releases don't bury the +// newest APK; deliberately version-agnostic so the link never goes stale. +const ANDROID_RELEASES_URL = 'https://github.com/stablyai/orca/releases?q=mobile-android' -// Why: Android ships from versioned GitHub releases while iOS ships through -// the App Store; keep both update surfaces aligned with the actual distribution. -export function getMobileAppUpdateUrl( - platform: string, - recommendedVersion?: string -): string | null { +// Why: Android ships from GitHub releases while iOS ships through the App +// Store; both surfaces always show the newest build without naming a version. +export function getMobileAppUpdateUrl(platform: string): string | null { if (platform === 'ios') { return IOS_APP_STORE_URL } if (platform === 'android') { - return recommendedVersion - ? `${ANDROID_RELEASES_URL}/tag/mobile-android-v${encodeURIComponent(recommendedVersion)}` - : ANDROID_RELEASES_URL + return ANDROID_RELEASES_URL } return null }