Prevent the launchQueue from re-sending the last LaunchParams (including file handles) when a user reloads the page. Currently, a page refresh triggers the launch consumer again with the data from the original launch. This change ensures that a reload is treated as a standard navigation rather than a "re-launch," and the launchQueue will not be populated with duplicate files unless a new file launch event occurs. The re-queueing was never spec'd, and was an unfortunate never-removed stop-gap that was implemented before file handles could be saved to IndexedDB.
The current behavior of re-sending file handles on reload is often unexpected and leads to buggy user experiences. For example, an app might prompt a user to "save changes" or "overwrite file" every time they refresh the page because the app logic thinks a new file was just opened. Developers currently have to write custom logic to detect reloads and ignore these redundant events, and based on developer feedback certain edge cases are impossible to avoid. This change aligns the API with developer expectations that a "reload" should refresh the current state rather than re-trigger the initial entry-point logic. The re-queueing was never spec'd, and was an unfortunate never-removed stop-gap that was implemented before file handles were writable to IndexedDB. https://github.com/WICG/web-app-launch/issues/92 See other related spec at https://wicg.github.io/web-app-launch/#launching-a-web-app-with-handling
Samples: https://googlechrome.github.io/samples/pwa-testing/principled-ring-yarrow