Skip to content

Wave-2 polish: error-surfacing, a11y, off-thread QR, per-household search - #7

Merged
spdotdev merged 12 commits into
mainfrom
ralph/polish-wave2
Jul 4, 2026
Merged

spdotdev merged 12 commits into
mainfrom
ralph/polish-wave2

Conversation

@spdotdev

@spdotdev spdotdev commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Second-wave gap fixes, stacked on ralph/gap-fixes (wave-1 PR #6). Tested, JVM-unit-covered increments; see inventory-docs/GAP-ANALYSIS-2.md + BACKLOG.md.

Android items

  • W3 AllStorages shows load errors instead of a false empty state (DrawerUiState.error).
  • W4 missing-items screen surfaces load errors (was a false "all stocked").
  • W7 empty vs error no longer conflated on StorageOverview + LocationDetail.
  • W8 inline error/status text announced to TalkBack on six screens (shared LiveStatusText).
  • W9 shelf tabs carry a content description for missing-stock (not color-only, WCAG 1.4.1).
  • W10 drawer location-delete failure surfaced via snackbar (was swallowed).
  • W16 error-path unit tests for HierarchyStore/DrawerViewModel/MissingItemsViewModel.
  • W18 concurrency cancellation on CI (release never cancelled; secret-scan never cancelled).
  • W22 invite QR generated off the composition thread (produceState + Dispatchers.Default).
  • W23 drawer search reaches every household, not just the first.

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 + testDebugUnitTest in CI.

spdotdev added 12 commits July 4, 2026 14:25
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.
@spdotdev
spdotdev changed the base branch from ralph/gap-fixes to main July 4, 2026 14:45
@spdotdev
spdotdev merged commit 1aa29d9 into main Jul 4, 2026
3 checks passed
@spdotdev
spdotdev deleted the ralph/polish-wave2 branch July 4, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant