-
Notifications
You must be signed in to change notification settings - Fork 122
Description
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:
- Go to the Simulator section of the app.
- Click on Sign Out (or Sign In) inside the web interface.
- 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