Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/renderer/src/components/mobile/mobile-platform-copy.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { describe, expect, it } from 'vitest'
import { getInstallCopy, ORCA_ANDROID_APK_URL } from './mobile-platform-copy'

describe('mobile platform install copy', () => {
it('pins the Android APK to the published mobile-android release tag (#11444)', () => {
expect(ORCA_ANDROID_APK_URL).toBe(
'https://github.com/stablyai/orca/releases/download/mobile-android-v0.0.43/app-release.apk'
)
expect(getInstallCopy('android', 'stable').url).toBe(ORCA_ANDROID_APK_URL)
})
})
6 changes: 5 additions & 1 deletion src/renderer/src/components/mobile/mobile-platform-copy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@ const IOS_CHANNEL_COPY: Record<IosChannel, InstallCopy> = {
}
}

// Why: renderer install surfaces must share one published tag so release updates cannot drift.
const ORCA_ANDROID_APK_RELEASE_TAG = 'mobile-android-v0.0.43'
export const ORCA_ANDROID_APK_URL = `https://github.com/stablyai/orca/releases/download/${ORCA_ANDROID_APK_RELEASE_TAG}/app-release.apk`

const ANDROID_COPY: InstallCopy = {
ctaLabel: 'Download APK',
url: 'https://github.com/stablyai/orca/releases/download/mobile-android-v0.0.43/app-release.apk'
url: ORCA_ANDROID_APK_URL
}

export function getInstallCopy(platform: Platform, iosChannel: IosChannel): InstallCopy {
Expand Down
56 changes: 56 additions & 0 deletions src/renderer/src/components/settings/MobileSettingsPane.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// @vitest-environment happy-dom

import '@testing-library/jest-dom/vitest'
import type { ReactNode } from 'react'
import { cleanup, render, screen } from '@testing-library/react'
import { afterEach, describe, expect, it, vi } from 'vitest'

vi.mock('@/i18n/i18n', () => ({
translate: (_key: string, fallback: string) => fallback
}))

vi.mock('@/store', () => ({
useAppStore: (selector: (state: Record<string, unknown>) => unknown) =>
selector({
settings: { showMobileButton: true },
updateSettings: vi.fn()
})
}))

vi.mock('./SearchableSetting', () => ({
SearchableSetting: ({ children }: { children: ReactNode }) => <>{children}</>
}))

vi.mock('./SettingsFormControls', () => ({
SettingsSwitchRow: () => null
}))

vi.mock('./MobilePane', () => ({
MobilePane: () => null
}))

vi.mock('./MobileRelayBetaNotice', () => ({
MobileRelayBetaNotice: () => null
}))

vi.mock('./mobile-settings-search', () => ({
getMobileOverviewSearchEntry: () => ({ keywords: [] }),
getMobileSidebarShortcutSearchEntry: () => ({ keywords: [] }),
getMobileSettingsPaneSearchEntries: () => []
}))

import { MobileSettingsPane } from './MobileSettingsPane'

describe('MobileSettingsPane', () => {
afterEach(cleanup)

it('offers a desktop-transfer fallback when the Android download stalls (#11444)', () => {
render(<MobileSettingsPane />)

expect(
screen.getByText(
'If the APK download stalls near 99% on the phone, download it on a computer and transfer the file (USB cable / cloud storage / messaging), then install from the phone storage.'
)
).toBeInTheDocument()
})
})
9 changes: 7 additions & 2 deletions src/renderer/src/components/settings/MobileSettingsPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ import {
import { translate } from '@/i18n/i18n'
import { useAppStore } from '@/store'
import { MobileRelayBetaNotice } from './MobileRelayBetaNotice'
import { ORCA_ANDROID_APK_URL } from '../mobile/mobile-platform-copy'
export { getMobileSettingsPaneSearchEntries }

const ORCA_IOS_APP_STORE_URL = 'https://apps.apple.com/app/orca-ide/id6766130217'
const ORCA_ANDROID_APK_URL =
'https://github.com/stablyai/orca/releases/download/mobile-android-v0.0.43/app-release.apk'

export function MobileSettingsPane(): React.JSX.Element {
const showMobileButton = useAppStore((s) => s.settings?.showMobileButton !== false)
Expand Down Expand Up @@ -61,6 +60,12 @@ export function MobileSettingsPane(): React.JSX.Element {
', then pair below.'
)}
</p>
<p>
{translate(
'auto.components.settings.MobileSettingsPane.androidDownloadStuckHint',
'If the APK download stalls near 99% on the phone, download it on a computer and transfer the file (USB cable / cloud storage / messaging), then install from the phone storage.'
)}
</p>
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
<MobileRelayBetaNotice />
</div>
</SearchableSetting>
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -7148,7 +7148,8 @@
"174f4a3c6d": "Control terminals and agents from your phone.",
"1de96ec8a6": "Show Orca Mobile Button",
"682293cadf": "Show the Orca Mobile button at the top of the left sidebar.",
"d4f2b65f30": "Show the Orca Mobile shortcut in the sidebar."
"d4f2b65f30": "Show the Orca Mobile shortcut in the sidebar.",
"androidDownloadStuckHint": "If the APK download stalls near 99% on the phone, download it on a computer and transfer the file (USB cable / cloud storage / messaging), then install from the phone storage."
},
"NotificationsPane": {
"906b4afebf": "Send Test Notification",
Expand Down