2026-05-23 — Gate 1. NIX-OS-81 ("Open Orders" — Notion status: Needs Rework). 9 items distilled from the task's 4 original sub-tasks + 7 Review items (added 2026-05-20). One bundled slice; default proposals confirmed for the 4 open Qs in scoping.
New files:
lib/order-number.ts — T4.7 shortenOrderNumber(orderNumber) helper. Strips the shop-code prefix (e.g. BKK1-0003 → 0003) for POS-UI display only; downstream consumers (receipts, exports, Kitchen Display, audit log) keep the full form.app/(authed)/pos/_components/discard-tab-modal.tsx — T4.A custom confirm modal replacing the native confirm() dialog. Auto-dismisses on Escape, shows item count + total as a context cue, disabled while the delete is in flight.Modified — pos-tab-strip.tsx:
ml-auto) to the leftmost position."empty" to "(0)".bg-[#FAFAFA] + border + rounded-t-md. Active tab brightens to bg-white + green underline.shortenOrderNumber(t.orderNumber).Modified — pos-workspace.tsx:
handleRegister callback; passes onRegister to PosTabStrip.handleResumeOngoing(draftId); threads drafts={stripTabs} + onResumeOngoing to OrdersHistoryView.confirm("Discard ...") with a DiscardTabModal mount controlled by discardCandidate state. Empty drafts close silently via performClose; ongoing drafts route through the modal.Modified — orders-history-view.tsx:
drafts + onResumeOngoing props. Ongoing drafts (lines > 0) interleave with paid orders in a unified UnifiedRow list. Empty drafts stay in the tab strip only. Status filter pills at the top: Active (default = Ongoing + every non-cancelled order) · Ongoing · Paid · All. Clicking an Ongoing row immediately calls onResumeOngoing; paid rows still load the refund detail in the right pane.<Chip> renders.From NIX-OS-81. Red sweeping curve indicates the panel layout shift (Orders panel on the left, with the Register tab as a sibling toggle). The "All orders" button at the top-right is circled to flag the position change.
confirm() is gone.BKK1-0003 form.[All orders] [Register] [Order 1] [BKK1-0003] [+ New]. No two-tier nest.shortenOrderNumber helper exported · ✓shortenOrderNumber tsx probe — 6 cases (BKK1-0003, MULTI-SHOP-0042, 0007, "", null, BKK1-X-0099) · ✓ml-auto on All orders removed · ✓onRegister prop · ✓handleRegister → setMode('tabs') · ✓(0), not 'empty' · ✓bg-[#FAFAFA] + border (chip look) · ✓drafts + onResumeOngoing · ✓drafts={stripTabs} + onResumeOngoing · ✓chipConfig helper (5 labels) · ✓shortenOrderNumber for labels · ✓shortenOrderNumber in rows + detail header · ✓confirm() for tab discard · ✓nix-cafe karouna-dev, wait for CF Pages deploy.test-t4-open-orders-restructure-prod.mjs on lumiere-coffee in-app shell: assert tab order, click Register/All-orders toggle, ring a partial cart (1 item), verify the draft appears in All Orders with "Ongoing" chip, click it to resume, X-close an ongoing tab → discard modal appears + Cancel keeps the cart + Discard removes the tab.Reply push to proceed to Gate 2, or flag corrections.