`live_session` breaking `sticky: true` Live View

Greetings comrades,

I have discovered that “sticky” LiveViews get remounted (breaks stickiness, resets state) when live navigating to a route that lives in a different live_session in the router.

I made a repo here to demonstrate the problem:

I do not know if this is expected behavior or a bug.

If it is expected then I will open a PR to add this vital information to the docs (Phoenix.Component — Phoenix LiveView v1.0.0-rc.6).

If it is a bug then I will open an issue in the live_view github repo, maybe even have a go at fixing it myself (hold my beer).

I see at least one other person is already aware of this limitation:

Maybe this is in the docs and I just missed it?

UPDATE: Yup, I’m blind:

https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.Router.html#live_session/3

Redirecting between live_session s will always force a full page reload and establish a brand new LiveView connection.