← All tests

Cafe follow-ups bundle PROD

2026-04-29 on get-coffee. Two operator-feedback follow-ups bundled into one Gate cycle. (A) Skip-preview path on success banner — post-sale Print on the success banner now fires the print iframe directly, no preview modal. Operators just rang up the order and don't need a second confirmation. /orders per-row Print still goes through the modal (older-order reprint sanity). (B) Daily report splitaggregateNativeDailyReport returns totalLineDiscount + totalOrderDiscount separately so operators can see per-line comp/promo vs whole-ticket override. Combined totalDiscount kept for callers that want one number.

5/5 new bundle prod checks passed.

All prod checks (5)

Banner Print → direct iframe print (no modal)Success banner shows the just-paid order. Click Print → iframe spawned with the receipt's testid; no preview modal appears.
Daily report Avg Ticket card with split discount lines"− $1 line disc" + "− $0.30 order disc" — two distinct testids, each gated on its own > 0 check.
81/81 total prod tests green — no regressions from this push.
test-cafe-followups-prod.mjs (NEW)5/5
test-receipt-preview-prod.mjs (rewritten — /orders modal only)6/6
test-r2-followups3-prod.mjs7/7
test-r2-followups2-prod.mjs (assertion updated for split)11/11
test-r2-followups-prod.mjs (assertion updated for split)19/19
test-nix-os-r2-4b-prod.mjs12/12
test-nix-os-70-2-prod.mjs10/10
test-phase1-prod.mjs11/11

What's new — code surface (prod commit 2538135)

nix-cafe @ 2538135:
  app/(authed)/pos/starter-register-client.tsx              — banner skips modal: KhmerReceipt
                                                              + openPrintWindow imports, hidden
                                                              receipt mount, handlePrint fires
                                                              iframe print directly
  lib/db/orders.ts                                          — DailyReportPayload split:
                                                              totalLineDiscount + totalOrderDiscount
                                                              + (combined) totalDiscount kept for
                                                              backward compat
  app/(authed)/reports/daily/starter-daily-client.tsx       — Avg Ticket card shows two amber
                                                              lines, each > 0 gated

tests:
  test-cafe-followups-prod.mjs                              — NEW (this bundle, 5 checks)
  test-receipt-preview-prod.mjs                             — banner steps removed, /orders
                                                              modal flow stays
  test-r2-followups2-prod.mjs                               — F2 daily-report assertion updated
                                                              to use split testids
  test-r2-followups-prod.mjs                                — round 1 daily-report assertion
                                                              updated to use metric-discount-order