--- type: work-item project: fidelity status: active ticket: PDIAP-16167 title: "AccountLink - XFlow causing web view rewrites investigation" systems: [xflowsdk, xflowviewmaker, fttransfer] workstreams: [ao-discourse, consumer-integration] people: [jeff-dewitte, zachary-boutyard] related: [pdiap-15836] tags: - work-item - fidelity - discourse - swiftui updated: 2026-05-04 --- # PDIAP-16167 - AccountLink - XFlow causing web view rewrites investigation ## Status - Root cause identified and verified - Confluence report requested by Jeff; draft sent for review - Jeff approved creating the story --- ## Context - Discourse 30181: FTTransfer (Zachary) reported that the AccountLink webview reloads / goes blank when the user taps the exit button in the FTTransfer playground. - Zachary believes the issue is "new" and linked to a recent XFlow version change. --- ## Confirmed Findings - **Root Cause:** SwiftUI Identity Reset (Modifier-Site Teardown). The `.ftFullScreenCover` modifier was anchored to a volatile branch inside `BankInformationView`. When the webview triggered an exit alert, the environment republish dismantled that volatile branch and rebuilt the presenter off-screen, causing the blank screen. - **XFlow is NOT the cause:** XFlow eventing fires once to toggle a boolean and exits. The teardown happens later on a local JS/alert callback. XFlow does not mutate view identity, host lifecycle, or alert state. - **v0.1.0 Rollback Proof:** The issue persists identically when rolling back XFlowSDK to v0.1.0 (pre-REST, pre-Apollo removal), empirically proving the defect is decoupled from the SDK's recent evolution. - **Comparative Analysis:** The non-XFlow entry point (Zachary's alternative flow) survives because it uses a stable coordinator boundary (`BankSetupContainerView` / `NavigationStack`), bypassing the fragile modifier placement. --- ## Verified Resolution - Moving the `.ftFullScreenCover` and the `shouldShowWebView` observer to the **stable root** of `BankInformationView` resolves the issue. Pure SwiftUI fix, no UIKit workarounds needed. - Jeff acknowledged the fix and asked to include it in the Confluence report. --- ## Current Guidance - Jeff's direction: document the findings clearly in a Confluence report, send it to Zachary, and comment it on the story. No need to fix their code directly; clear communication of the issue is the goal. - Jeff also asked to include a version comparison showing that recent REST/GraphQL changes to XFlowSDK do not intersect with this flow. --- ## Next Step - Finalize and publish the Confluence report with all findings, the v0.1.0 rollback evidence, and the XFlowViewMaker version comparison.