Skip to content

🐛 flutter, expo: a run the SDK refuses lands on its details instead of a dead tap, and every app's device suite checks it - #265

Merged
Juma Allan (jumaallan) merged 1 commit into
mainfrom
fix/refused-flow-lands-on-details
Oct 26, 2026
Merged

Juma Allan (jumaallan) merged 1 commit into
mainfrom
fix/refused-flow-lands-on-details

Conversation

@jumaallan

@jumaallan Juma Allan (jumaallan) commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

User description

Story: N/A. On a phone, Flutter and Expo sent a refused run back to the product list with nothing on screen, so Continue looked like a dead tap. Since the SDK's validate() started returning the verdict build() reaches, the apps' preflight catches a flow the SDK would refuse before the SDK mounts. Android and iOS already land that run on the unsubmitted job's details (#259). Flutter and Expo still left for the product list, and so did an SDK failure.

Summary

  • Flutter and Expo end a run the way Android and iOS do.
    • A run the SDK would refuse, and an SDK failure (Deny, a failed submission), lands on the unsubmitted job's details.
    • A cancel still returns to the originating tab.
  • Every app now has a device check for the refused run.
    • Android's settings flow covers it already.
    • Flutter and Expo each gain a maestro/settings.yaml that turns the consent screen off, opens flow/smartSelfieEnrollment/run, asserts the details with failed and a last error, then turns the switch back on and reaches the SDK's consent screen.
    • iOS gains testARunTheSdkWouldRefuseLandsOnTheUnsubmittedDetailsAndNeverMountsIt.
    • Before this, only Android's device flow saw this case, which is how it shipped on the other two.
  • Unit tests that fail without the fix:
    • Flutter sample_ui: "a tap anywhere on a switch row flips that setting, which still reads as a switch".
    • Flutter: "a run the SDK would refuse lands on the unsubmitted details, and never reaches the SDK".
    • Expo: the same case, plus "lands a failed run on the unsubmitted details".
    • Expo's old "goes back to products when the SDK fails or is cancelled" only ever sent a cancel, so it is now named for what it tests.
  • Flutter's Settings switch rows flip on a tap anywhere on the row, as on Android, iOS and Expo. Before, only the small switch took a tap, so a tap on the label did nothing. The new flow's tap on the row caught this. The row still reads as a switch with its on/off state to a screen reader, and a widget test pins both.
  • Existing flows updated for the new landing: Flutter's sdk-flow, profile-journey and document-options (Deny), and Expo's token-session (Exit from a failed submission). Android's flows already asserted this.

Known Issues

  • Without probes, a release build's details for an unsubmitted run read "No verification here" and show no reason, because the result card is a probes surface. That is true on all four apps today, and this keeps them uniform.
  • Locally, Expo's sample-ui pixel goldens differ on this Mac exactly as on main; this change touches no sample-ui file.

Test Instructions

Devices, Oct 26: an Android 12 phone, an iPhone on iOS 27.0.1, the smileid-local-ci emulator (API 34), and an iOS 27.0 simulator.

  • Before and after, by hand: consent screen off, a simulated token, then Registration → details → Continue.
    • On main, Expo and Flutter both returned to the product list, on the Android phone and on the iPhone.
    • On this branch, all four land on Verification details for unsubmitted.
    • Flutter on the Android phone: a tap on the Consent row's label turns it off and back on, and the row still reports as a checked switch.
  • Emulator: Flutter's and Expo's Maestro suites, including the new settings flows: Flutter 9/9 (settings, token-session, deep-links, launch-args, sdk-flow, profile-journey, verifications, licenses, document-options) and Expo 5/5 (settings, shell-wiring, token-session, sdk-flow, document-options).
  • Simulator: ios/verify.sh ui UseSmileIDSampleFlowUITests passes, new test included. swiftformat --lint . is clean.
  • Unit tests:
    • Flutter: flutter/verify.sh checks passes (format, analyze, and 479 + 755 tests, goldens included).
    • Expo: tsc --noEmit, eslint and the app's 514 Jest tests pass.

Screenshot

N/A

🐛


PR Type

Bug fix, Tests


Description

  • Flutter and Expo land refused or failed runs on details.

    • A run the SDK refuses, Deny, or a failed submission routes to unsubmitted job details.
    • A cancel still returns to the originating tab.
  • Flutter switch rows now flip on a tap anywhere on the row.

  • New refused-run device checks on Flutter, Expo and iOS.

    • New maestro/settings.yaml flows for Flutter and Expo, plus an iOS XCUITest.
    • Existing Maestro flows now expect details after Deny or Exit.
  • Unit tests reproduce both fixes in Flutter and Expo.


