docs+test: phase 4 wrap-up (platform-v2 step 4.99)
- 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>
This commit is contained in:
+5
-2
@@ -54,7 +54,9 @@ The manager calls the API **same-origin, with relative paths**. The waiter app r
|
||||
| `waiter_pwa/src/native/pairing.js`, `src/pages/VenuesPage.jsx` | Pairing with a venue (QR / typed address) and the venue switcher |
|
||||
| `waiter_pwa/src/api/client.js`, `src/api/bootstrapCache.js`, `src/api/venueSettings.js`, `src/api/errors.js` | The waiter's client on `@xenia/api` (since 4.1): token, 401 → logout, no answer → `backend-offline`, the manager-approval retry; `<AccessProvider cache>` keeps the last bootstrap per venue so an offline restart stays signed in (CS-3); one shared, offline-cached read of the venue settings; `apiError(err, fallback)` shows backend error codes in the user's language |
|
||||
| `waiter_pwa/src/context/LiveContext.jsx`, `src/hooks/useWebSocket.js` | Real-time lifecycle, event → store/cache updates, visibility refresh; the socket itself is `createLiveClient` from `@xenia/api` |
|
||||
| `waiter_pwa/src/db/posdb`, `src/services/offlineOrders` | Offline cache and queued orders |
|
||||
| `waiter_pwa/src/db/posdb`, `src/services/offlineOrders` | Offline cache and queued orders (lines by id, priced on sync; refused lines kept in `kv.refused_lines`, `components/RefusedLines.jsx`; 4.4) |
|
||||
| `waiter_pwa/src/i18n.js`, `src/logic/colour.js`, `tests/no-greek.test.mjs`, `tests/no-colours.test.mjs` | The waiter's texts (`waiter` namespace, `tw()`, `money()`; 4.5) and colours (tokens only, `fade()`; 4.6), and the guards that keep them so |
|
||||
| `waiter_pwa/src/pages/TableDetailPage.jsx`, `AddItemsPage.jsx`, `BookingsPage.jsx`, `components/TableHistory.jsx` | The table (actions by permission key 4.3, combine lines and close-with-unpaid 4.8, history 4.7), ordering (server-priced cart 4.4), bookings (4.8) |
|
||||
| `nginx-proxy/nginx.conf` | Proxy config used in dev / by hand |
|
||||
| `install.sh` | Site installer. **Writes its own copy of the proxy config.** |
|
||||
| `docker-compose.yml` / `docker-compose.dev.yml` | Prod (pull images) / dev override (build + expose ports) |
|
||||
@@ -84,8 +86,9 @@ Control frames from `routers/ws.py` (3.1a) are not stored and have no seq: `devi
|
||||
**CS-3. The waiter app must survive bad networks.**
|
||||
Waiters walk in and out of WiFi range and phones sleep. Any new waiter flow must:
|
||||
- work from the IndexedDB cache when offline, or clearly block with an offline state
|
||||
- never lose an order that was entered (queue it)
|
||||
- never lose an order that was entered (queue it): queue it **by id** (`@xenia/api` `wireLine`, step 4.4) so the server prices it when the phone is back, and show what the server refused instead of dropping it (`kv.refused_lines`, the "Not sent" sheet)
|
||||
- tolerate duplicate or replayed events
|
||||
- never hang on a request: every request that a screen waits for has a time limit or a retry (the bootstrap: 8 s, then offline + retry; step 4.6)
|
||||
|
||||
**CS-4. Money and prices are snapshotted.**
|
||||
Prices, costs and discounts are copied onto order items and logs when the action happens (snapshot pattern, `PriceEventLog`). Reports read the snapshots, never the live catalogue.
|
||||
|
||||
Reference in New Issue
Block a user