--- type: work-item project: fidelity status: done 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-05 --- # PDIAP-16167 - AccountLink - XFlow causing web view rewrites investigation ## Status - Done - Confluence report published - Findings/comment sent to Zachary and posted for Jira/Discourse follow-up --- ## 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 - Keep future references clear that this was documented as a consumer-side SwiftUI presentation-topology defect, not an XFlow/XFlowViewMaker regression. - Include Jeff's preferred clarification that `XFlowSDK v0.1.0` predates the REST and Apollo-related changes that were newer additions. --- ## Closure Notes - The published recommendation is to move the full-screen cover modifier to the stable root of `BankInformationView`, outside the conditional branch. - David moved the story to Done on 2026-05-05.