Skip to content

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

@pfeiffer

Description

@pfeiffer

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?

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