Skip to content

[WAL-1346] feat(wallet): add proximity presentation to wallet demos - #2160

Open
szijpeter wants to merge 16 commits into
feature/wal-1346-proximity-wallet-sdkfrom
feature/wal-1346-proximity-wallet-demos
Open

[WAL-1346] feat(wallet): add proximity presentation to wallet demos#2160
szijpeter wants to merge 16 commits into
feature/wal-1346-proximity-wallet-sdkfrom
feature/wal-1346-proximity-wallet-demos

Conversation

@szijpeter

@szijpeter szijpeter commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

This integrates holder-side proximity presentation into all three mobile wallet demos for WAL-1346: Compose Android, Compose iOS, and native SwiftUI. Each app gets a dedicated in-person entry below the existing online presentation action and keeps the complete journey inside the familiar Present-tab wallet shell.

This PR is stacked on the Wallet SDK contract in walt-id/waltid-identity#2159. The lower mobile BLE transport is provided by walt-id/waltid-identity#2157, the governing architecture is documented in walt-id/waltid-architecture#60, and exact-build physical evidence and the public ISO holder-test plan are tracked in WAL-1349 architecture PR #61.

This PR contains the complete reader-trust delta formerly carried by #2167, plus the Settings/public-file-import path across Compose Android, Compose iOS, and native SwiftUI. #2167 was closed as superseded after 4/4 exact transplant proof and is not a separate merge unit.

What Changed

Shared Compose journey

  • Adds one shared Android/iOS controller and screen set for prerequisites, Device Engagement QR, connection progress, request review, holder choices, repeated requests, terminal states, cancellation, and recovery.
  • Preflights the exact selected SDK configuration before session creation, executes runtime-permission remediation, rechecks after every host result, and blocks startup instead of silently falling back around a missing permission. On Android, permissions that the OS will no longer prompt for become an explicit Open app settings action; returning from Settings triggers a fresh capability check before session creation.
  • Embeds QR, connection, review, and result states under the normal wallet toolbar and status message instead of replacing the host screen.
  • Reuses the existing credential art, human-readable credential and claim labels, metadata sections, and review action layout so online and in-person presentation remain visually aligned.
  • Renders the exact Wallet SDK review, including reader-authentication scope, signature validity, certificate path, revocation, optional RICAL evidence, product trust, asserted purpose, and retention intent.
  • Renders reader information as an honest collapsed summary with expandable authentication/trust evidence when the request provides it; unsigned requests do not invent a reader identity or logo.
  • Supports per-document credential alternatives and exact element disclosure choices, resetting consent for every repeated exchange.

Reader-trust configuration ownership

  • Owns the cross-platform Settings surface for Reader CA anchors and optional RICAL trust sources, with add, inspect, remove, reset, and explicit session-snapshot behavior.
  • Imports only public DER/PEM certificate material and a versioned walt.id trust-bundle format after validation and fingerprint preview; PKCS#12/PFX and private reader keys are rejected.
  • Keeps trust material app-private and avoids logs, bundled production roots, or implicit network trust.

Platform integration

  • Keeps runtime permission requests, Bluetooth settings actions, lifecycle interruption, keep-awake, temporary QR brightness, and platform accessibility behind Android and iOS host boundaries.
  • Keeps the complete journey inside each host's Present-tab safe area and makes the native SwiftUI parent observe the child session directly, with one start owner and deterministic dismissal/restart behavior.
  • Reuses the shared native iOS review components while keeping the SwiftUI journey a thin renderer over the Swift Wallet SDK session rather than reconstructing protocol state.
  • Cancels the typed SDK session when the holder leaves the Present tab and restores screen policy on backgrounding, every terminal path, dismissal, wallet locking, and wallet reset.

QR, accessibility, and app wiring

  • Pins the minimum proximity-only renderer dependencies directly in this PR: ZXing Java 3.5.4 on Android and ZXing-C++ 3.1.1 on Compose iOS and native SwiftUI.
  • Accepts only bounded ASCII mdoc: Device Engagement text, uses low error correction with no ECI, fails closed instead of truncating oversized input, pins the Compose iOS/native SwiftUI module fingerprint, and renders an exact four-module quiet zone using whole physical-pixel modules.
  • Uses a package-private Objective-C++ adapter in the native SwiftUI demo with a narrow proximity-only entry point because the pinned Swift wrapper does not expose no-ECI ASCII encoding; the adapter adds no second QR implementation or public module.
  • Adds aligned cross-platform accessibility identifiers, privacy-safe QR labels, localization-ready shared strings, and focused controller/UI/view-model fixtures, including native presentation lifecycle and cross-tab layout regressions.
  • Documents the supported journey, automatic permission preflight, and qualification boundary in both demo READMEs.

Architecture Notes

  • Protocol state, trust, request meaning, legal actions, disclosure validation, and capability/remediation reporting remain owned by the Wallet SDK. Demo code owns holder UI choices and execution of platform actions such as permission prompts.
  • Compose Android and Compose iOS share the journey semantics and rendering. Native SwiftUI shares the SDK contract, review primitives, and test identifiers while remaining platform-idiomatic.
  • The normal UI does not expose BLE roles, UUIDs, transport internals, or protocol-version controls.
  • QR encoding remains a demo-host concern outside the public Wallet SDK; the shared behavior is explicit without introducing a new published KMP module.

