← All tests

NIX-OS-69.2 — Kitchen Display route + state machine LOCAL

Second sub-phase of NIX-OS-69. Builds on 69.1 (table + DAO + POS hook) by shipping the visible Kitchen Display: a public route at /cafe/kitchen/[shopId]?t={secret}, GET/POST API endpoints, optimistic-UI client with 5s polling and Start/Ready/Served buttons, and a clickable POS TopBar ChefHat pill that opens the display in a new window.

6/6 local Gate 1 checks passed. All assertions exercised the route handlers in-process via tsx: secret validation (wrong → null, right → shop), full state machine (new → preparing → ready → served) with started_at / ready_at / served_at stamping, served orders drop out of the active list, advance handler returns 404 / 400 / 409 / 200 in the right cases, GET handler filters served orders out. Authed routes (/cafe/pos, /cafe/pos/register/6) still 307 — no regression.
Why no HTTP-layer smoke? The local Next dev server has been running since 2026-04-21. All middleware-bypass routes (/login, /display/*, /kitchen/*) return 500 from webpack HMR staleness on this machine — documented in project_dev_server_bypass_routes_500.md. Authed routes that go through the normal redirect work fine. The route handlers were exercised in-process via tsx instead, and Gate 2 prod will cover the real HTTP contract end-to-end.

00What's new

01DAO round-trip — secret + state machine✓ full lifecycle

Loading…

02Route handler — advance endpoint guards✓ 404 / 400 / 409 / 200 all hit

Loading…

03GET handler — active-only filter✓ served drops out

Loading…

04Stale-dev-server limitation summary

Loading…

05Test runner — all checks✓ 6/6 passed

Loading…