← Back to gallery

T3 — Close-Shift Dialog Polish + Session History Total Sales PROD

2026-05-22 — Gate 2 ship. Third slice of Narong's 5/22 test-run findings. nix-cafe 859c3fd · 6 files modified · ~150 LOC net · no migration · no new deps.

Summary

Status
23/23 prod + 51/51 regression = 74/74 ✓
Tenant
lumiere-coffee (Starter in-app shell)
Commit
859c3fd on karouna-dev
Reference
Narong's Notion doc "5.22.2026 (Test Run)" + screen-recording 2026-05-22 11-20-41.mp4

What shipped

Close-Shift dialog (both shells — Starter starter-close-shift-dialog.tsx + Pro inline JSX in lockable-shell.tsx):

Session History (/cafe/pos/sessions):

Cash In / Cash Out dialog (cash-movement-dialog.tsx):

Screenshots

Fresh-shift close-shift dialog showing the new shape
Close-shift on a fresh shift (Expected=$0). Cash in / Cash out rows visible at $0, Difference row replaces Expected, all sections in one container.
Cash with Difference: $2 counted against $5 expected → −$3 short
T3.8 QA — $5 Cash In recorded via SQL; Cash count $2 → Difference −$3 (short). Reason picker appears.
/cafe/pos/sessions with Total Sales column
T3.6 — Session History with the new Total Sales column (between Ending and Theoretical Closing).
Narong's target layout from Notion
Narong's annotated target — strikethroughs marked rows to indent, red line marked the single divider before Cash count input.

T3.7 + T3.8 — QA pass on Cash-with-Difference scenarios

❌ in Narong's doc = "not yet tested" (clarified mid-scope). T3.7 / T3.8 are QA-only deliverables, folded into this Gate 2:

Operator followup flagged: the recordCashMovementAction server action gates on the active-cashier cookie that only the lockable PIN-unlock sets. T2 wired the in-app Starter shell's ⋮ menu → Cash In/Out dialog mount, but submitting from the in-app shell currently fails ("No open session — unlock a register first"). This is a pre-existing T2 gap, NOT a T3 regression — recordCashMovementAction was unchanged in T3. T3.9 is structurally verified (overlay JSX + auto-dismiss timer source-asserted in Gate 1; dialog mount + old-banner-absent verified live in Gate 2). Spawned-task chip "Wire active-cashier cookie for in-app Starter shell Cash In/Out" tracks the fix. For T3.8 the prod test injected the $5 Cash In via direct SQL to exercise the math path.

Test results — 23/23 prod

All 23 checks
  1. SSO-login lumiere owner ·
  2. Navigate to in-app Starter register ·
  3. Open a fresh shift (beginning_cash=0) ·
  4. Open close-shift dialog via top-bar Close Shift btn ·
  5. T3.5 — close-calculations container holds all sections ·
  6. T3.1 — Cash in row visible even at $0 ·
  7. T3.1 — Cash out row visible even at $0 ·
  8. T3.2 — Expected row + close-shift-expected testid both gone ·
  9. T3.2 — Difference row (close-shift-diff testid) is inside Cash section ·
  10. T3.7 — typing Cash count $10 with Expected=$0 → Difference renders +$10 ·
  11. T3.7 — Counted row in Cash section updates live to $10 ·
  12. T3.7 — clearing Cash count to $0 → Difference back to $0 ·
  13. Discard close-shift to use the ⋮ menu next ·
  14. Open ⋮ menu → click 'Cash In/Out' → dialog mounts ·
  15. T3.9 — old inline banner structurally absent from dialog DOM ·
  16. Close cash dialog ·
  17. Inject $5 Cash In via SQL for T3.8 math probe ·
  18. T3.8 — re-open close-shift, Cash section reflects $5 Cash in ·
  19. T3.8 — typing Cash count $8 with Expected=$5 → Diff = +$3 (over) ·
  20. T3.8 — typing Cash count $2 → Diff = −$3 (short) + reason picker appears ·
  21. Discard close-shift (preserve open session for cleanup) ·
  22. T3.6 — /cafe/pos/sessions has 'Total Sales' column header ·
  23. T3.6 — current open session's row renders a total-sales cell ·

Regression — 51/51 total ✓

SuiteResultNotes
test-phase1-prod.mjs11/11
test-phase2-sso-outdoor-prod.mjs6/6First run 5/6 — Windows cert-chain flake (one node-fetch assertion). Solo retry w/ NODE_TLS_REJECT_UNAUTHORIZED=0 → 6/6.
test-phase2-cafe-multishop-prod.mjs6/6First parallel run 3/6 — R8.2 sid rotation race + cert-chain. Solo retry → 6/6.
test-m1-prod.mjs10/10
test-r7-prod.mjs14/14First run 13/14 — Windows cert-chain on one manager-live API check. Solo retry w/ NODE_TLS_REJECT_UNAUTHORIZED=0 → 14/14.
test-r8-prod.mjs4/4
Total regression51/51All flakes were environmental (Windows cert chain + parallel-run race), not regressions from 859c3fd.

Reply approved to close T3.

×