# Handy test plan run — 2026-10-14 Run ID: handy-2026-10-14 Driver: Maestro MCP (`tools.maestro.*`) Clients: superadmin web (`http://localhost:4175`, Chromium), admin-ui + user-ui in **Expo Go** (`host.exp.Exponent`, iOS 18.6 sim `5A64695E-F4D4-4E2E-90F3-EC3493A2B457`, Metro :8082/:8081), backend `http://localhost:8787`. Plan: `docs/handy-test-plan.txt`. Guidance: `docs/maestro-mcp-agent-guidelines.md`. Note: this session's model could not render screenshots, so every assertion was made from `inspect_screen` text/hierarchy + direct tRPC/HTTP probes rather than images. ## Fixture state on entry The three regions from `assets/map_assets/*.geojson` already existed and their bound GeoJSON matched the files exactly (Mbnr-1/Mbnr-2 name `Polygon 4`/`Mbnr-2`, Jadcherla 1/`JCL 2`, Wanaparthy 1/2). Two global stores (Meat Store #1, Vegetables #4) and region-1 stores (The Fruit Store #2, Fruits Juices #8, Dry Fruits store #9) also pre-existed. ## What was run ### A. Superadmin (web) - Regions/bounds/global stores/global products verified against `assets/map_assets` and the plan's expectations (already present). - Three regional admins created — `e2eadmin1|2|3` / `Test@12345`, role `admin`, regions 1/2/3. UI: the Role/Region controls are native `` (staff role/region) — options render at `[100000,*]`; only text-selected role worked. - Web `window.confirm` (elevation) — blocking JS dialog; Maestro `inspect_screen` breaks until the page is reloaded. - iOS inline date/time picker (admin slot times) — wheels expose only the current value. - `hideKeyboard` fails on numeric keypads; workaround is to focus an alphabetic field first, or tap the on-screen Return key. ## Fixtures created this run (left in place) Regions/bounds pre-existing. New: staff 11/12/13; store #10 (now global), stores #11 (region 2) and #12 (region 3); products/SKUs 151 (global), 152 (region 2), 153 (region 3); slots 2068/2069/2070; bound settings for bounds 1–6; addresses 888/889/890 for customer 388; orders 2544 (region 1) and 2545 (region 3). ## Cleanup done Simulated iOS location cleared (`xcrun simctl location clear`). ## Not run / not verified - Region 1 bound-2 fee/threshold change in the customer UI (only region 2's bound 2 was exercised). - Flash-delivery flows, coupons, cancellation, and the wider `docs/test-cases` catalog. - Admin-ui App-Constants thresholds screen and admin-ui slot creation end-to-end via touch. --- # Re-test — 2026-10-14 ~16:30 (after the reported fixes) Driver: Maestro MCP against the live stack (Expo Go user-ui :8081 / admin-ui :8082, backend :8787, superadmin-ui :4175). ## The three reported bugs | # | Bug | Result | Evidence | |---|---|---|---| | DEFECT-1 | `user.cart.getCartSlots` returned `{}` for global SKUs → global/elevated products got no slot and couldn't be ordered | **FIXED** | Search "Basa Fish Fillets" (global SKU 102) → "Select Delivery Slot" sheet listed 3 slots; added with slot *Wed, 14 Oct 6-7 PM*; cart billed Item ₹498, Delivery ₹20, "Free", To Pay ₹498. Live `getCartSlots` now takes a `regionId` and returns slots for 102. | | DEFECT-2 | Blank white screen after saving a new address picked on the map | **FIXED** | Added "Bug2 Retest" at `16.71461,77.98510` (region 1, **bound 2**) via the map ± zoom + tap → after submit the app landed on **My Addresses** (no blank screen). Address #891 persisted (`regionId 1, boundId 2`). | | DEFECT-3 | Elevated product had no `sku_market_stats` outside region 1 → `UNAVAILABLE` in regions 2/3 | **FIXED** | `superadmin.products.list` for *E2E Product R1* (#151) now shows marketStats for regions **1, 2 and 3** (all ₹199, not suspended). In-app region-2 search now shows a price; the residual "Out of Stock/UNAVAILABLE" badge there is slot-driven (no active region-2 slot contains SKU 151), not a market-row problem. | ## Previously-pending items | Item | Result | Evidence | |---|---|---| | Region 1 **bound-2** free-delivery threshold + charge in the customer UI | **PASS** | Same cart (Chicken Breast ₹233): default address (bound 1) → Fee **₹20**, "add ₹67 for free delivery" (→₹300). Switched to "Bug2 Retest" (bound 2) → Fee **₹40**, "add ₹267 for free delivery" (→₹500). Bound-1 vs bound-2 separation confirmed. | | Admin-ui **slot creation end-to-end via touch** (was HARNESS-BLOCKED on the iOS picker) | **PASS** | Dashboard → Slots → `add-slot-fab` → date pickers → selected delivery **20 Oct 2026**, freeze **15 Oct 2026**, 2 products (Chicken Breast 500 g, Chicken Breast Boneless – Mini Pack) → "Slot created successfully!". Verified: slot **#2071**, delivery `2026-10-20T13:10Z`, freeze `2026-10-15T11:15Z`, 2 products, active. | | Admin-ui **App-Constants thresholds screen** | **PASS** | `exp://127.0.0.1:8082/--/dashboard/customize-app` renders "Customize App / Region: Mahabubnagar / Bound" with per-bound tabs **Mbnr-1 (Priority 1, EFFECTIVE)** and **Mbnr-2 (Priority 2)** and the four fields (Free Delivery Threshold, Delivery Charge, Flash Free Delivery Threshold, Flash Delivery Charge) + Save Changes. | ## New findings **FINDING-A (surface/runtime mismatch, blocking source-level verification).** The live backend behaves differently from the files in this working copy: - live `user.cart.getCartSlots` **requires** `regionId` (missing → zod BAD_REQUEST); `apps/backend/src/trpc/apis/user-apis/apis/cart.ts` only accepts `productIds`. - `packages/db_helper_sqlite/src/user-apis/product.ts#getSkuRegionIds` still drops `row.product.regionId == null`, i.e. it has no global-SKU handling. So the fixes are present in the **running** backend/Metro bundles but not in the checked-out sources here. All results above are behavioural against the live stack. **Restarting the backend (and Metro) would run the on-disk code and likely reintroduce DEFECT-1/DEFECT-3** — reconcile the working tree before restarting. **FINDING-B (picker UX, admin-ui).** In `packages/ui/src/components/date-time-picker.tsx` the iOS Modal's **Done** button only calls `setShow(false)`; the value is committed solely by the picker's `onChange`. Opening a field and pressing Done leaves it unset → the slot form rejects with "Please fill all fields". Done should also commit (`setValue(pendingValue ?? value ?? new Date())`). ## Test artifacts left behind - Address **#891** "Bug2 Retest" (customer 388, region 1 / bound 2). - Slot **#2071** (region 1, delivery 20 Oct, 2 SKUs) — created by the admin-ui test. - Cart: one Chicken Breast 500 g line (region 1, customer app) from the threshold test. - Simulated location reset to bound 1 during the run.