Repository navigation
Wave-2 polish: error-surfacing, a11y, off-thread QR, per-household search - #7
Merged
Merged
Conversation
DrawerViewModel mapped HierarchyStore.state but dropped the store's error (not even a field on DrawerUiState), so a network failure rendered 'No storages yet' — indistinguishable from a real empty account, and pull-to-refresh failures vanished. Add error to DrawerUiState, map it, gate the empty text on error == null, and render failures through the existing ErrorRetry (Assertive live region + retry). Add a DrawerViewModel error-path unit test.
MissingItemsViewModel exposed error but the screen never rendered it; a failed load fell through to the 'all stocked' empty state — the worst failure mode for a screen whose whole job is surfacing warnings. Render state.error via ErrorRetry when there are no items, ahead of the empty state. Add a VM error-path unit test.
StorageOverviewScreen and LocationDetailScreen each rendered their error line and the empty text on a failed load, so 'No storages yet' / 'no shelves yet' showed alongside the error — a false 'your account is empty'. Gate the empty text on state.error == null in both.
The wave-1 liveRegion=Assertive pattern wasn't propagated to the bare Text(error) on Dashboard, Households, Search, Invite, LocationDetail and Settings (join error + success) — all silent until focused. Add a shared LiveStatusText helper (Assertive live region) and route all seven sites through it, including announcing the Settings join success.
An out-of-stock-mandatory shelf tab was marked by red text + a decorative 6dp dot with no semantics — color-only (WCAG 1.4.1) and silent to TalkBack. Add location_shelf_missing_cd (EN+NL) and a clearAndSetSemantics contentDescription '<shelf>, has missing items' on the tab's text row.
deleteLocation had runCatching{}.onSuccess{refresh()} with no onFailure,
so a failed swipe-to-delete on AllStorages was silent. Add a one-shot
actionError flow (separate from the store-derived load error, since a
delete fails with the list populated and the empty-state ErrorRetry
would never show it), rendered through the existing SnackbarErrorEffect +
a new SnackbarHost. Add a VM delete-failure unit test.
No error-path tests existed for HierarchyStore/DrawerViewModel/ MissingItemsViewModel. Add HierarchyStoreTest (refresh success populates and clears indicators; refresh failure sets error + clears loading/ refreshing). The DrawerUiState.error mapping (W3), deleteLocation failure (W10), and MissingItemsViewModel error (W4) tests landed with those fixes. All pure-JVM, no emulator.
Add concurrency group (workflow+ref) with cancel-in-progress: true to ci/debug-apk/dependency-review/instrumented/secret-scan; release keeps cancel-in-progress: false so a release build is never killed mid-upload.
Gating needs a baseline generated against the real codebase; this environment has no working Android toolchain (JDK 26 vs project Gradle), so blind gating could redden the whole pipeline unverifiably. Expand the ROADMAP follow-up with the concrete baseline steps.
Security review flagged that cancel-in-progress: true on the secret-scan workflow could skip scanning an intermediate commit when a rapid follow-up push supersedes it. A secret scan is a security gate — keep the per-ref grouping but set cancel-in-progress: false so every commit is fully scanned.
InviteScreen built the 512x512 QR with a ~262k-pixel setPixel loop inside remember(link) on the composition thread, hitching the frame when the invite loaded. Move it to produceState + withContext(Dispatchers.Default) with a CircularProgressIndicator in the QR footprint until ready.
AppDrawer wired the single global Search entry to entries.firstOrNull(), so a multi-household user could only ever search their first household, silently. Keep the global entry only for a single household; with several, render a per-household search IconButton on each household row (content described 'Search <household>', EN+NL) so every household is reachable and the scope is explicit. No new endpoints.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second-wave gap fixes, stacked on
ralph/gap-fixes(wave-1 PR #6). Tested, JVM-unit-covered increments; seeinventory-docs/GAP-ANALYSIS-2.md+BACKLOG.md.Android items
DrawerUiState.error).LiveStatusText).produceState+Dispatchers.Default).Deferred (documented in ROADMAP): W19 ktlint/detekt gating + W21 Android jacoco — need a baseline generated on a compatible Android toolchain (JDK 26 vs project Gradle here), so blind gating could redden the pipeline unverifiably.
Gated by a clean compile +
testDebugUnitTestin CI.