Repository navigation
feat(mobile): run native ground and transit navigation in the installed app - #758
Merged
Merged
Conversation
Medformatik
force-pushed
the
feat/mobile-shell-requests
branch
from
November 3, 2026 21:51
904ca65 to
6f60e3e
Compare
This was referenced Nov 3, 2026
…ed app Compose the navigation coordinator into the foreground app and dispatch the page's session commands to it. The foreground coordinator is registered so the background location task feeds the same instance, and the handshake now reports the navigation capabilities the shell actually has. The start flow shows the native permission screens, uses Android's background-location request to reach "Allow all the time", and asks once for notification permission. Reroute answers re-enter the coordinator as queued mutations bound to the request they answer. Transit refresh and replan are still no-ops. Fixes found on a device: expo-task-manager persists its job, so the app now holds RECEIVE_BOOT_COMPLETED (without it the first location update crashed the process); writes are serialised on the SQLite handle (separate exclusive-transaction connections hit "database is locked"); speech waits for the TTS engine to initialise (a cold launch reported every cue as failed); and the native screens clear the status bar.
Medformatik
force-pushed
the
feat/mobile-native-navigation
branch
from
November 3, 2026 22:11
8a75857 to
ad03646
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What changed and why
The shell already had processors, durable sessions, effect ports, permissions and recovery, but nothing composed them, so the installed app reported every navigation mode as unavailable and turn-by-turn guidance never started.
createForegroundNavigationnow builds that graph in the foreground app, andApp.tsxsends every page command to itsNavigationCoordinator. The one-shot location, settings and sign-in requests still reach the shell services. The handshake reports what the shell can actually do: ground and transit navigation, background location, local notifications once that permission is granted, and speech when the native audio module is present.session.startruns the permission controller with native screens (PermissionPrompts.tsx), because the page may be suspended during OS prompts. On Android 11 and later, the background step uses the system's background-location request, which opens the app's own page with "Allow all the time". The first start also asks once for notification permission, for transit alight alerts.applyReroute, which applies it only while the session and its pending request id still match. A newer request aborts the one in flight.Running it on a phone turned up four more failures:
RECEIVE_BOOT_COMPLETED, so the process crashed. The permission is now declared and reviewed in the compliance list. It registers no boot receiver, and the app starts nothing at boot.speaknow waits for initialisation, up to 3 s.Transit refresh and replan effects are still no-ops: a transit session keeps running on its captured itinerary.
Related work
Part of #398. This covers Android only: iOS has not run on a device, and transit refresh and replan are not wired. Third of four stacked PRs. It is based on #757 (shell requests), which is based on #756.
Verification
session.stoppedand takes the location service out of the foreground.spokenon three consecutive cold launches. One earlier launch in the same Metro session reportedfailed, and I could not tell whether it ran the previously installed build, so cold-start speech needs more device runs.apps/mobile: jest (new tests for reroute answers, remote work, permission prompts and App composition),tsc, biome,test:native(Swift and Kotlin),assert-permissions,assert-generated,assert-boundary,inventoryandpnpm mobile:bundle:check.Release and upgrade impact
Product impact: ordinary