← All tasks

Test-Run #1 — 4 quick wins from Narong's 5/22 test-run LOCAL · GATE 1

Narong did a full screen-recorded test run of NIX POS on 2026-05-22 (48 min, Lumière tenant). He shared a Notion doc with timestamped findings + 4 annotated screenshots. T1 batches the four independent quick-win bugs he flagged — all visually confirmed against video frames I extracted.

13/13 local · 6 files touched · ~95 LOC · no migration · no deps. Source-level assertions cover all 4 fixes + 1 new component. Live route probes confirm middleware behavior is unchanged. Full end-to-end Gate 2 runs against lumiere-coffee prod.

The 4 fixes

T1.1 — Doubled basePath (Narong's note: "View Orders still not redirecting properly · 6:20"). Video frame at 6:05 shows the URL bar lumiere-coffee.nixtech.app/cafe/cafe/orders → 404. Three callsites hardcoded /cafe/... in router.push(), and Next.js prepended its basePath: "/cafe" on top → doubled. Fixed by stripping the leading /cafe at each callsite. The <a href> plain anchors with /cafe/... are CORRECT (browser uses literal href, doesn't auto-prepend basePath) — false positives in my initial grep.

T1.2 — Customer Display QR URL (Narong's note: "Customer Display QR is missing some url path · 47:00"). Video frame at 47:00 shows the URL bar cafe/display/<uuid>?secret=<token> with DNS_PROBE_FINISHED_NXDOMAIN. The dialog's documented contract is "Absolute URL — built by the parent", but all 3 callsites were passing path-only URLs. Phone browser treated cafe as a hostname → DNS NXDOMAIN. Fixed by prepending window.location.origin at each callsite (with an SSR guard on the in-app top-bar where the URL is computed every render).

T1.3 — Cash In/Out success banner (Narong's note: "After Cash In/Out, must show a success dialog · 29:30"). Video frame at 30:50 shows the standalone Cash In/Out dialog working — but after recording, the form just cleared with no visible confirmation. Added a lastSuccess state in the dialog that surfaces a brief inline banner ("✓ Cash In of $X recorded — <reason>.") with auto-clear after 3s. New data-testid="cash-success" for prod test hooks. Uses the existing error-banner spot in the form to minimize structural change.

T1.4 — Daily Sale download silent (Narong's note: "Daily Sale download doesn't work · 31:20"). Video frames at 31:10 + 31:25 show the close-shift dialog open before AND after the click — no visible UI change. Probed the server endpoint live (lumiere session w/ 1 paid order): returns 200 text/csv 151 bytes, working correctly. The download was firing but Chrome 123+ (Apr 2024) removed the download bar — bare <a download> downloads silently to disk with zero feedback. Replaced with a button that uses fetch + Blob + URL.createObjectURL to drive the download programmatically, with explicit states (idle → Preparing… → ✓ Downloaded / Download failed). Extracted as shared DailySaleDownloadButton used by both shells.

Files touched

app/(authed)/pos/_components/success-modal.tsxT1.1 — strip /cafe/ from View Orders router.push
app/(authed)/pos/_components/open-shift-form.tsxT1.1 — same for switchRegister
app/(authed)/pos/_components/starter-top-bar.tsxT1.1 + T1.2 — switchRegister fix + displayUrl origin prefix
app/(pos-fullscreen)/pos/register/[configId]/lockable-shell.tsxT1.2 + T1.4 — Pro displayUrl origin prefix + Daily Sale button swap
app/(authed)/pos/_components/starter-lockable-shell.tsxT1.2 — Starter displayUrl origin prefix
app/(authed)/pos/_components/cash-movement-dialog.tsxT1.3 — lastSuccess state + banner
app/(authed)/pos/_components/daily-sale-download-button.tsxT1.4 — NEW shared component
app/(authed)/pos/_components/starter-close-shift-dialog.tsxT1.4 — Starter Daily Sale button swap

Local checks — 13/13

Not exercised in Gate 1. Each fix is a UX-shape change that needs the actual flow to verify (record-after-mount-after-click). Gate 2 prod runs the full flow on lumiere-coffee: real SSO login → place an order via POS → click View in orders (assert /cafe/orders loads, not 404) → open Display dialog (assert QR URL contains the tenant host) → open Cash In/Out, record a movement (assert cash-success banner appears, then auto-clears) → open Close-shift, click Daily Sale (assert button transitions idle → preparing → done, and a Blob download triggers).

Before / after diagram

4 fixes side-by-sidePer-fix before/after with the video timestamps Narong cited

Gate 2 plan

Commit nix-cafe → push karouna-dev → CF Pages auto-deploys (~90s). Prod test on lumiere-coffee covers all 4 fixes end-to-end. Plus 51/51 regression sweep.

What's NOT in T1 (held for later slices):