refactor: migrate viewmodel creation to metro [WPB-25946]#4945
Conversation
Ups 🫰🟨This PR is too big. Please try to break it up into smaller PRs. |
Codecov Report❌ Patch coverage is Please upload reports for the commit bd13018 to get more accurate results. ❌ Your patch check has failed because the patch coverage (2.43%) 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 #4945 +/- ##
===========================================
- Coverage 49.14% 49.08% -0.06%
===========================================
Files 650 643 -7
Lines 22989 23017 +28
Branches 3518 3518
===========================================
+ Hits 11297 11298 +1
- Misses 10645 10672 +27
Partials 1047 1047
Continue to review full report in Codecov by Harness.
🚀 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
Migrates ViewModel creation to Metro/MetroX.
This introduces shared Metro-backed ViewModel factory/bindings and updates app, Cells, and Meetings ViewModel call sites to resolve ViewModels through Metro-backed APIs.
Why
This moves us closer to the final Metro DI model where ViewModel construction is handled by Metro scopes instead of Hilt-style/manual bridge objects.
The important part is scope-safe ViewModel lookup. Session ViewModels must include the current session/account scope in their key, otherwise Compose can reuse a ViewModel created for another account after account switching, logout, or client removal.
Changes
scopedMetroViewModelandscopedAssistedMetroViewModelhelpers with KDoc.ViewModelStoreOwner.WireApplicationGraph, so the app-levelMetroViewModelFactorycan resolve Cells and Meetings ViewModels.