refactor: session scoped metro graph [WPB-25946]#4916
Conversation
Ups 🫰🟨This PR is too big. Please try to break it up into smaller PRs. |
5b8cd61 to
a942f40
Compare
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (39.28%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #4916 +/- ##
===========================================
- Coverage 49.63% 49.59% -0.05%
===========================================
Files 630 642 +12
Lines 22530 22565 +35
Branches 3427 3429 +2
===========================================
+ Hits 11182 11190 +8
- Misses 10311 10337 +26
- Partials 1037 1038 +1
... and 10 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|



https://wearezeta.atlassian.net/browse/WPB-25946
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764The PR Description
What's new in this PR?
This PR makes Metro-created ViewModels session-aware and removes the old Hilt
wireViewModelhelper surface.Main changes:
viewModelScopeKeytoMetroViewModelGraphWireActivityViewModelWireActivitygraph-backed ViewModels with a user-scoped keywireViewModelcall sites in navigation, Home, Import Media, and App Lock to Metro/Hilt bridge helpersAssistedViewModelExt.ktViewModelScoped.ktWhy?
The temporary Hilt bridge can otherwise keep a ViewModel/factory graph tied to the previous
@CurrentAccountafter account switch.This PR does not remove the bridge yet, but it makes the current bridge session-aware and removes the old generic Hilt ViewModel helper so the final cleanup can focus on replacing the bridge with an explicit
SessionGraph(userId).