Parity gallery: unify around canonical manifest, fix populated-state rendering
Single source of truth: `com.tt.honeyDue.testing.GalleryScreens` lists every user-reachable screen with its category (DataCarrying / DataFree) and per-platform reachability. Both platforms' test harnesses are CI-gated against it — `GalleryManifestParityTest` on each side fails if the surface list drifts from the manifest. Variant matrix by category: DataCarrying captures 4 PNGs (empty/populated × light/dark), DataFree captures 2 (light/dark only). Empty variants for DataCarrying use `FixtureDataManager.empty(seedLookups = false)` so form screens that only read DM lookups can diff against populated. Detail-screen rendering fixed on both platforms. Root cause: VM `stateIn(Eagerly, initialValue = …)` closures evaluated `_selectedX.value` before screen-side `LaunchedEffect` / `.onAppear` could set the id, leaving populated captures byte-identical to empty. Kotlin: `ContractorViewModel` + `DocumentViewModel` accept `initialSelectedX: Int? = null` so the id is set in the primary constructor before `stateIn` computes its seed. Swift: `ContractorViewModel`, `DocumentViewModelWrapper`, `ResidenceViewModel`, `OnboardingTasksViewModel` gained pre-seed init params. `ContractorDetailView`, `DocumentDetailView`, `ResidenceDetailView`, `OnboardingFirstTaskContent` gained test/preview init overloads that accept the pre-seeded VM. Corresponding view bodies prefer cached success state over loading/error — avoids a spinner flashing over already-visible content during background refreshes (production benefit too). Real production bug fixed along the way: `DataManager.clear()` was missing `_contractorDetail`, `_documentDetail`, `_contractorsByResidence`, `_taskCompletions`, `_notificationPreferences`. On logout these maps leaked across user sessions; in the gallery they leaked the previous surface's populated state into the next surface's empty capture. `ImagePicker.android.kt` guards `rememberCameraPicker` with `LocalInspectionMode` — `FileProvider.getUriForFile` can't resolve the Robolectric test-cache path, so `add_document` / `edit_document` previously failed the entire capture. Honest reclassifications: `complete_task`, `manage_users`, and `task_suggestions` moved to DataFree. Their first-paint visible state is driven by static props or APILayer calls, not by anything on `IDataManager` — populated would be byte-identical to empty without a significant production rewire. The manifest comments call this out. Manifest counts after all moves: 43 screens = 12 DataCarrying + 31 DataFree, 37 on both platforms + 3 Android-only (home, documents, biometric_lock) + 3 iOS-only (documents_warranties, add_task, profile_edit). Test results after full record: Android: 11/11 DataCarrying diff populated vs empty iOS: 12/12 DataCarrying diff populated vs empty Also in this change: - `scripts/build_parity_gallery.py` parses the Kotlin manifest directly, renders rows in product-flow order, shows explicit `[missing — <platform>]` placeholders for expected-but-absent captures and muted `not on <platform>` placeholders for platform-specific screens. Docs regenerated. - `scripts/cleanup_orphan_goldens.sh` safely removes PNGs from prior test configurations (theme-named, compare artifacts, legacy empty/populated pairs for what is now DataFree). Dry-run by default. - `docs/parity-gallery.md` rewritten: canonical-manifest workflow, adding-a-screen guide, variant matrix explained. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
After Width: | Height: | Size: 115 KiB |
|
After Width: | Height: | Size: 104 KiB |
|
After Width: | Height: | Size: 126 KiB |
|
After Width: | Height: | Size: 117 KiB |
|
After Width: | Height: | Size: 146 KiB |
|
After Width: | Height: | Size: 137 KiB |
|
After Width: | Height: | Size: 136 KiB |
|
After Width: | Height: | Size: 128 KiB |
|
After Width: | Height: | Size: 547 KiB |
|
After Width: | Height: | Size: 436 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 460 KiB |
|
After Width: | Height: | Size: 390 KiB |
|
After Width: | Height: | Size: 549 KiB |
|
After Width: | Height: | Size: 438 KiB |
|
After Width: | Height: | Size: 350 KiB |
|
After Width: | Height: | Size: 319 KiB |
|
After Width: | Height: | Size: 534 KiB |
|
After Width: | Height: | Size: 435 KiB |
|
After Width: | Height: | Size: 479 KiB |
|
After Width: | Height: | Size: 440 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 347 KiB |
|
After Width: | Height: | Size: 330 KiB |
|
After Width: | Height: | Size: 523 KiB |
|
After Width: | Height: | Size: 437 KiB |
|
After Width: | Height: | Size: 391 KiB |
|
After Width: | Height: | Size: 360 KiB |
|
After Width: | Height: | Size: 140 KiB |
|
After Width: | Height: | Size: 129 KiB |
|
After Width: | Height: | Size: 110 KiB |
|
After Width: | Height: | Size: 103 KiB |
|
After Width: | Height: | Size: 139 KiB |
|
After Width: | Height: | Size: 132 KiB |
|
After Width: | Height: | Size: 473 KiB |
|
After Width: | Height: | Size: 403 KiB |
|
After Width: | Height: | Size: 586 KiB |
|
After Width: | Height: | Size: 509 KiB |
|
After Width: | Height: | Size: 568 KiB |
|
After Width: | Height: | Size: 497 KiB |
|
After Width: | Height: | Size: 555 KiB |
|
After Width: | Height: | Size: 489 KiB |
|
After Width: | Height: | Size: 569 KiB |
|
After Width: | Height: | Size: 464 KiB |
|
After Width: | Height: | Size: 456 KiB |
|
After Width: | Height: | Size: 391 KiB |
|
After Width: | Height: | Size: 568 KiB |
|
After Width: | Height: | Size: 460 KiB |
|
After Width: | Height: | Size: 722 KiB |
|
After Width: | Height: | Size: 617 KiB |
|
After Width: | Height: | Size: 802 KiB |
|
After Width: | Height: | Size: 702 KiB |
|
After Width: | Height: | Size: 714 KiB |
|
After Width: | Height: | Size: 654 KiB |
|
After Width: | Height: | Size: 748 KiB |
|
After Width: | Height: | Size: 736 KiB |
|
After Width: | Height: | Size: 776 KiB |
|
After Width: | Height: | Size: 681 KiB |
|
After Width: | Height: | Size: 793 KiB |
|
After Width: | Height: | Size: 709 KiB |
|
After Width: | Height: | Size: 908 KiB |
|
After Width: | Height: | Size: 805 KiB |
|
After Width: | Height: | Size: 726 KiB |
|
After Width: | Height: | Size: 680 KiB |
|
After Width: | Height: | Size: 674 KiB |
|
After Width: | Height: | Size: 585 KiB |
|
After Width: | Height: | Size: 793 KiB |
|
After Width: | Height: | Size: 702 KiB |
|
After Width: | Height: | Size: 888 KiB |
|
After Width: | Height: | Size: 748 KiB |
|
After Width: | Height: | Size: 141 KiB |
|
After Width: | Height: | Size: 138 KiB |
|
After Width: | Height: | Size: 142 KiB |
|
After Width: | Height: | Size: 140 KiB |
|
After Width: | Height: | Size: 517 KiB |
|
After Width: | Height: | Size: 426 KiB |
|
After Width: | Height: | Size: 523 KiB |
|
After Width: | Height: | Size: 453 KiB |
|
After Width: | Height: | Size: 548 KiB |
|
After Width: | Height: | Size: 485 KiB |
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 125 KiB |
|
After Width: | Height: | Size: 520 KiB |
|
After Width: | Height: | Size: 479 KiB |
|
After Width: | Height: | Size: 547 KiB |
|
After Width: | Height: | Size: 436 KiB |
|
After Width: | Height: | Size: 700 KiB |
|
After Width: | Height: | Size: 740 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 586 KiB |
|
After Width: | Height: | Size: 464 KiB |
|
After Width: | Height: | Size: 492 KiB |
|
After Width: | Height: | Size: 389 KiB |
|
After Width: | Height: | Size: 236 KiB |
|
After Width: | Height: | Size: 219 KiB |