← All tests

R7 — Dashboard rework + Manager sidebar drawer PROD

Two parallel asks bundled into one arc on 2026-05-08: NIX-OS-86 dashboard / reports rework per spec §13 (Ranking of POS, Top Products under it, Recent Orders trimmed, Sales Trend stays daily) plus a net-new manager sidebar (spec §10.1, "Show multiple Points of Sales") rendered as a right-side toggle drawer with live polling. Both surfaces share the same per-config summary shape (Cash + Bank + Sold today), so R7.1 builds the data once and R7.3 / R7.6 consume it. Bank Balance is computed from cafe.order_payments non-cash rows on the live session — cafe-master tenants get the real value, Odoo-master path returns 0 placeholder until a non-cafe-master Pro tenant exists.

14/14 R7 prod checks green via test-r7-prod.mjs, exercised on both get-coffee (Pro / cafe-master since 2026-05-08 R6.6) and lumiere-coffee (Starter). Six R7 sub-phases + 5 follow-up commits shipped in one session:

R7-followup commits (same session):

NIX-OS-89 carried-forward follow-ups (closed in same session):

All R7 prod checks (14)

Walkthrough screenshots

Regression sweep

SuiteScoreStatus
test-r7-prod (this bundle, post-followups)14/14PASS
test-nix-os-87-prod (settings layout — touches modified layout.tsx)11/11PASS
test-receipt-fixes-prod6/6PASS
test-phase1-prod (smokes /pos route — touches refactored buildLanding)11/11PASS
test-phase4-prod (writes orders — exercises R6.3c cafeCustomerId path)10/10PASS
Total52/52PASS

Phase4 ran solo per the documented "first-parallel-hit flake" memory; passed clean on first solo run. The other three regressions ran in parallel. Re-validation passed after each follow-up commit; final R7 14/14 + phase4 10/10 confirmed post-deploy of 380f91a.

Code surface

R7 arc (commit f616460, +937/-76 across 14 files):
  app/(authed)/dashboard/page.tsx                              R7.2 + R7.3 + R7.4
  app/(authed)/reports/page.tsx                                R7.5 (full-width Ranking above Top Products)
  app/(authed)/reports/daily/page.tsx                          R7.5 (server-side label resolution + ranking prop)
  app/(authed)/reports/daily/starter-daily-client.tsx          R7.5 (Ranking row + Top Products / Tender reorder)
  app/(authed)/layout.tsx                                      R7.6 (top strip always-on if dashboard.view)
  app/(authed)/pos/page.tsx                                    R7.1 (bankToday plumbed into cardFor)
  app/(authed)/pos/pos-landing.tsx                             R7.1 (LandingConfig.bankToday)
  lib/db/orders.ts                                             R7.3 (aggregateRevenueByPosConfig)
  lib/db/pos_configs.ts                                        R7.1 (MirrorPosConfigSummary.bankToday + non-cash JOIN)
  lib/db/starter_landing.ts                                    R7.1 (sessionBank lookup)
  lib/odoo/queries.ts                                          R7.1 (PosConfigSummary.bankToday placeholder)
  lib/db/manager_live.ts                          NEW          R7.6 shared loader (Starter + Pro paths)
  app/api/manager-live/route.ts                   NEW          R7.6 GET endpoint, gated on dashboard.view
  components/manager-live-control.tsx             NEW          R7.6 trigger + drawer + 30s polling

R7-followups (same session):
  490db70  refactor: dedupe buildLanding into lib/db/manager_live (-133 LOC pos/page.tsx)
  fa3e88a  feat: Odoo-master bankToday + drawer refresh button + visibility-aware polling

NIX-OS-89 carried-forward follow-ups (same session):
  4ca801d  backend: cafe.product_categories Odoo mirror columns + partial unique
  fa3fa44  cafe:    R6.7 mirror DAO + read flips + scripts/backfill-pro-tenant-categories.ts
  9f664b2  backend: R6.3c cafe.orders.cafe_customer_id UUID FK + same-migration backfill
  380f91a  cafe:    R6.8 image data URLs + R6.3c schema/route + scripts/backfill-pro-tenant-product-images.ts