fix: configure native voice api origin#364
Merged
Merged
Conversation
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.
Summary
capacitor://origin.NEXT_PUBLIC_CREWCMD_NATIVE_API_BASE_URLas the explicit mobile-native API origin, falling back toNEXT_PUBLIC_APP_URL.native.config.base-url, unsupported base URLs, and not-configured native upload/chat paths.Why
After testing PR #361 on device, iOS kept the microphone indicator live in background/lock, but spoken turns never reached the agent. The likely cause is that native
URLSessionwas handedwindow.location.origin; in a bundled Capacitor app that can becapacitor://localhost, which native networking cannot POST to. Foreground WebView fetches can still work, making this fail only in the native/background path.Verification
node --check apps/mobile/scripts/ensure-ios-voice-session.mjspnpm lint:check -- apps/mobile/scripts/ensure-ios-voice-session.mjs src/lib/native-voice-session.ts(passes; existing repo warnings only)git diff --checkpnpm typecheckcd apps/mobile && pnpm ios:voice-session && pnpm checkTest notes for device rebuild
Set
NEXT_PUBLIC_CREWCMD_NATIVE_API_BASE_URLto the CrewCmd server URL reachable from the phone before rebuilding/syncing the Capacitor app. If unset, the native path falls back toNEXT_PUBLIC_APP_URL.