Skip to content

Simulator WebView fails to handle app navigation (Sign Out, Edit, etc.) #447

@harikrishna-au

Description

@harikrishna-au

Describe the bug
The Simulator WebView fails to handle critical app navigation events such as "Sign Out", "Sign In", or navigating to specific project/group pages. The logic to handle these events exists in SimulatorViewModel.findMatchInString but is never called by the WebView in SimulatorView. This results in the native app state falling out of sync with the web session (e.g., user is logged out in web but logged in natively) and dead code in the codebase.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the Simulator section of the app.
  2. Click on Sign Out (or Sign In) inside the web interface.
  3. Observe that the WebView loads the web page response, but the native app does not redirect to the Login screen or update its session state.

Expected behavior
When a user performs an action in the Simulator that corresponds to a native app state change (like signing out), the app should intercept the URL, execute the corresponding logic (e.g., clearCookies, Get.offNamed), and update the native UI accordingly.

Screenshots
N/A

Device Information [optional]:

  • OS: Android/iOS

Additional context
The method findMatchInString in lib/viewmodels/simulator/simulator_viewmodel.dart contains the logic for these checks but is currently unused. It needs to be integrated into the shouldOverrideUrlLoading or onLoadStart callback in lib/ui/views/simulator/simulator_view.dart.

Are you working on this issue? (Yes/No)
Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions