Repository navigation
SDKS-5268 flutter-davinci sample app - #145
Open
rodrigoareis wants to merge 3 commits into
Open
rodrigoareis wants to merge 3 commits into
rodrigoareis wants to merge 3 commits into
Conversation
rodrigoareis
requested review from
george-bafaloukas-forgerock,
spetrov and
vahancouver
October 28, 2026 20:00
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
spetrov
approved these changes
Nov 5, 2026
| Test coverage for the behaviour this app demonstrates lives in the bridge package instead: | ||
|
|
||
| - **Unit tests** — `../flutter-sdk-bridge/ping_davinci/test/` (collector and node mapping, | ||
| validation, error translation). Run with `flutter test` from the `flutter/` workspace root. |
Contributor
There was a problem hiding this comment.
run "from the flutter/ workspace root"
must run from flutter-sdk-bridge/ping_davinci/ ...
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds
flutter-davinci, a Flutter sample app that runs a PingOne DaVinci flow natively through theping_davincibridge (#144)). The branch also carries one hardening commit for the bridge, found while writing and runtime-checking the sample.EnvreadsPINGONE_DISCOVERY_ENDPOINT,PINGONE_CLIENT_ID,PINGONE_REDIRECT_URI,PINGONE_SCOPESandPINGONE_ACR_VALUESthroughString.fromEnvironment, with TODO placeholders as defaults.flutter run --dart-define-from-file=../.envworks with nothing editedacr_valuesflow policy id can be changed per run (persisted withshared_preferences)CollectorFormrenders eachContinueNodedynamically, one widget per collector branch: text, password (with verify), submit and flow buttons, labels, read-only text, single/multi select, boolean (aSwitchListTilewhen the server asks forSWITCH), phone number, image, polling, QR code, device registration/authentication and metadatavalidatebefore submit. AnErrorNode's per-field errors render on the same form so the user can correct and retry; errors with no field target (a wrong password) show as a bannerunsupportedFields) are listed with their reason instead of failing the formdata/repository,ui/features/*/view_models+views,routing/),go_router, a shared themeappRedirectUriSchememanifest placeholder that native2.2.0'sbrowsermodule requires. iOS needs noInfo.plistchangeping_davinciunit and integration suites; the README says soEnvnow reads build-timePINGAIC_*dart-defines too (same pattern as above), and their READMEs and config views are updated to match. Defaults and behaviour are unchanged when no define is passed.flutter-journey'soidcConfigis nownulluntilclientIdis setping_davinci: every call that reads or moves a flow (start,next,validate,startPolling,signOff,dispose) is serialized per handle, anddisposeremoves the handle first. AnextorstartPollingin flight duringdisposecan no longer leave a cached node or a running poll behindping_davinciiOS: detaching the Flutter engine stops every running poll, as Android's doesretainedState()(handles, cached nodes/sessions, flow locks, polls), used by a new configure-to-dispose leak test (davinci_lifecycle_leak_test). It is not part of the public Dart APIping_core:Registryreports its size (sizeon Android,count()on iOS) for the leak checkflutter-sdk-bridge/README.mdnow documentsping_davinci(module description, "DaVinci collectors vs. Journey callbacks", how to run its integration suite)flutter-davincito the workspaceTest plan
flutter analyzeclean (workspace root)ping_davinciunit tests, Android native unit tests and iOSRunnerTestspass after the hardening changeping_davinciintegration suite (hermetic mock DaVinci server) re-run after the hardening change, one file per process, on Android (Pixel 5 API 33) and the iOS simulator, including the newdavinci_lifecycle_leak_testWidgetTesterdriver (removed afterwards, since the sample ships no tests): sign-on, wrong password banner, inline field error on register, form-fields flow, continue and finish polling, QR code, device registration, metadata, success screen (code, tokens, userinfo, reload), sign-off. One section per collector branch; all pass on both platformsflutter build apk --debugandflutter build ios --debug --no-codesignfrom a cleangit worktreecheckout of the branchDEVICE_AUTHENTICATIONis rendered but not walked live: the tenant offers it only to a signed-in user with an enrolled deviceAPI error (HTTP 400)failure page, where Android shows a recoverable error (SDKS-5461, pre-existing)