refactor: metro session graph final [WPB-26295]#4960
Conversation
Ups 🫰🟨This PR is too big. Please try to break it up into smaller PRs. |
ce20144 to
e1e4ce6
Compare
f536419 to
e8de862
Compare
| @@ -1135,12 +1190,16 @@ private data class SessionNavigationState( | |||
| private val noSessionAuthenticationGraphRoutes = setOf( | |||
There was a problem hiding this comment.
Do we need all of these lists just to compare routes?
Can't we re-use the CurrentScreen where many destinations are already grouped into some meaningful groups?
There was a problem hiding this comment.
This logic is not about UI grouping or analytics/current screen classification. It controls whether WireActivity is allowed to create a session graph, create a session-backed auth graph, or stay in no-session auth mode.
Some auth routes look similar from a “current screen” perspective, but differ in session ownership: login/account creation must not create a session graph, while remove/register-device screens need an explicit session user id.
There was a problem hiding this comment.
Ok, but keep in mind that from now on, devs need to be aware that when someone adds some new destination then it potentially needs to be added to one of these lists for the app to work properly, so either we find some better way or at least document it properly and make everyone aware of that 🤔
…sion-graph-final # Conflicts: # app/stability/app-devDebug.stability
|



https://wearezeta.atlassian.net/browse/WPB-26295
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764The PR Description
What's new in this PR?
This PR continues the Metro session graph migration and stabilizes runtime behavior around account/session transitions.
Metro session graph refactor
AppSessionViewModelGraph(userId)instead of relying on implicit current-session resolution.UserIdis available.Runtime stability fixes
WireActivity, so recomposition/navigation does not recreate session-scoped graph objects too aggressively.WireSessionImageLoaderand image loading bindings from root graph to session graph, so avatar/image cache is tied to the active account and does not flicker/reset when navigating.MessageSharedStatesession-scoped instead of root-scoped.NewConversationViewModelas a graph-scoped dependency fromNewConversationGraph, removing the temporarySharedNewConversationViewModelbridge.HomeDrawerso drawer content is not skipped when focus trap is disabled.Issues fixed / validated manually
This targets the regressions we saw during Metro migration:
How to test
Recommended manual health check: