id without making users reinstall.The old app’s manifest adds migrate_to (pointing at the new app), and the new app’s manifest adds migrate_from (listing the old app). The browser then offers to move the installed app across, like a normal app update.
This demo migrates between two paths on the same origin. Install the old app, then follow its steps.
The same handshake works across a same-site origin change, such as example.com/app → app.example.com. That case also needs a /.well-known/web-app-origin-association file on the old origin. See the README for the exact snippets.