2026-04-24. First sub-phase of NIX-OS-69 (Kitchen Display + Order Status). Lays the
foundation: a NIX-owned cafe.kitchen_orders table, a DAO with a state machine
(new → preparing → ready → served), a per-shop display secret,
and a POS TopBar indicator for the active kitchen queue depth. The visual
Kitchen Display route ships in 69.2 — 69.1 proves the plumbing works.
kitchen_display_secret
column on commerce.shops). CHECK rejects bad statuses. Session cascade wipes
kitchen rows. Full DAO round-trip exercises createKitchenOrder →
countActiveByShop → listActiveByShop →
advanceStatus through all three terminal transitions (timestamps stamped on
each), and ensureShopKitchenDisplaySecret generates then reuses a 64-char
hex token. Fullscreen POS shell + Daily Report routes still 307 — no regression.
cafe.kitchen_orders — expect a row
with status='new', a denormalized payload including the cashier-entered
product names, the NIX POSID, and the open NIX session FK. POS TopBar badge should tick
from 0 to 1 after refresh.
20260424100000_cafe_kitchen_orders (knex .ts
+ idempotent migrate.js entry). Creates cafe.kitchen_orders
(id/tenant/shop/session/odoo_order_id/order_name/status/payload/note + 4 lifecycle
timestamps), 3 indexes, a status CHECK, and adds
commerce.shops.kitchen_display_secret.cafeKitchenOrders table + new
kitchenDisplaySecret column on commerceShops.lib/db/kitchen.ts —
createKitchenOrder, listActiveByShop,
countActiveByShop, getKitchenOrderById,
advanceStatus (transition with timestamp stamping),
ensureShopKitchenDisplaySecret (lazy-create, stable afterwards),
getShopByKitchenSecret. All reads wrap db.transaction() to
bypass Hyperdrive's SELECT cache./api/odoo/order POST now accepts a
parallel kitchen snapshot (product names, cashier, customer) and inserts
a cafe.kitchen_orders row after Odoo returns. Fire-and-forget: a kitchen
insert failure cannot unwind a paid order.register.tsx — sends the kitchen snapshot
alongside the existing Odoo line data.register-shell.tsx — new amber
ChefHat pill showing the active queue count
(countActiveByShop). Non-clickable in 69.1; the "Open Kitchen Display"
button wires to the new route in 69.2.cafe.kitchen_orders schema✓ columns + FKs + CHECK + 3 indexesLoading…
commerce.shops.kitchen_display_secret✓ addedLoading…
Loading…
Loading…