- backend: menu tablet device config `table` (ref, validated against active
tables) and `call_waiter`; GET /api/menu-tablet/menu gives the table and
whether it can call; POST /api/menu-tablet/call sends a `table_call` staff
message ("Table 5: the guests call a waiter.", venue language) to the table's
waiters (its open order's, else the zone's), at most once a minute per tablet
(menu_tablet.call_too_soon with the seconds left; menu_tablet.no_table).
- terminal: "Call a waiter" only on a tablet at a table; "A waiter is on the
way to table 5", then a countdown before it can call again; a failed call
says to ask at the counter.
- waiter: the call shows with its own look and "Open the table".
- manager: tables as the choices of a device setting.
- tests: backend +2 (535 → 533 passed total), e2e menu_tablet.mjs +3.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
terminal/src/apps/menu-tablet: the venue's menu for staff (a quick price
check) and guests. Category chips that jump to their section, or one A–Z
list; compact rows, expanded rows (photo, description) or full cards; tap a
product to see it big (photo, price, description, tags); search that ignores
accents and also finds names typed in Latin letters ("souvl"); sold out
marked; the guest's language for the tablet's texts; back to the start (search
cleared, first language, top) after the set time without a touch; light or
dark; the last menu kept for offline; live on menu_tablet.changed /
device.updated. @xenia/i18n exports ./latin for plain-JS use.
tests: logic (3), e2e menu_tablet.mjs (10 checks, in run-all).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GET /api/menu-tablet/menu for a paired menu tablet: categories in the
catalogue's order (sub-categories after their parent, one category and its
sub-categories when the tablet is set so), each with its products in its own
order (a product in several categories shows in each), the products once with
name, description, tags, photo, the price of the tablet's sales point (or none)
and availability; sold-out hidden when set; the venue's name and the tablet's
settings. Device config: view, photos, descriptions, group, theme, prices of,
sold out, category, search, languages, idle reset (texts in both languages).
Menu changes send menu_tablet.changed to every tablet (main.py, with signage).
tests: test_menu_tablet.py (4); 531 passed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signage gets tabs:
- Screens: every paired signage TV with what it plays (a playlist, or a
schedule that wins over it), its shape and rotation, a warning when a
playlist was made for the other shape; a link to pair one in Devices.
- Schedules: lines (a playlist on days / between hours that may pass midnight /
between dates, with a priority) and the playlist for the rest of the time;
"now: …" per schedule; the screens on it.
- Message and weather: the message of the day for every screen; the
weather's town from a search (°C / °F), now / fetched at, "no forecast"
when the server can't reach the service, fetch now, remove; says the
weather needs internet and the widget hides without it.
- e2e signage.mjs +6 (message saved, weather section, choosing a playlist and
turning the picture move the TV, a schedule built in the manager plays what
it picks now); a crash is reported as a failed check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Menu board: everything or chosen whole categories (sub-categories
included, new products join) plus single products found by search; hide a
product from the board (and show it again); the board's own order with
arrows on what the server resolved (categories and products; boardOrder
writes it); a badge per product; grouping, headings, photos, descriptions,
whose prices (a sales point or none), sold out crossed out or hidden,
columns, products per page (or as many as fit), seconds per page; colours,
font, size, background.
- Widgets (text and menu slides): logo, venue name, date (long / short),
clock (seconds), message of the day (or its own text), QR code (ordering /
QR menu / a link + caption), weather (1-3 days, says it needs internet);
where (corners, bars) and size.
- The preview stays in view while the settings scroll.
- @xenia/signage: the venue clock's Intl call names its time zone where the
i18n guard reads it.
- tests: manager signage.test.mjs +1; e2e signage.mjs builds a menu board in
the editor (categories, a single product, the order, a badge, hiding, a
clock) and checks what was saved and resolved.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Management → Signage: playlists (name, landscape / portrait, default
transition, duplicate, delete with the screens it plays on); the timeline
(drag or arrows to reorder, duplicate, remove, on / off, time and when it
shows at a glance, a round's total time); a slide's settings (name, seconds or
a video to its end, transition, days / hours / dates, the picture or video,
fit, text, alignment, font, colour, size, background colour or photo with
darkening; a menu board's title, columns and colours) with a live preview drawn
by @xenia/signage at 1920 × 1080 and scaled down; new slides empty or from
templates (promotion, announcement, happy hour 17-19, welcome, menu board,
video); a warning on the slide and its card when a picture or video doesn't
fit the playlist's shape. Unit tests (4), e2e signage.mjs builds a playlist in
the manager and the TV plays it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GET /api/signage/playlists/{id} gives each menu slide its resolved `menu`;
POST /api/signage/preview/menu resolves a menu board not saved yet; GET
/api/signage/venue gives what the widgets show. 527 passed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The signage slides (SlideView, TextSlide, MenuSlide, Widgets) and the pure
logic (schedule pick, slide windows, menu pages) move from the terminal into
packages/signage, so the manager's previews draw a slide exactly as the TV
does. Sizes are container units (cqmin) instead of viewport units: a slide
draws inside any box with container-type: size (frameStyle sets it on the
TV). Tests move with it (10). Dockerfiles copy its package.json; both apps'
Tailwind content include it; run-all runs its tests. Signage e2e and the
compose stack passed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Menu board: the board's own order, grouped with headings or one list,
photos, descriptions, badges (translated), sold out crossed out with a
label, prices in the venue's money format, dotted leaders, a page dot row.
Pages: rows that fit from the frame's shape (portrait fits more), text size,
photos / descriptions, the title and widget bars (`page_size` overrides);
they go round every `page_seconds` while the slide lasts.
- Widgets on text and menu slides: logo, name, date, clock, message of the
day, QR code, weather (hidden without a forecast) in corners and bars, three
sizes.
- logic.js: menuPages, rowsPerColumn, frameHeightVmin, boardPages, menuMs,
pageAt, weatherIcon (+4 tests).
- e2e signage.mjs: a long board pages by itself, widgets in place, weather
hidden with no place, the chosen product first with its badge, a price change
and sold out show within seconds, a portrait TV needs fewer pages.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- terminal/src/apps/signage: plays the screen's playlist (or the one its
schedule picks now, switching by itself) full screen: slides in order with
their time, a video to its end (a 15 min safety limit), only in their days /
hours / dates; transitions fade / slide / zoom / none (CSS, reduced motion
respected); the frame turned 90/180/270 for a TV mounted sideways. Picture,
video and text slides drawn; a first menu board (5.5b lays it out fully).
- Offline: the last GET /api/signage/screen kept in localStorage, every
picture and video (up to 120 MB) as an in-memory copy; reads again on
signage.changed / device.updated / reconnect / every 5 min.
- logic.js: the server's schedule pick ported (same test cases), slide windows,
next slide, frame; tests/signage.test.mjs (6).
- Signage screens get no offline banner over the slides, a small mark instead
(registry QUIET_OFFLINE).
- e2e signage.mjs (in run-all): a paired TV plays picture → text → video →
menu in order, the text's slide transition, rotation, keeps playing with the
server stopped (mark, no banner), catches up when it is back. terminal.mjs
passed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- signage_schedules (Alembic 0030): entries {playlist, days, hours (may pass
midnight), dates, priority} and a fallback playlist. A screen's `schedule`
(ref) wins over its single playlist.
- services/signage_schedule.pick (pure): highest priority, then the most
specific (dates > days > hours), then the later entry; no match → fallback.
- GET /api/signage/screen with a schedule: the schedule (with the venue's time
zone) and every playlist in it, `playlist` = the one playing now, so the
player can switch while the server is down.
- schedule_worker (signage module, 30 s) tells a screen when its pick changes.
- /api/signage/schedules CRUD (playing now, the screens on it); deleting a
playlist takes it out of schedules; changes reach screens through schedules.
- Devices page: a signage screen's Schedule.
- tests: test_signage_schedule.py (6); 526 passed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Widget on text and menu slides: logo (a picture), name, date (short/long),
clock (seconds), message (the venue's or its own text), QR code (ordering /
QR menu / a link; the screen gets the link), weather (1-3 days); position
(corners, top / bottom bar) and size. Logos count as media usage.
- The screen gets `venue`: name, message of the day, weather.
- PUT /api/signage/message (one place, every screen told at once).
- services/weather.py: the venue's place (town search through
/api/signage/weather/places, PUT/DELETE /weather/place, °C/°F), Open-Meteo
every 30 min (signage worker), kept in memory; no place, no internet or older
than 3 h → weather null and the widget hides. signage.weather_offline when
the town search can't reach the service. Checked against the real service.
- tests: test_signage_widgets.py (5, a fake Open-Meteo); 520 passed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- MenuContent: select all / whole categories (with sub-categories, live: new
products join) / single products, exclusions; grouped by category or not,
headings; the board's own category and product order; a sales point's
prices or none; photos, descriptions, badges (new, chef, offer, popular,
spicy, vegetarian, vegan); sold-out crossed out or hidden; columns, items
per page, seconds per page, font, colours, size, background.
- services/signage_menu.resolve: the products in that order with
customer-facing names, prices from pos_cart.unit_prices (what the counter
charges right now), availability, card-size photos. GET /api/signage/screen
includes each menu slide's `menu`.
- Every request that changes the menu (the online menu's paths) also sends
signage.changed to the screens with a menu board (main.py, off the loop).
- tests: test_signage_menu.py (6); 515 passed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Media page and picker filter Everything / Your own / Built-in; built-in items
are marked and can't be renamed or deleted. The Devices page offers the
playlists for a signage screen (with its orientation and rotation).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- signage_playlists (name, orientation, default transition) and
signage_slides (kind menu | image | video | text, position, duration,
transition, video to its end, on/off, days / hours / dates, content typed
per kind: extra fields refused, pictures / videos as media ids). Alembic 0029.
- /api/signage: playlists CRUD, duplicate, timeline order; slides add (at a
position), change, delete, duplicate; screens (playlist, orientation,
rotation, orientation mismatch). The screen's GET /api/signage/screen gives
its playlist resolved for playing with a version hash. Changes send
signage.changed only to the screens playing that playlist.
- Signage device config: playlist (ref signage_playlists), orientation,
rotation. Slides register their media usage.
- Built-in pictures: assets/builtin_media/ imported at start
(media.builtin), a collection of their own (?collection=builtin|own),
never deleted or renamed (media.builtin).
- tests: test_signage.py (8); 509 passed. Pack README: the signage row.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- terminal.mjs: the looks API drives the idle screen; a second look on the
other display: two displays show two different slideshows from the library.
- manager.mjs: the default look's QR design through Settings.
- media.mjs: a new look with three pictures picked at once, a picture in a look
can't be deleted.
- pack README: the customer display row; CS-19 (screen designs are records a
device picks with a ref field).
- run-all --no-android: all passed except terminal's "server unreachable →
banner" (8 s wait, under load); terminal.mjs alone right after: all passed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Settings → Customer display lists the looks (default starred, how many
displays each), edits one (logo / picture with MediaField, the slideshow's
pictures picked several at a time, reordered, removed), new look (empty or a
copy), make default, delete, and "Which display shows which look". The Devices
page offers the looks for a display's Idle screen. MediaPicker: `multiple`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- display_looks (Alembic 0028): named idle screens, one default; config is
the 3.4 design with pictures as media library ids. 0028 turns the setting
customer_display.idle into the look "Main" and moves its data/display_media
pictures into the library (the old folder stays on disk).
- A display shows the look in its device config `look` (ref ConfigField,
choices_from "display_looks", validated in device_config) or the default.
- /api/display/looks (GET also for core.devices.manage), POST, PUT,
POST /{id}/default, DELETE (not the default; its displays go back to it);
/api/display/displays and PUT /displays/{id}/look. A change sends
display.settings only to the displays showing that look.
- /api/display/settings, /api/display/media* and their error codes are gone;
GET /api/display/state keeps its shape (logo card size, image/slides full).
- Looks register their media usage (a picture in a look can't be deleted).
- tests: test_customer_display.py (7, incl. two displays two slideshows and
the 0028 data move); 501 passed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- media.mjs: batch upload through the Media page (the owner's ITEM PHOTOS
folders when present: 49 files incl. AVIF, all in), details and rename, a
product's photo from the library and one uploaded on the spot named after
the product, a used photo can't be deleted, the waiter fetches the photos
ahead and shows them offline. In run-all.
- startBackend gives each test backend its own XENIA_MEDIA_DIR.
- pack README: the media row (usage registration, `image`, MediaField, offline).
- run-all --no-android: every suite passed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Right after the menu is read the phone downloads its photos (4 at a time,
services/photoCache.js). The library's year-long immutable headers keep them
in the browser cache; the installed PWA also caches /api/media/file/ cache-
first (workbox `xenia-media`). With no connection the menu still shows them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Management → Media (src/pages/media/): every picture and video, search,
pictures / videos, batch upload (many files or drop on the page) with a
result per file, details (preview, display name, kind, resolution, length,
file size, uploaded file, when / who, the sizes made, what uses it, delete
off while used).
- MediaField: upload on the spot (into the library and set at once), pick
from the library (MediaPicker, which can also upload), remove; after an
upload on the spot "Name it after the product / category" renames it in
Latin letters. Used by the product editor and the category dialog.
- nav: `anyPerm` (any of the keys that manage pictures); the route guard uses
the same rule. Product rows have test ids.
- @xenia/i18n: latin() (Greek to Latin, the way venues write it) + tests.
- tests: manager media.test.mjs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- products.media_id / categories.media_id (Alembic 0027): the old
/static/product_images photos are processed into the library (named after
their product; missing or unreadable files logged and skipped; the old
folder is left on disk) and products.image_url goes. The static mount is gone.
- APIs give `image` {id, name, thumb, card, full}; a product's image_url is its
card size. media_id on create/update (null clears); media.not_a_picture for
a video. POST /api/products/{id}/image is gone: uploads go to /api/media.
- Products and categories register their media usage: a photo in use can't
be deleted.
- Media: AVIF pictures (Pillow 12.3), GET /api/media/{id} gives each stored
size's bytes and resolution and the uploader's name; upload processing moved
into services/media.ingest (also used by the data move).
- QR menu photo push (contract C-3): the library's card size, WebP.
- tests: test_product_photos.py (7, incl. the 0027 data move); 497 passed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Table `media` (Alembic 0026): kind, name, original name, type, sha256
(unique), bytes, width/height, video length, who and when.
- Files under /app/data/media/<sha[:2]>/<sha>/: the original, and for
pictures thumb (200 px) / card (600) / full (1920) WebP, upright from
EXIF, never enlarged, transparency kept. Videos (MP4, WebM) kept as
uploaded; an MP4's length and size come from its header.
- GET/POST /api/media, GET/PATCH/DELETE /api/media/{id} for whoever manages
the menu, customer display, signage or menu tablets. The same file again
returns the existing item. The type comes from the bytes; 20 MB pictures,
200 MB videos, 60 MP; refused uploads leave nothing behind.
- GET /api/media/file/<sha>/<variant>: public (LAN), Cache-Control
public, max-age=1 year, immutable; byte ranges for video; a missing size
is made again from the original.
- register_usage(kind, fn): what uses media (products, displays, signage
from 5.2-5.4) declares it; delete is refused with media.in_use listing
the users.
- tests: test_media.py (12); stack.mjs uploads 3 MB through both nginx hops
and fetches a size with its cache headers (compose stack: all passed).
Backend suite: 490 passed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nginx's default client_max_body_size is 1 MB, so a phone photo (3-5 MB)
uploaded as a product image or customer-display image was refused with
413 before it reached the backend. The proxy (both copies, CS-5) and the
waiter, manager and terminal images now allow 250 MB; the backend checks
the real limits (media library: 20 MB pictures, 200 MB videos, step 5.1).
All five configs pass `nginx -t`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Pack README: CS-3 now says orders are queued by id and priced on sync, refused lines
are shown, and no request a screen waits for may hang; rows for the waiter's texts /
colours guards and the table, ordering and bookings pages.
- run-all: the waiter suite's label lists what it covers.
- waiter.mjs: the language check waits for the profile save (the screen changes first).
- android.mjs: the "server really down" check accepts the offline screen in place of the
app (the start-up data failing shows it there since the bootstrap time limit), not only
on /offline.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Waiter: Bookings (side drawer, for whoever has connect_orders.manage or
reservations.manage, with the online-orders app on): requests made online are
confirmed or declined with a reason the guest sees; confirmed ones are seated at a free
table (its seats shown, a warning mark when the party is bigger) or cancelled / marked
as a no-show; the food ordered ahead and its kitchen time; live updates.
- Backend: the bookings routes take reservations.manage too (require_any).
- @xenia/ui ReasonPicker + reasonText (gallery, unit test), first piece moved from the
terminal (4.6 → 4.8): the counter's online reject and booking decline dialogs use it;
the waiter loads @xenia/ui styles.css (the .x-* components; tokens as before).
- Tests: waiter e2e +2 (request listed with the key, confirmed and seated from the phone);
terminal.mjs and qr_table.mjs green.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- order_items.source (Alembic 0025): waiter | counter | qr | online, set by the server
(orders.add_priced_items: the phone / manager 'waiter', the counter 'counter'; the QR
menu's lines 'qr', online orders 'online'; a split line keeps its source); lines of
existing online orders backfilled 'online'; in the order's item output.
- Waiter: lines the guests sent from the QR menu (or an online order) carry a "📱 QR" /
"🌐 Online" mark; the qr_order message's banner has "Open the table", and in the bell's
list the message opens it.
- Tests: source per channel, migration 0025, QR placement marks 'qr'; waiter e2e +1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The owner's choices for 4.8 (2026-11-18), all configurable:
- Setting orders.close_with_unpaid (default off): when off, the server refuses to close
an order with unpaid items (pos.order_unpaid) and the phone's CLOSE takes the payment
first ("instant-pay close"); when on, CLOSE confirms and the items stay unpaid. Manager
Settings → Operation, next to "auto-close after full payment" (unchanged).
- POST /api/orders/{id}/items/combine: unpaid lines of the same item (choices, note,
price, course, kitchen state; no discount / deal / tab) become one line; the phone
offers "Combine into one line" for selected lines or a grouped line. The grouping
views (identical / same item) stay as they were.
- Seats: the table's seats next to its name on the cards (waiter Settings → Layout, on by
default) and in the guests dialog, where more guests than seats only shows a hint.
- The table screen's last English-only labels (ADD, PAY, CLOSE, ACTIONS, SERVED, CLEAR,
ALL) are keys too.
- Tests: test_close_and_combine.py (5), waiter e2e +5.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The waiter's --bg/--text/--accent… are made of @xenia/ui tokens: light / dark (user
menu) and the venue's accent reach every screen; the 751 colour literals in
waiter_pwa/src became tokens (by hue family and lightness), hex-alpha suffixes became
fade() (color-mix), fixing 'var(--accent)18' tints that never showed.
- @xenia/ui: new `special` (violet: offers, discounts, deals; contrast-tested) and
`on-colour` tokens.
- Setting venue.theme (teal | amber | blue | violet | rose, default amber), bootstrap
venue.theme, manager Settings → Venue → Colour; the waiter sets data-venue-theme and
the theme before the first render.
- Guard tests/no-colours.test.mjs; tests/e2e/waiter_look.mjs (every page light + dark,
side-by-side compare page); waiter e2e +3; backend test_venue_theme.py.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A bootstrap request that never answered (seen on the Android emulator after a cold start
with the server down) left the app on its loading screen for good: no error, so no retry.
It now times out, counts as offline (cached bootstrap / offline screen) and is retried, so
the app comes back by itself when the server does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- GET /api/tables/{id}/history: the table's closed / cancelled orders, newest first,
for the waiters of its zone (ordering.orders.open), never older than the history
module's history_days (free tier 31, D-6), module.disabled when history is off;
each order with times, total (cancelled items left out), people and items.
- Waiter: a History tab on the table (and "This table's earlier orders" on a free
table); orders expand to their items; the last answer is kept on the phone and
shown offline, marked as saved; the plan's day limit is shown.
- Tests: test_table_history.py (4), waiter e2e +2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Shift overview, order log, chat list / thread, offline + server search +
rediscovery screens, notifications, the refused-lines sheet and the offline queue's
reasons become keys; times and dates through useFormat() in the venue's clock.
- User menu: the other language(s) (data-testid menu-language-<lng>), saved to the
person's profile (PATCH /api/auth/me) and the bootstrap reloaded (D-12).
- tests/no-greek.test.mjs: no Greek letter in waiter_pwa/src (the one Greek word the
app recognises in staff messages is a \u escape).
- e2e: the test venue is English: waiter / browser / android use the English texts;
waiter.mjs +3 (English by default, switch to Greek at once and saved, after reload);
android bundle checks print what they saw when they fail.
- Pack README: the waiter texts rule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Table detail (actions, item actions, split, price, discount, pay / revert / close,
move / merge / transfer, guests, flags, assign, print), the order drawer (tabs,
options, quick notes, price change, summary), add items (cart, totals, deals,
search), the order summary and the summary before sending, the product picker.
- Money everywhere here in the language's format (`money()` in waiter i18n.js for
helpers shared by several components, useFormat() elsewhere).
- The default quick notes are keys (the venue's own quick notes still win).
- Variables named `t` (tables, tabs, timers) renamed so they don't shadow t().
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- @xenia/i18n: new `waiter` namespace (en + el); the waiter's Greek texts become keys
with English written fresh (Greek kept as the translation).
- App gates, side drawer / nav bars / notifications, user menu, login, table list and
cards, settings, venues + pairing errors, install dialog, lock screen, update banners,
QR scanner, favourites setup.
- Money and times through useFormat() (venue time, the language's number format):
table cards, quick table view, user menu, notifications.
- waiter i18n.js: tw() for code outside components (pairing errors).
- The table-list's FavoritesSetupPage `.map(t => …)` renamed so it doesn't shadow t.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The waiter app (and the manager's ordering tab) send what was chosen, by id; the
server prices it with the counter's code. No app sends a price any more.
- POST /api/orders/{id}/items takes `lines` (pos_cart's line + course_id,
price_adjustment, is_service_item): sales point checked first, refusals name the
product and line (order.line.*, order.not_sold_here); prices or selected_options in a
line -> order.line.client_price, the old `items` shape -> order.lines_required; a
by-hand price change needs ordering.prices.modify or a manager's approval (audited
PRICE_SET_BY_HAND). add_priced_items is the one writer of priced items (pos too).
- POST /api/orders/quote: the cart's total before sending; /api/pos/quote shares
pos_cart.quote().
- pos_cart: a preference set left out takes its default; a set at its free default
isn't stored; a default that costs is charged (the waiter never sent it: fixed);
an extra's sub-choice is charged per extra (the counter charged it once: fixed).
- @xenia/api lines.js: lineFromOptions / wireLine / estimate / LineError.
- Waiter: lines on send; cart total from the quote ("≈ estimate" offline); summary
shows the same prices; offline orders queued by id, priced on sync, refused lines
shown on a "Δεν στάλθηκαν" sheet (no empty order opened); dead ItemOptionsModal gone.
- Tests: test_order_lines.py (14), lines.test.mjs, waiter e2e +6.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- lib/cdp.mjs: attach to the visible, non-empty page target (a replaced WebView can
leave the old target listed first); a closed DevTools socket fails pending calls at
once instead of hanging; every call has a timeout.
- lib/android.mjs: attach() follows the app's current process (socket named after its
pid; an old one can linger) and re-attaches before a call when the process or the
live page changed; a call cut off by the page going away is retried once.
ensureDevice() reboots an emulator up longer than EMULATOR_MAX_UPTIME_MIN (30).
- android.mjs: switching venues waits until /venues lists them (the app may still be
reloading into the last venue's bundle); a rediscovery timeout logs the page's DOM
and console next to the screenshot.
Run alone: rediscovery 7/7, basics 3/3, stacks 21/21.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Payments: ordering.orders.close checked on pay/close and the counter POS
(waiters have it by default, owner decision); pay-offline always recorded.
- The venue switches waiter_cancellations / price_adjust / revert are gone:
ordering.orders.cancel, ordering.prices.modify and the new
ordering.payments.revert (overridable) decide; moves/split/transfer/merge
need ordering.orders.open; discounts pricing.discounts.apply; chat chat.use.
- Venue role defaults: role_permissions (Alembic 0024), role_template(role, db),
GET/PUT /api/waiters/roles/{role}/permissions applying the change to everyone
with the role; manager Settings -> Operation -> "What each role may do".
0024 also grants the new key to existing owners and store managers.
- Bootstrap `approvable`; @xenia/access useAllowed(key) -> yes/approve/no.
The waiter shows each action by key, "with a manager's approval (PIN)" where
allowed; GET /api/orders/cancel-permissions removed.
- Tests: test_waiter_keys.py (11), access allowed(), waiter.mjs +5, manager.mjs +3.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A new plain-HTTP connection can take about a second on a busy network; inside
the 48-wide /24 scan the real server's answer then missed the 1.5 s limit and
the moved server was never found (seen on the Android emulator, 0.9 s first
connection). 3 s keeps a full scan under ~20 s.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Login follows auth.waiter_login_mode / auth.waiter_require_username from the
bootstrap: name + PIN, name + password, typed username, or a "paired screens
only" message for tap mode. POST /api/auth/login {client: "waiter"}; a miss
shows the translated error without a reload.
- POST /api/auth/login-by-id removed; bootstrap login carries waiter_mode and
waiter_require_username.
- Sign-out ends the session on the server (POST /api/auth/logout), so
single_session_waiter = refuse_new no longer strands a waiter.
- Lock on the phone: menu "Lock", automatic lock / sign-out after inactivity
(security.auto_lock*, auto_logout*), unlock with the PIN in the same session,
lock kept across app restarts (restore() no longer clears it).
- e2e: new waiter.mjs (22 checks) in run-all; android.mjs signs in for real and
locks/unlocks on the emulator; TLS live check waits for the socket; the
rediscovery helper re-attaches to a stale WebView handle.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Plan step 4.1. No visible change to layout or flows.
- api/client.js on @xenia/api createApiClient (CS-8 baseURL, 401 → sign out, no answer →
backend-offline, err.xenia, the manager-approval retry); the PIN login handles its own 401
(before, a wrong PIN reloaded the page).
- <AccessProvider> at the root with an i18n instance: modules, permission keys, venue,
language from bootstrap; who is signed in comes with it (no more /api/auth/me polling).
packages/access: AccessProvider gains `cache` (the last bootstrap per session; used when
the server can't be reached, `offline` in the context, keeps retrying) and `failed` (the
app's own screen when there's nothing cached). The waiter caches per venue, shows its
offline page (server search) on a first start without a server, retries every 5 s;
ServerRediscovery and BundleSync run outside the bootstrap.
- Role names → keys: the shift gate and the user menu use core.dashboard.access.
- One shared, offline-cached read of the venue settings (api/venueSettings.js) instead of
seven GET /api/settings/ calls; apiError() shows backend error codes in the user's
language (17 places).
- Lint: 78 errors → 0 (unused code, empty catches, two duplicate style keys, a component
created during render, refs read during render → state, hooks after an early return);
set-state-in-effect is a warning like the manager/terminal; lint in run-all.
- Tests: tests/bootstrapCache.test.mjs; e2e browser: an offline restart stays signed in.
Android rediscovery waits for what the screen shows instead of fixed sleeps: 10/10 three
runs in a row (KI-009). Terminal 3.4 waits for both displays before the sale.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Plan step 4.0. Owner (2026-11-17): no phone in use needs to keep working, so no
compatibility path.
- Removed the SSE channel: routers/sse.py (/api/sse/stream, which still accepted a JWT whose
session had ended — a signed-out phone could keep listening), services/sse_bus.py (every
backend module now calls services/ws_bus.broadcast_sync directly), waiter useSSE.js.
- Credentials only in the first frame: the waiter's useWebSocket and the manager's
LiveProvider send {token} there like the terminal; routers/ws.py no longer reads ?token=
(a token in a URL ends up in proxy and server logs).
- Waiter: SSEContext → LiveContext (LiveProvider, useLiveContext, liveAlive, the
'live-event' / 'live-reconnected' window events), dead SSE compat code removed.
- Tests: a token in the address is refused, /api/sse/stream is 404; e2e browser (3 delivery
modes) and manager assert no token in the live connection's address. Android taps now
wait for their element (the fixed sleeps made the suite flaky, KI-009).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Plan step 3.5.
- The public /api/phone/ws socket is removed (anyone on the LAN could listen to every
caller). GET /api/phone/call-event stays public for the Grandstream UCM but is LAN-only in
the proxy (the 443 blocks' LAN-only location now covers it, in nginx-proxy/nginx.conf and
install.sh), with an optional shared secret (setting caller_id.secret → &key=).
- Calls are logged (phone_calls, migration 0023), matched to a customer on the server
(services/caller_id.py: Greek number rules moved from the manager) and published as
`call_incoming` {call_id, at, number, ext, customer card: visits, spent, last 3 orders} to
users with caller_id.use and to the counter POS screens. GET /api/phone/calls (the log),
GET /api/customers/lookup?phone=. Calls older than a minute don't pop up (replays).
- Manager: PhoneListener on the live connection and the shared Dialog (no more downloading
every customer to match); Integrations → Caller ID shows the server's log live and the UCM
Action URL. Counter: CallPopup with "New takeaway sale".
- Tests: tests/test_caller_id.py (10), terminal unit test, e2e terminal and manager.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Plan step 3.4. Owner (2026-11-16): the idle screen is configurable per venue.
- routers/customer_display.py (module customer_display, /api/display): the counter POS
pushes its state (POST /api/display/state: idle | cart | paid with lines, total, paid,
change); only the displays linked to that POS get `display.state`; the last state is kept
in memory for a display that reconnects (GET /api/display/state). pos_counter's device
scope includes customer_display.state.
- The idle screen: setting customer_display.idle (name, logo, logo + name, blank, one
image, slideshow, QR code to the online ordering / QR menu / any link; a line of text;
dark or light); images uploaded to /app/data/display_media (JPG/PNG/WebP/GIF ≤ 5 MB,
random names, served publicly on the LAN); a change sends `display.settings` to every
display. New key customer_display.manage (owners, store managers; migration 0022).
- Terminal: CustomerDisplayApp (cart with a large total, "Thank you" with the change for
12 s, the venue's idle screen, its theme), logic.js (unit-tested); the POS pushes from the
sale cart and the payment dialog (tables, online orders too) via useDisplay().
qrcode.react added to the terminal (already in the workspace).
- Manager: Settings → Customer display (style cards, venue name, text, look, slide seconds,
QR target/link/caption, image upload/pick/order/delete).
- Tests: tests/test_customer_display.py (3), terminal display.test.mjs (3); e2e terminal
(linked vs unlinked display, < 1 s, paid, QR and slideshow idle screens), manager (the
settings tab).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Plan phase 3S, step S.99.
- GET /api/connect/fees returns `links` {order, menu}: the ordering app and QR menu
addresses, from the cloud's apps_url (heartbeat) and the site id.
- Manager: "Your ordering link" card (OrderingLink.jsx) on Online ordering: the address, its
QR code, copy / open / print, to share or put on the website and window.
- Pack README: routers/fees.py row.
- Tests: the link (backend), the card (manager e2e).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Plan phase 3S, step S.7.
- tables.qr_token (migration 0021): a random token per active table; services/table_qr.py
(tokens, rotate, the snapshot's `qr` with the tokens' sha256 only, the code's link from the
cloud's apps_url); setting connect_menu.table_ordering (read-only by default).
- /api/connect/qr (connect_menu.manage): the codes, ordering on/off, a new code per table or
for all; table and QR changes push the menu at once (MENU_PATHS).
- Pull: a QR order with a table id goes onto the table's open order or a new one
(services/qr_orders.py): items at the cloud's prices, kitchen tickets, KDS, order_updated
(the waiters' phones and the counter), a `qr_order` message to the order's waiters or the
table's zone waiters; audit QR_ORDER (a repeated pull adds nothing); the cloud is told
"accepted" (the guest's page: in the kitchen). No usable table or no open day → the counter
gets it as before. Waiter app: the message's look.
- Manager: Online → Table QR codes (/online/qr): ordering switch, the menu link, a QR card
per table (print all), new code per table / for all.
- Heartbeat: apps_url kept in the license state.
- Tests: tests/test_qr_table.py (5); e2e qr_table.mjs (a real cloud and venue: table 5's
code → two dishes on table 5's order, KDS, live event, the guest's page; a forged code
refused; a new code kills the old one), in run-all.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Plan phase 3S, step S.6.
- Pull: "reservation" / "preorder" orders become Reservations waiting for an answer
(status "requested"; services/online_reservations.py), with the food ordered ahead kept on
the booking (items_json at the cloud's prices, the site's price check) — no order yet.
Migration 0020 (reservations: online_order_cloud_id, online_ref, items_json, total,
online_price_diff, fire_at, order_id, response_note).
- Confirm → the food's fire time = booking time − fire minutes (setting); the fire worker
(connect_orders, every 20 s) turns the food into an order at that time (needs an open
business day; waits otherwise): kitchen tickets, KDS (reference and time). Early arrival
fires at once. Seating moves the order to the table (refused if the table has an open
order). Decline / cancel / no-show with a reason. Every step mirrored to the cloud.
- Found: the KDS filter dropped every online order without an online status (SQL NULL in
NOT(a AND b)) — made NULL-safe.
- Counter: Online → Bookings (requests first, then upcoming), BookingPanel (confirm,
decline with reasons, food and when it goes to the kitchen, seat at a free table, cancel,
no-show); the Online badge and chime count booking requests.
- Manager: Online ordering → Table bookings settings (on, food ahead, hours, slot, notice,
days ahead, party size, fire minutes); the dashboard's reservations card confirms /
declines online requests; the reservations router delegates online bookings' status steps.
- Tests: tests/test_online_bookings.py (8), unit tests (terminal, manager), e2e: order app
(book with food → the venue confirms), terminal (request → confirm → the two dishes reach
the KDS at the fire time, not before → seated), manager (booking settings).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Plan phase 3S, step S.5.
- Pull: an online order keeps the customer's time (orders.requested_for, None = as soon as
possible) and delivery area; quick options are stored in the site's entry shape; items get
their cost snapshot.
- The delivery fee is its own order line: a system product (products.system_key
"delivery_fee", lifecycle "system", sold nowhere; services/system_products.py), created on
first use in the venue's language with the VAT group most products use. Added printed and
served, so kitchen tickets and the KDS never see it; paid at the counter with the items,
counted in the shift, on the fiscal receipt with its VAT group. Never listed in the
catalogue (products list, export, edit endpoints → 404) and never added by hand.
- Price check (services/online_check.py): each line priced as the snapshot prices it, at the
order's time, and the fee through the same engine with the site's rules and the cloud's
area id; differences kept on orders.online_price_diff and shown. The customer pays what
the cloud charged.
- Counter: time chip (or as soon as possible), area, fee line, price warning; takeaway is
its own kind (was shown as "at the venue") and finishes as "collected". KDS cards show the
online reference and the time; kitchen tickets print the reference, the type and the time.
- Manager: Online ordering → "The fee on the receipt" (name, VAT group;
PUT /api/connect/fees/fee-product, fees.vat_group_unknown); the online orders page shows
the time, area and price warning.
- Migration 0019. Tests: tests/test_online_site_side.py (6), terminal unit test, e2e
(terminal: fee, time, warning, paid in full; manager: fee line settings).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- connect_orders.ordering setting; GET/PUT /api/connect/fees/ordering (validated:
services, hours per day incl. past midnight, preparation, slot minutes, days ahead,
ASAP); pushed to the cloud with the menu (snapshot `ordering`).
- Manager: the Online ordering page gains "Services and hours" (OrderingSettings.jsx; logic
in feesLogic.js, unit-tested); nav label "Online ordering".
- tests/e2e/order_app.mjs: a real cloud + the built order app in a phone-sized browser:
takeaway and delivery placed, priced by the cloud (fee by area, minimum refused), the
site moves the delivery to delivered and the page follows; a rejection with its reason;
Greek. In run-all, with the order app's unit tests.
- Tests: backend +1 (406), manager unit +1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>