← All tests

R1.2 — cafe.sessions schema + grouped-by-shop POS landing LOCAL

2026-04-21. Second cycle of R1 (NIX-OS-67 Phase 3 POS): migration adds cafe.sessions (mirror of Odoo pos.session with PIN + cash-count fields), cafe.payment_diff_reasons (R1.6 CRUD), and cafe.pos_sequences (R1.5 daily counter). POS landing page /cafe/pos now groups registers by shop with per-register session summary (state, cash opening, sold today).

8/8 local Gate 1 checks passed. Verified: three migrations landed, cafe.sessions has expected columns / FKs / indexes (incl. partial-unique on (tenant_id, odoo_session_id) WHERE NOT NULL), payment-diff-reasons and pos-sequences shapes match, unit test on the fetchSessionSummariesForConfigs empty-input short-circuit, and both /cafe/pos branches (landing vs ?config=N) SSR cleanly (307 on auth).
Gate 2 (prod) will prove the grouped landing UI. Local can't run the authed flow without Commerce SSO — the shop cards, summary chips, and "click register → open in same shell" behavior get captured at Gate 2 on get-coffee.nixtech.app/cafe/pos (which has 1 shop & 1 register, unmapped — so we'll also see the "Other registers" fallback bucket render).

01Schema — cafe.sessions mirror✓ matches spec §16

Loading…

02Schema — cafe.payment_diff_reasons✓ ready for R1.6

Loading…

03Schema — cafe.pos_sequences (daily counter)✓ ready for R1.5

Loading…

04What Gate 2 will exercise on prod

  1. Prod migration applied via node migrate.js (same tenant DB).
  2. Login as owner on get-coffee.nixtech.app.
  3. Navigate to /cafe/pos → shop-grouped landing renders with summary cards (not the old flat register shell).
  4. Each register card shows: state chip, session name, cash-opening, sold today, opened-at.
  5. Clicking a register card lands on /cafe/pos?config=N — existing in-shell register flow preserved (R1.3 will swap this to window.open).
  6. Phase 1 regression: 11/11 green.