Rework My Orders stats and add responsive UI checks
Build and Push Lunchtime Images (Kaniko) / build-and-push (push) Successful in 1m44s

My Orders: year calendar and lunch profile first, chips and "How you
compare" removed, open and paid payments merged into one table (open
first, then newest). Activity is now a line chart with a cumulative
switch and finer buckets (daily up to ~3 months, weekly up to ~13).
Cards get subtle elevation and tighter spacing.

Responsive: phone tab strip instead of the side menu, heatmap fits
narrow screens, grouped column-chart labels are truncated, the manager
weekday table scrolls instead of overflowing.

Tooling: viewports.mjs (presets, overflow detector), shoot.mjs --sizes
and --select, tests/responsive.ui.spec.ts, docs/ui-testing.md.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
simandClaude Sonnet 5.5 committed 2026-11-05 23:15:25 +00:00
1 parent 9d80e6d06e
commit a2e4321ac7
15 files changed
+435 -134

No files matched your search

+2 -1
View File
@@ -33,11 +33,12 @@ The native stack uses `src/dev/config.yaml` (via the `CONFIG_PATH` env var) inst
```bash
cd src/e2e
npx playwright test # everything; --project=api or --project=ui to narrow down
node shoot.mjs / /create "{order}" "{admin}" /stats [--as=user|admin|anon] [--dark] [--mobile] [--full]
node shoot.mjs / /create "{order}" "{admin}" /stats [--as=user|admin|anon] [--dark] [--mobile] [--full] [--sizes=check|all|WxH,...] [--select=css]
```
- Logging in uses the real flow: `lib.mjs` `signIn(email?)` registers (or migrates, for an existing email), reads the confirmation mail from Mailpit's API and confirms it, giving back a user ID. In the browser, a user is "logged in" by setting localStorage `lunchtime_token` before load (`loginAs` in `fixtures.ts`). Fixtures: `user` (fresh per test), `admin` (the ADMIN_EMAILS account), `userPage`.
- `lib.mjs` also has `api()` (fetch with `X-User-Id`), `createOrder()` (with `SAMPLE_MENU`) and `submit()`. Use them to seed data instead of clicking through the UI.
- **After any layout change** run the responsive checks (phone, tablet, desktop; overflow detection; `tests/responsive.ui.spec.ts`): see `docs/ui-testing.md`. `shoot.mjs --sizes=...` exits 1 and prints `OVERFLOW` when a page is wider than its viewport.
- `shoot.mjs` prints PNG paths (default dir `src/e2e/screenshots/`, gitignored) plus console errors and failed requests. `{order}`/`{admin}` seed an order that has a menu and two submissions. Use it to view the UI after visual changes.
- Ant Design Select: its `role=option` nodes are hidden a11y helpers, so click `.ant-select-item-option` instead.
- Playwright is pinned to 1.65.0 to match the Chromium build in `PLAYWRIGHT_BROWSERS_PATH`. If they diverge, `npx playwright install chromium`.