feat: foundations for the manager conversion (platform-v2 step 6.1)

- Backend: every HTTPException in routers/ is an error code now (260 raises, ~105 new codes,
  texts in en + el); XeniaError(detail=...) keeps the three v1-shaped answers old pages read;
  bad / unknown tokens answer auth.session_ended; test_errors refuses new HTTPExceptions.
- Manager: v2.json is the list of pages on the v2 rules: scripts/lint.mjs lints them,
  tests/v2-guards.test.mjs refuses Greek and colour literals, `strict` paths make
  set-state-in-effect an error.
- src/live/useLiveQuery.js (react-query + live events + refresh on reconnect); Signed in now
  uses it.
- Dead manager files removed (3.1k lines unreachable from main.jsx).
- Tests: backend 544 passed, manager unit 33, run-all (no Android) passed (manager's live
  bell check passed on a rerun).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-18 04:31:36 +02:00
co-authored by Claude Opus 5.5
parent 218a6c9c5e
commit 2dc5da446e
48 changed files with 918 additions and 3498 deletions
+1 -1
View File
@@ -182,7 +182,7 @@ def test_discount_over_limit_needs_approval(client, db, venue, make_user, login)
token = approve(client, v["waiter_h"], "pricing.discounts.over_limit", v["manager"].username).json()["override_token"]
r = client.post(url, headers=dict(v["waiter_h"], **{"X-Xenia-Override": token}),
json={"item_ids": [v["items"][2].id], "discount_percent": 20})
assert r.status_code == 403 and r.json()["detail"] == "Discounts are globally disabled"
assert r.status_code == 403 and r.json()["error"]["code"] == "order.discounts_off"
# ── check() with a token (require() routes) ──────────────────────────────────