Diagram Walkthrough

flowchart LR
  preflight["Preflight: validate() misconfigured"]
  sdkResult["SDK result"]
  land["_land / toUnsubmittedDetails"]
  details["Verification details (unsubmitted)"]
  leave["Leave to originating tab"]
  tests["Maestro, XCUITest and unit tests"]
  preflight -- "refused" --> land
  sdkResult -- "failure / captured" --> land
  sdkResult -- "cancelled" --> leave
  land -- "jobId = unsubmitted" --> details
  tests -- "assert failed + last error" --> details
Loading

File Walkthrough

Relevant files
Bug fix
3 files
use_smileid_sample_sdk_flow_tab.dart
Route refused and failed runs to unsubmitted details         
+19/-9   
use_smileid_sample_settings_screen.dart
Whole settings row toggles its switch                                       
+14/-8   
use-smile-id-sample-sdk-flow-step.tsx
Land misconfigured and failed runs on unsubmitted details
+16/-3   
Tests
12 files
use_smileid_sample_settings_sheets_test.dart
Centre rows before tapping to avoid edge drags                     
+3/-1     
use_smileid_sample_token_session_test.dart
Test refused run lands on unsubmitted details                       
+37/-0   
use_smileid_sample_settings_screen_test.dart
Test row tap flips setting, keeps switch semantics             
+53/-0   
use-smile-id-sample-flows.test.tsx
Tests for failed and refused run landing                                 
+21/-1   
UseSmileIDSampleFlowUITests.swift
Add UI test for SDK-refused run landing                                   
+13/-2   
UseSmileIDSampleSettingsSeed.swift
Add seed helper to override one setting                                   
+10/-0   
settings.yaml
New Maestro flow for the consent switch refusal                   
+68/-0   
token-session.yaml
Expect details after Exit, then return to products             
+26/-0   
document-options.yaml
Deny now lands on verification details                                     
+1/-1     
profile-journey.yaml
Deny now lands on verification details                                     
+1/-1     
sdk-flow.yaml
Assert failed details after Deny, then navigate back         
+17/-2   
settings.yaml
New Maestro flow for the consent switch refusal                   
+77/-0   
Documentation
1 files
README.md
Document the new settings flow, nine flows                             
+5/-1     


Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • Copy link
    Copy Markdown
    Member

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Approved: 🐛 flutter, expo: a run the SDK refuses lands on its details instead of a dead tap, and every app's device suite checks it

    Changes 16 files: expo/app/src/steps/use-smile-id-sample-sdk-flow-step.tsx, expo/app/test/use-smile-id-sample-flows.test.tsx, expo/maestro/settings.yaml, expo/maestro/token-session.yaml, flutter/app/lib/src/screens/use_smileid_sample_sdk_flow_tab.dart, and 11 more.

    Checks at 6bcb704: 2 of 14 passed, 12 still running.

    @jumaallan
    Juma Allan (jumaallan) merged commit a789a06 into main Oct 26, 2026
    13 of 14 checks passed
    @jumaallan
    Juma Allan (jumaallan) deleted the fix/refused-flow-lands-on-details branch October 26, 2026 15:51
    @prfectionist

    prfectionist Bot commented Oct 26, 2026

    Copy link
    Copy Markdown

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
    🏅 Score: 87
    🧪 PR contains tests
    🔒 No security concerns identified
    🔀 Multiple PR themes

    Sub-PR theme: Flutter Settings: a tap anywhere on a switch row flips the setting

    Relevant files:

    • flutter/sample_ui/lib/src/screens/use_smileid_sample_settings_screen.dart
    • flutter/sample_ui/test/use_smileid_sample_settings_screen_test.dart
    • flutter/app/test/use_smileid_sample_settings_sheets_test.dart

    Sub-PR theme: Expo: refused and failed runs land on the unsubmitted job's details

    Relevant files:

    • expo/app/src/steps/use-smile-id-sample-sdk-flow-step.tsx
    • expo/app/test/use-smile-id-sample-flows.test.tsx
    • expo/maestro/settings.yaml
    • expo/maestro/token-session.yaml

    Sub-PR theme: iOS: UI test checks that a refused run lands on its details

    Relevant files:

    • ios/App/UITests/UseSmileIDSampleFlowUITests.swift
    • ios/App/UITests/UseSmileIDSampleSettingsSeed.swift

    ⚡ No major issues detected

    @prfectionist

    prfectionist Bot commented Oct 26, 2026

    Copy link
    Copy Markdown

    PR Code Suggestions ✨

    No code suggestions found for the PR.

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

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    2 participants