← All tests

R1.4 — Multi-cart draft orders LOCAL

2026-04-22. Fourth cycle of R1 (NIX-OS-67 Phase 3 POS): the cashier can now park a cart and start a new one for another customer in parallel. Parked carts persist to cafe.draft_orders (JSONB payload per cart), so a tab crash, browser restart, or device handover doesn't lose work. Rows auto-cleanup on session close via FK CASCADE.

3/3 local Gate 1 checks passed. Migration landed with correct shape + FKs + indexes. DAO round-trip covers upsert (new), list, upsert (update), session-scope isolation (draft in session A can't leak into session B's list), delete rejection on wrong session id, and delete success. SSR smoke on /cafe/pos/register/N still returns 307 — no regression from the Register refactor (added initialDrafts + allowDrafts props, unchanged default behavior).
Gate 2 (prod) will prove the end-to-end flow. Planned: open a shift, ring a cart, click Park, start a new cart, ring it, click Park again, verify two drafts appear in the strip. Click Resume on one — cart loaded, draft removed from list. DB assert: 1 row in cafe.draft_orders after resume.

00What's new

01Schema — cafe.draft_orders✓ shape OK

Loading…

02DAO — upsert / list / session isolation / delete✓ 10 assertions

Loading…