Skip to content

feat(mobile): receive shares and geographic files - #777

Merged
Medformatik merged 15 commits into
mainfrom
feat/native-share-file-intake
Nov 5, 2026
Merged

Medformatik merged 15 commits into
mainfrom
feat/native-share-file-intake

Conversation

@Medformatik

@Medformatik Medformatik commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

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 .json import 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.

Android: review shared file Android: imported overlay
Android native KML review Android native KML overlay

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.

Before After (light)
Before: unthemed iOS Share Extension After: themed iOS Share Extension
After (dark) Accessibility-large text
Themed iOS Share Extension in dark mode Themed iOS Share Extension with large accessibility text

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.

iOS: review from Files iOS: imported overlay
iOS cold Files GPX review iOS cold Files GPX overlay

Deferred state — browser fixture with native availability set to busy. Import stays disabled. This does not qualify deferral during a real native trip.

Deferred shared file, browser fixture

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.

Unavailable trip authority, browser fixture

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>.ShareExtension and group.<appId>.intake for 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-contracts has 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.

@Medformatik Medformatik added documentation Documentation content, tooling or workspace dependencies javascript Pull requests that update javascript code labels Nov 4, 2026
@Medformatik Medformatik self-assigned this Nov 4, 2026
@Medformatik
Medformatik marked this pull request as ready for review November 5, 2026 03:23
@Medformatik
Medformatik enabled auto-merge (squash) November 5, 2026 07:01
@Medformatik
Medformatik merged commit d63b9f9 into main Nov 5, 2026
31 checks passed
@Medformatik
Medformatik deleted the feat/native-share-file-intake branch November 5, 2026 07:51
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

documentation Documentation content, tooling or workspace dependencies javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant