diff --git a/src/renderer/src/components/settings/ExperimentalPane.tsx b/src/renderer/src/components/settings/ExperimentalPane.tsx index 44eb80e7b..8a076ed87 100644 --- a/src/renderer/src/components/settings/ExperimentalPane.tsx +++ b/src/renderer/src/components/settings/ExperimentalPane.tsx @@ -9,7 +9,6 @@ import { useAppStore } from '../../store' import { SearchableSetting } from './SearchableSetting' import { matchesSettingsSearch } from './settings-search' import { EXPERIMENTAL_PANE_SEARCH_ENTRIES, EXPERIMENTAL_SEARCH_ENTRY } from './experimental-search' -import { MobilePane } from './MobilePane' import { HiddenExperimentalGroup } from './HiddenExperimentalGroup' export { EXPERIMENTAL_PANE_SEARCH_ENTRIES } @@ -31,7 +30,6 @@ export function ExperimentalPane({ hiddenExperimentalUnlocked = false }: ExperimentalPaneProps): React.JSX.Element { const searchQuery = useAppStore((s) => s.settingsSearchQuery) - const showMobile = matchesSettingsSearch(searchQuery, [EXPERIMENTAL_SEARCH_ENTRY.mobile]) const showPet = matchesSettingsSearch(searchQuery, [EXPERIMENTAL_SEARCH_ENTRY.pet]) const showOrchestration = matchesSettingsSearch(searchQuery, [ EXPERIMENTAL_SEARCH_ENTRY.orchestration @@ -70,66 +68,6 @@ export function ExperimentalPane({ return (
- {showMobile ? ( - -
-
- -

- Control Orca from your phone by scanning a QR code. Beta / early preview — - expect bugs and breaking changes. Get started from the{' '} - - . -

-
- -
- - {settings.experimentalMobile ? ( -
- -
- ) : null} -
- ) : null} - {showPet ? (
+ + + + Connect outside your Wi-Fi with a tailnet + + +

+ Orca Mobile connects directly to this computer. To use it away from the same local + network, put your computer and phone on the same private overlay network, then + generate the QR code with that network address selected. +

+
    +
  1. + Install{' '} + {' '} + on your computer and phone. +
  2. +
  3. Sign in to the same tailnet on both devices.
  4. +
  5. + In this Network Interface menu, choose the Tailscale address, usually a 100.x.y.z + IP. +
  6. +
  7. Regenerate the QR code and scan it from the Orca mobile app.
  8. +
+
+
+
{/* QR code display */} diff --git a/src/renderer/src/components/settings/MobileSettingsPane.tsx b/src/renderer/src/components/settings/MobileSettingsPane.tsx new file mode 100644 index 000000000..cc2473e44 --- /dev/null +++ b/src/renderer/src/components/settings/MobileSettingsPane.tsx @@ -0,0 +1,114 @@ +import type { GlobalSettings } from '../../../../shared/types' +import { Label } from '../ui/label' +import { SearchableSetting } from './SearchableSetting' +import { matchesSettingsSearch, type SettingsSearchEntry } from './settings-search' +import { useAppStore } from '../../store' +import { MobilePane, MOBILE_PANE_SEARCH_ENTRIES } from './MobilePane' + +const ORCA_IOS_APP_STORE_URL = 'https://apps.apple.com/app/orca-ide/id6766130217' +const ORCA_ANDROID_RELEASE_URL = 'https://github.com/stablyai/orca/releases/tag/mobile-v0.0.2' + +const MOBILE_ENABLE_SEARCH_ENTRY: SettingsSearchEntry = { + title: 'Mobile', + description: 'Pair a mobile device to control Orca remotely.', + keywords: [ + 'mobile', + 'phone', + 'pair', + 'qr', + 'code', + 'scan', + 'remote', + 'android', + 'apk', + 'beta', + 'experimental' + ] +} + +export const MOBILE_SETTINGS_PANE_SEARCH_ENTRIES: SettingsSearchEntry[] = [ + MOBILE_ENABLE_SEARCH_ENTRY, + ...MOBILE_PANE_SEARCH_ENTRIES +] + +type MobileSettingsPaneProps = { + settings: GlobalSettings + updateSettings: (updates: Partial) => void +} + +export function MobileSettingsPane({ + settings, + updateSettings +}: MobileSettingsPaneProps): React.JSX.Element { + const searchQuery = useAppStore((s) => s.settingsSearchQuery) + const showEnableSetting = + !settings.experimentalMobile || matchesSettingsSearch(searchQuery, [MOBILE_ENABLE_SEARCH_ENTRY]) + + return ( +
+ {showEnableSetting ? ( + +
+
+ +

+ Control Orca from your phone by scanning a QR code. Beta / early preview — + expect bugs and breaking changes. Get the iOS app from the{' '} + {' '} + or the Android APK from{' '} + + . +

+
+ +
+
+ ) : null} + + {settings.experimentalMobile ? ( +
+ +
+ ) : null} +
+ ) +} diff --git a/src/renderer/src/components/settings/Settings.tsx b/src/renderer/src/components/settings/Settings.tsx index 642b46b74..6e907c6af 100644 --- a/src/renderer/src/components/settings/Settings.tsx +++ b/src/renderer/src/components/settings/Settings.tsx @@ -15,6 +15,7 @@ import { Palette, Server, SlidersHorizontal, + Smartphone, Blocks, SquareTerminal, UserCog @@ -51,6 +52,7 @@ import { DEVELOPER_PERMISSIONS_PANE_SEARCH_ENTRIES } from './DeveloperPermissionsPane' import { ComputerUsePane, COMPUTER_USE_PANE_SEARCH_ENTRIES } from './ComputerUsePane' +import { MobileSettingsPane, MOBILE_SETTINGS_PANE_SEARCH_ENTRIES } from './MobileSettingsPane' import { PrivacyPane } from './PrivacyPane' import { PRIVACY_PANE_SEARCH_ENTRIES } from './privacy-search' import { SettingsSidebar } from './SettingsSidebar' @@ -431,6 +433,14 @@ function Settings(): React.JSX.Element { icon: Bell, searchEntries: NOTIFICATIONS_PANE_SEARCH_ENTRIES }, + { + id: 'mobile', + title: 'Mobile', + description: 'Pair and manage mobile devices.', + icon: Smartphone, + searchEntries: MOBILE_SETTINGS_PANE_SEARCH_ENTRIES, + badge: 'Beta' + }, { id: 'computer-use', title: 'Computer Use', @@ -781,6 +791,16 @@ function Settings(): React.JSX.Element { + + + +