Caveats and Follow-Ups

Breaking

  • No released API or persisted wallet data is migrated. The mobile demos consume the new unreleased SDK contract directly.

@szijpeter szijpeter self-assigned this Aug 28, 2026
@linear-code

linear-code Bot commented Aug 28, 2026

Copy link
Copy Markdown

WAL-1346

WAL-1376

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 678eb97a-f7d3-4ea9-88bd-95d5c0d7cd65

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@szijpeter
szijpeter force-pushed the feature/wal-1346-proximity-wallet-demos branch 2 times, most recently from 9185882 to eb43170 Compare August 28, 2026 09:24
@szijpeter
szijpeter force-pushed the feature/wal-1346-proximity-wallet-sdk branch 2 times, most recently from cfef818 to cc0ae5b Compare August 28, 2026 09:32
@szijpeter
szijpeter force-pushed the feature/wal-1346-proximity-wallet-demos branch from eb43170 to 1fcdc23 Compare August 28, 2026 09:32
@szijpeter
szijpeter force-pushed the feature/wal-1346-proximity-wallet-sdk branch from cc0ae5b to bbe1358 Compare August 28, 2026 15:01
@szijpeter
szijpeter force-pushed the feature/wal-1346-proximity-wallet-demos branch from 3c18bc9 to ebdff97 Compare August 28, 2026 15:01
@szijpeter
szijpeter force-pushed the feature/wal-1346-proximity-wallet-sdk branch from bbe1358 to cd48d88 Compare August 28, 2026 15:22
@szijpeter
szijpeter force-pushed the feature/wal-1346-proximity-wallet-demos branch 2 times, most recently from c6bdb27 to 679ba35 Compare August 28, 2026 18:23
@szijpeter
szijpeter force-pushed the feature/wal-1346-proximity-wallet-sdk branch from cd48d88 to 2924118 Compare August 28, 2026 18:23
@szijpeter
szijpeter force-pushed the feature/wal-1346-proximity-wallet-sdk branch from 2924118 to 5bd0b86 Compare August 31, 2026 10:14
@szijpeter
szijpeter force-pushed the feature/wal-1346-proximity-wallet-demos branch from 679ba35 to 091c7e8 Compare August 31, 2026 10:14
@szijpeter
szijpeter force-pushed the feature/wal-1346-proximity-wallet-sdk branch from 5bd0b86 to 070ad38 Compare September 1, 2026 14:55
@szijpeter
szijpeter force-pushed the feature/wal-1346-proximity-wallet-demos branch from 4752ed4 to 786edf1 Compare September 1, 2026 14:55
@szijpeter szijpeter added the ci:mobile-dc-api Run Android Digital Credentials API E2E CI for this PR label Sep 2, 2026
@szijpeter
szijpeter force-pushed the feature/wal-1346-proximity-wallet-sdk branch from 070ad38 to d98a4eb Compare September 2, 2026 08:54
@szijpeter
szijpeter force-pushed the feature/wal-1346-proximity-wallet-demos branch 3 times, most recently from 8bd5718 to f828be5 Compare September 2, 2026 10:04
@szijpeter
szijpeter force-pushed the feature/wal-1346-proximity-wallet-sdk branch from d98a4eb to b56b183 Compare September 2, 2026 14:59
@szijpeter
szijpeter force-pushed the feature/wal-1346-proximity-wallet-sdk branch from b56b183 to b1582c6 Compare September 2, 2026 19:37
@szijpeter
szijpeter force-pushed the feature/wal-1346-proximity-wallet-demos branch from 02d41ca to 1442b3d Compare September 2, 2026 19:37
@szijpeter
szijpeter force-pushed the feature/wal-1346-proximity-wallet-sdk branch from b1582c6 to 8d27c0c Compare September 3, 2026 14:12
@szijpeter
szijpeter force-pushed the feature/wal-1346-proximity-wallet-demos branch from 1442b3d to 5b2e130 Compare September 3, 2026 14:12
@szijpeter
szijpeter force-pushed the feature/wal-1346-proximity-wallet-sdk branch from 8d27c0c to 9d415cb Compare September 4, 2026 12:04
@szijpeter
szijpeter force-pushed the feature/wal-1346-proximity-wallet-demos branch from 5b2e130 to de6101a Compare September 4, 2026 12:04
@szijpeter
szijpeter force-pushed the feature/wal-1346-proximity-wallet-sdk branch from 9d415cb to e50a13c Compare September 4, 2026 12:51
@szijpeter
szijpeter force-pushed the feature/wal-1346-proximity-wallet-demos branch 2 times, most recently from e3ec547 to 7731703 Compare September 4, 2026 13:11
@szijpeter
szijpeter force-pushed the feature/wal-1346-proximity-wallet-sdk branch from e50a13c to 5f2d503 Compare September 4, 2026 13:11
@szijpeter
szijpeter force-pushed the feature/wal-1346-proximity-wallet-demos branch from 7731703 to 6407f3e Compare September 4, 2026 14:38
@szijpeter
szijpeter force-pushed the feature/wal-1346-proximity-wallet-sdk branch from 5f2d503 to 0f5ff03 Compare September 4, 2026 14:38
@sonarqubecloud

sonarqubecloud Bot commented Sep 4, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:mobile-dc-api Run Android Digital Credentials API E2E CI for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant