Repository navigation
chore(mobile): App Store prep — privacy manifest, debug-log cleanup, and protocol-version compat block - #1440
Merged
Merged
Conversation
Two small pre-submission changes for the eventual public iOS App Store
release of Orca Mobile:
1. mobile/app.json — declare an iOS privacy manifest via the
expo.ios.privacyManifests field. On 'npx expo prebuild' Expo merges
our declarations with the SDK packages' bundled manifests and
writes mobile/ios/Orca/PrivacyInfo.xcprivacy. Apple has required
this since May 2024 and rejects builds without it.
Required-reason API categories declared:
- NSPrivacyAccessedAPICategoryUserDefaults (CA92.1) — AsyncStorage
and React Native UserDefaults reads, all inside the app's own
container.
- NSPrivacyAccessedAPICategoryFileTimestamp (C617.1) — RN core's
file-mtime reads in cache-invalidation paths.
- NSPrivacyAccessedAPICategorySystemBootTime (35F9.1) — boost's
monotonic-clock initialization.
NSPrivacyTracking is false. NSPrivacyTrackingDomains and
NSPrivacyCollectedDataTypes are empty — verified against
mobile/package.json which has no analytics, crash reporting, or
tracking SDKs.
2. Removed all 9 [mobile-fit] console.log calls left over from the
presence-lock / scrollback-hydration debugging sessions (8 in
mobile/app/h/[hostId]/session/[worktreeId].tsx, 1 in
src/main/runtime/orca-runtime.ts). They were never gated behind
__DEV__ and would run in shipped App Store builds. Strings only
contained opaque handles and viewport dims, no PII or tokens —
but no reason to keep verbose diagnostics in user-facing builds.
Tests: presence-lock + mobile-subscribe-integration + fit-override-
integration all green (39/39). Lint, tc:node, tc:web clean.
Co-authored-by: Orca <[email protected]>
Extends status.get to return protocolVersion + minCompatibleMobileVersion. Mobile reads them on connect, evaluates compat, and renders a hard-block screen when a combo is declared incompatible. Today's compat constants are wide-open (mobile=any, desktop=any) so nothing actually blocks; the wire format is in place for the day we ship a genuinely-breaking change. Routine drift (additive desktop changes) stays handled by mobile's existing permissive parsing and per-method fallbacks. Co-authored-by: Orca <[email protected]>
CI was failing two ways: 1. Mobile tsc picked up a test file importing vitest, which isn't a mobile devDependency. Exclude *.test.ts from mobile/tsconfig.json. 2. Root vitest can't include mobile/src/** because vite's auto-tsconfig discovery chokes on mobile/tsconfig.json's 'expo/tsconfig.base' extends path (expo isn't installed at the repo root). Revert the include and instead duplicate the pure evaluator into src/shared/protocol-compat.ts (canonical, tested) with a same-shape copy in mobile/src/transport/protocol-compat.ts (Metro-reachable). Both copies have identical logic; the mobile copy carries a comment pointing to the tested canonical version. Co-authored-by: Orca <[email protected]>
Jinwoo-H
force-pushed
the
Jinwoo-H/mobile-app-store-prep
branch
from
May 6, 2026 02:07
753f78b to
9ab10fc
Compare
…-progress pairs The 5s CONNECT_TIMEOUT_MS added in #1481 was a speculative band-aid for 'WS sometimes never fires onopen' — but in practice it was force-closing perfectly fine connections that hadn't completed by 5s (notably first-time QR pairing on iOS, where Local Network permission prompt blocks the WS open for several seconds). Worse, the force-close transitioned state to 'reconnecting' (not 'disconnected'), so waitForConnected() never rejected and sendRequest() hung. Combined with reconnect re-firing the timer, the result was an infinite 'Connecting…' loop with no surfaced error. Pair flows hit this hardest because they call connect() directly without the shared RpcClientProvider, so there's no UI state listener to even show 'reconnecting' to the user — just the spinner. Removing the timer entirely. The handshake-timeout (5s, post-onopen) still catches genuinely stuck handshakes. If we hit a real 'never fires onopen' case later, we can revisit with proper instrumentation rather than a guess at the symptom. Co-authored-by: Orca <[email protected]>
Co-authored-by: Orca <[email protected]>
brennanb2025
added a commit
that referenced
this pull request
Jul 22, 2026
…ed (#9780) * feat(mobile): mount ProtocolBlockScreen when protocol compat is blocked ProtocolBlockScreen existed since PR #1440 but was never mounted: on a 'blocked' compat verdict the only output was a console.warn, so a future MIN_COMPATIBLE_RUNTIME_CLIENT_VERSION bump would have silently shown a broken host UI instead of the update screen. Add HostProtocolGate — a choke point in app/h/_layout.tsx above every /h/[hostId] route — that consumes useHostStatusGates and replaces the blocked host's entire UI (sidebar + detail stack) with ProtocolBlockScreen. The host list and other hosts stay usable; the screen's own 'Back to hosts' escape hatch routes to '/'. Both block reasons render their respective CTAs (mobile-too-old → App Store, desktop-too-old → GitHub Releases). Compat logic stays in the src/shared mirror contract — no fork. * fix(mobile): fence incompatible host routes efficiently * fix(mobile): route Android updates to releases
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
…and protocol-version compat block (stablyai#1440) Co-authored-by: Orca <[email protected]>
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
…ed (stablyai#9780) * feat(mobile): mount ProtocolBlockScreen when protocol compat is blocked ProtocolBlockScreen existed since PR stablyai#1440 but was never mounted: on a 'blocked' compat verdict the only output was a console.warn, so a future MIN_COMPATIBLE_RUNTIME_CLIENT_VERSION bump would have silently shown a broken host UI instead of the update screen. Add HostProtocolGate — a choke point in app/h/_layout.tsx above every /h/[hostId] route — that consumes useHostStatusGates and replaces the blocked host's entire UI (sidebar + detail stack) with ProtocolBlockScreen. The host list and other hosts stay usable; the screen's own 'Back to hosts' escape hatch routes to '/'. Both block reasons render their respective CTAs (mobile-too-old → App Store, desktop-too-old → GitHub Releases). Compat logic stays in the src/shared mirror contract — no fork. * fix(mobile): fence incompatible host routes efficiently * fix(mobile): route Android updates to releases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three small pre-submission changes for the eventual public iOS App Store release of Orca Mobile.
1. iOS privacy manifest (
mobile/app.json)Declare an iOS privacy manifest via Expo's
ios.privacyManifestsconfig. Onnpx expo prebuildExpo merges our declarations with the SDK packages' bundled manifests and writesmobile/ios/Orca/PrivacyInfo.xcprivacy. Apple has required this since May 2024 and rejects builds without it.Required-reason API categories declared:
NSPrivacyAccessedAPICategoryUserDefaults(CA92.1) — AsyncStorage and React Native UserDefaults reads, all inside the app's own container.NSPrivacyAccessedAPICategoryFileTimestamp(C617.1) — RN core's file-mtime reads in cache-invalidation paths.NSPrivacyAccessedAPICategorySystemBootTime(35F9.1) — boost's monotonic-clock initialization.NSPrivacyTrackingisfalse.NSPrivacyTrackingDomainsandNSPrivacyCollectedDataTypesare empty — verified againstmobile/package.jsonwhich has no analytics, crash reporting, or tracking SDKs.After running
npx expo prebuild --platform ios --no-installExpo CNG produced a comprehensivePrivacyInfo.xcprivacycovering the four categories above (UserDefaults, FileTimestamp, SystemBootTime) plus DiskSpace contributed by Expo SDK packages.2. Remove
[mobile-fit]debug logs (mobile/app/.../[worktreeId].tsx,src/main/runtime/orca-runtime.ts)Removed all 9
[mobile-fit]console.logcalls left over from the presence-lock / scrollback-hydration debugging sessions (8 in the mobile session screen, 1 inorca-runtime). They were never gated behind__DEV__and would run in shipped App Store builds. Strings only contained opaque handles and viewport dims (no PII or tokens), but no reason to keep verbose diagnostics in user-facing builds.3. Protocol-version compat block on
status.getMobile users always lag behind desktop releases because the App Store adds 24-48h to mobile updates. Desktop ships instantly via GitHub. The asymmetry is permanent. Today the app already handles routine drift silently — RPC responses parse permissively (
JSON.parse + ascasts, no strict zod on the wire path), event-type switches areif/else ifchains that no-op on unknowns, andterminal.updateViewportalready falls back to the legacy resubscribe path on "method not found". So additive desktop changes don't break old mobiles.What we didn't have was a way to declare "this combo is incompatible — do not pretend it works." This adds that, framed as App Store prep so a future genuinely-breaking change has a clean way to surface itself.
Wire format. Extends the existing
status.getRPC (no new method) to return two new optional fields onRuntimeStatus:protocolVersion— desktop's pairing protocol version.minCompatibleMobileVersion— minimum mobile version this desktop accepts (kill-switch slot).Both optional so pre-PR desktops keep working. Mobile treats absence as
0.Constants. Two integers each side, in
src/shared/protocol-version.ts(desktop) andmobile/src/transport/protocol-version.ts(mobile). Mobile's file isn't shared because Metro/Expo doesn't resolve outsidemobile/; the values are intentionally low-churn so manual sync is acceptable. Both files include inline bump-discipline comments (do bump for: removed RPC / changed semantics / changed encryption; do not bump for: new RPCs / new optional fields / new event types).Today's values. All four constants set to
1/0soevaluateCompatalways returns{ kind: 'ok' }. Nothing actually blocks. The wire format is in place to flip a switch when needed.UI.
mobile/src/components/ProtocolBlockScreen.tsxrenders only when verdict isblocked. Two variants:Both include "Pair a different host" routing back to the host list. No persistent banners, no soft warnings, no middle states — only "works" or "blocked with a concrete action."
Wiring.
mobile/app/h/[hostId]/index.tsxadds auseEffectkeyed onconnState === 'connected'that callsstatus.get, runsevaluateCompat, sets local state, andconsole.warns on a blocked verdict for support debugging. Mirrors the existingworktree.pspattern in the same file (gates onresponse.ok, narrows viaRpcSuccess, no-op on transient errors).Out of scope (intentional). Persistent soft-warning banner, per-method capability negotiation, server-driven feature flags,
docs/mobile-protocol-changelog.md, CI check enforcing changelog entries on bumps. The first three were rejected during design review (auto-design-review-fixskill, 3 iterations) as either "information without action" UX or unjustified scope. The last two can land when the bump cadence outpaces what two integers in two files can clearly track.Test plan
pnpm lintclean (6 unrelated warnings ingithub-project/from PR [feat] Add a full Github project view under "Tasks" #1424)pnpm tc:nodecleanpnpm tc:webcleantsc --noEmitandoxlintcleanpnpm test mobile/src/transport/protocol-compat.test.ts— 7/7 pass (table-driven: undefined fields, equal versions, newer desktop, mobile-too-old, undefined coerced to 0, kill-switch precedence, today's wide-open behavior)pnpm test src/main/runtime/orca-runtime.test.ts -t "protocol version"— new assertion thatgetStatus()returns the version fields passespnpm vitest run src/main/runtime/mobile-presence-lock.test.ts src/main/runtime/mobile-subscribe-integration.test.ts src/main/runtime/fit-override-integration.test.ts— 39/39 pass (unchanged)npx expo prebuild --platform ios --no-installand inspecting the generatedmobile/ios/Orca/PrivacyInfo.xcprivacy.Manual validation for the compat-block path
Today both compat constants are 0 so the screen never renders. To exercise it:
MIN_COMPATIBLE_DESKTOP_VERSION = 999inmobile/src/transport/protocol-version.ts.Made with Orca 🐋