Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snapshots are not taken when VisitableViewController is dismissed (ie. modal session) #180

Closed
pfeiffer opened this issue Feb 23, 2024 · 1 comment · Fixed by #181
Closed

Comments

@pfeiffer
Copy link
Contributor

pfeiffer commented Feb 23, 2024

We've found an issue around how snapshots are being taken when navigating between separate sessions. When navigating between view controllers not belonging to the same session, snapshots are not taken and potentially stale snapshots are being shown.

The most simple example of this issue is actually in the demo app. Adding a delay to the /new action (shown modally) as well as showing a random number highlights the issue. The steps are:

  1. Open the modal demo page (this will use Modal session)
  2. Dismiss the modal
  3. Open the modal demo page - no snapshots are shown, even though the page could already have been snapshotted
  4. Dismiss the modal
  5. Open the modal demo page again - snapshot is now shown, but snapshot is of the page made in step 1, not the latest
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-02-23.at.14.23.13.mov

What we see here is that opening the modal the second time, still shows a spinner, even though the page has already been loaded and a potential snapshot could have been made when dismissing the modal. Opening it the third time actually does use a snapshot, but the snapshot is of the first visit to the modal, and thus potentially stale.

Since the WebView of the modal session is kept around, I'm wondering if we could somehow signal to the WebView that it's VisitableViewController is being dismissed so that a snapshot could be made?

@pfeiffer
Copy link
Contributor Author

Added a fix in #181

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant