diff --git a/docs/superpowers/specs/2026-11-05-giellie-stock-quantity-update-design.md b/docs/superpowers/specs/2026-11-05-giellie-stock-quantity-update-design.md index fec41a3..0e0b6a9 100644 --- a/docs/superpowers/specs/2026-11-05-giellie-stock-quantity-update-design.md +++ b/docs/superpowers/specs/2026-11-05-giellie-stock-quantity-update-design.md @@ -210,12 +210,12 @@ It is a shortcut only. It does **not** carry the set/add intent — the operator Changes: - **`listActiveStockCatalog`** additionally returns `min_qty`, so the tile can decide its own cue. -- **`pos-app.js:283`** — the tile's `.sub` line becomes `sku · brand · unit · N in stock · M in cart`, where `N` is `current_qty` and `M` is the existing cart count. +- **`pos-app.js:290`** — the quantity is drawn **under the price, on the right**: the price block reads `price / unit` with `N in stock` beneath it, where `N` is `current_qty`. The `.sub` line keeps `sku · brand · unit · M in cart` (the existing cart count) and does not carry the quantity — the operator chose this layout during the build, because the `.sub` line is `nowrap` + ellipsis and a long SKU pushed the number off the edge. - **The out-of-stock cue** is `current_qty <= 0`, not `current_qty <= min_qty`. Only 48 of the 4,083 sellable items have `min_qty > 0`, so a min-based rule would badge 4,035 tiles — every one of them — and mean nothing. The cue that carries information is "you have none of this". - **The number is shown as it is.** A tile can read `-2,581 in stock`. The tile is styled as out-of-stock so it reads as a state rather than a glitch, but the number is not clamped and not hidden. The numeric value is the signal; colour only reinforces it. - **Nothing is blocked.** The cue is informational. The cashier can still sell the item, and the quantity still goes into minus. -Because `public/pos/` is served cache-first by the service worker, the cache constant is bumped **`pos-v37` → `pos-v38`** so till devices pick up the new script. The floor asserted in `src/lib/pos-cart-quantity.test.ts:225` stays satisfied. +Because `public/pos/` is served cache-first by the service worker, the cache constant is bumped **`pos-v37` → `pos-v39`** so till devices pick up the new script. The floor asserted in `src/lib/pos-cart-quantity.test.ts:225` stays satisfied. ## The conversation, end to end