Repository navigation
feat(mobile): receive shares and geographic files - #777
Merged
Merged
Conversation
Medformatik
marked this pull request as ready for review
November 5, 2026 03:23
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
Installed apps can receive shared locations and GPX, GeoJSON and KML files, then let the user review them before opening a search or importing a map overlay. Android supports typed SEND/SEND_MULTIPLE and content VIEW intents. iOS adds a supported Share Extension and Files Open In; after adding a share, the user opens OpenMapX manually. Intake waits while native navigation is active.
The local inbox has byte/count limits, expiry and explicit completion. No native path or sender URI crosses the authenticated bridge. Protocol 4 adds intake while protocol 3 keeps navigation working across older web/native builds. Browser
.jsonimport remains supported; XML/entity and geometry bounds are enforced at the parser boundary.Android API 36.1 emulator — actual native intake. A separate QA app sent GPX, GeoJSON and KML through a foreign pipe-backed provider; each reached the review dialog and imported an overlay. Direct GPX document VIEW also reached preview and replacement. The screenshots show KML review and the resulting overlay after the document-start lifecycle correction. Repeated text/file handoffs, direct GPX document opening, oversized-file rejection and mixed-file rejection passed. These use the native inbox and bridge, without a transport fixture.
iOS 27 Simulator — actual Share Extension and manual handoff. Add saves the item, then the user opens OpenMapX to review it. Text and all three file formats completed review/application. The before image was captured during the earlier native qualification; after views show the rebuilt theme revision. GeoJSON Add/manual handoff/import was repeated successfully after the descriptor-reader correction.
The Share Extension uses the shared OpenMapX theme, a content summary, a filled primary action and explicit progress/result states. Light, dark and accessibility-large text were inspected in the Simulator.
iOS Files — cold host launch. Files opened a saved GPX in the stopped host using a Simulator Release build with bundled JavaScript. Review and explicit Import completed; the original remained in Files. Warm Files opening also passed. The host reads a bounded security-scoped copy and never edits the provider's original.
Deferred state — browser fixture with native availability set to busy. Import stays disabled. This does not qualify deferral during a real native trip.
Unavailable trip authority — browser-only fixture, 390 × 844. This notice retains shared content and blocks import while session status is unknown. It does not claim a trip is active. Empty inboxes and transient listing errors without known items do not show it. This is actual web rendering, not native failure injection.
Related work
Builds on map intent handling in #769 and native navigation surfaces in #773.
Verification
The latest review fixes recognize current Apple/Google long map links and distinguish unavailable trip authority from a known active trip. Unknown authority still blocks import safely; feasibility mode permits intake. Route viewports are not mistaken for place pins, and an empty inbox stays quiet. Shared bytes remain owned until explicit application/discard. Current CI results are attached to this PR.
Final candidate: 83 mobile suites / 1,409 tests, mobile types and all three web TypeScript configurations passed. Ten focused protocol/bridge/parser/config suites passed 225 tests; after privacy changes, five affected suites passed 156 tests. These sets overlap.
Android debug APK and 18 intake JVM tests passed. iOS Simulator Debug and Release builds passed for host and both extensions. SwiftPM passed 22 inbox/share/scope/cancellation/privacy tests. Earlier all four native JVM suites passed 67 tests.
Two clean HTTPS generations agreed; generated native surface, reviewed permissions, installed WebView policy, dependency inventory and headless-bundle checks passed. Earlier full local verification passed 24,916 tests; later attempts could not acquire the shared verification lock.
Claude reviewed the design and implementation. Final Claude review approved the runtime corrections with no blocking correctness or security findings. The expiration-handler cleanup was fixed; two narrow queue/cancellation limits are documented in the QA report. Android now distinguishes native document starts from history callbacks, and production bridge requests have deadlines. iOS Files uses a bounded, cancellable security-scoped reader with explicit background-task cleanup.
Final correction checks: 83 mobile suites / 1,416 tests, 4 focused web/core suites / 99 tests, mobile types and all three web TypeScript configurations passed. Full Claude review and a re-review identified the two original gaps and follow-up parsing/empty-state regressions; those findings were corrected with tests. The earlier native screenshots remain the device evidence; the new failure notice has component rendering/interaction coverage and an inspected browser-fixture rendering, with native-device failure presentation still unqualified.
Remaining device qualification: actual active-trip deferral, process-death/Recents replay including API 30 or lower, old-web overflow, real hung/cloud providers, older-iOS registration and production Apple provisioning. The deferred screenshot above is a browser fixture. Generic MIME fallbacks remain unchanged without provider evidence. The committed QA report separates native observations, automated checks and remaining release gates.
Release and upgrade impact
Product impact: operator-action
Deploy compatible web first, then rebuild native apps. Register/provision
<appId>.ShareExtensionandgroup.<appId>.intakefor the host and Share Extension only; the navigation widget has no group. Production Apple signing and older-iOS GeoJSON registration remain release gates. A patch Changeset covers the qualified public CLI’s shared-core dependency rebuild; the product release fragment records the native operator steps.No package release:
@openmapx/extension-contractshas no source, schema, build configuration or dependency changes. The global lockfile change is confined to the native WebView patch hash and derived Expo peer keys, which are outside its published dependency graph. The CLI rebuild is covered by its existing patch Changeset.