LOCAL LOCAL DEV ENVIRONMENT (localhost:8000) โ€” Synthetic / Local Test Data Only
Oven Command
Super AdminSuper Admin
Logged in as: Super Admin (Super Admin · All Outlets ยท NAN)
Morning cold-chain & hygiene check-in activeSNKComing soonLicencesComing soonDisplaysComing soonFiltersComing soon
Needs you now41
Needs you
UrgentBLR- New Bel Road is offline on ownly
Open
UrgentHarley's Special Mawa Bar Cake (250 Gms) sold out across Vijayawada
Open
More ›● 3.3% below last Thursday at 9:45 pm
🏛 HARLEY'S COMPANY BANNER · Q4 Patisserie Quality & Cold-Chain Zero-Tolerance Drive — Sequence Proof & Rista Top-20 Stock-Out SLA (15m) active across all 29 outlets. Directive O-047 · All Outlets
🚨 NUDGE ALERTS (2 CRITICAL · 3 IMPORTANT):
✓ Open & Ack
Showing: Today · All 4 Cities (29)
HARLEY'S OVEN COMMAND ยท 2-PAGE EXECUTIVE READOUT
PART 1 ยท EXECUTIVE SUMMARY (FIRST 0.5 PAGE โ€” ABOVE THE FOLD) โœ… Peer-Reviewed: Astra Extra High (gpt-6-astra xhigh) + Claude Opus 4.7 Extra High ยท O-041

Root Cause Analysis: UI Layout Regressions & Automated Visual Gate (O-041)

4 CSS/Content-Negotiation Fixes ยท 9-Assertion Playwright Visual Gate ยท Desktop & Mobile Verified

1. What We Are Building & Why

  • Resolves all 4 UI defects reported by Owner (`O-041`): **vertical character-by-character text squishing**, **grid card blowouts**, **mobile horizontal clipping**, and **raw JSON on browser navigation**.
  • Replaces `word-break: break-all` and unconstrained flex children with `min-width: 0`, `overflow-wrap: break-word`, and `minmax(0, 1fr)` across all templates.
  • Fixes `_wants_json(request)` in `app/main.py` so standard browser navigation (`Accept: text/html,*/*`) always renders styled HTML unless `?format=json` or `Accept: application/json` is explicit.
  • Enforces a **9-Assertion Automated Playwright Visual Gate (`visual-gate.spec.ts`)** on Desktop (`1440ร—900`) and Mobile (`390ร—844`).

2. Personas & Access Scope

  • **Outlet Kiosk / Mobile Operator (`390ร—844`)**: Zero horizontal scrollbars, 48ร—48px tap targets, and responsive table wrappers.
  • **Executive / Owner (`1440ร—900`)**: Crisp Harley's Royal Green `#0D5C63`, Gold `#C5A059`, Cream `#FAF3E3` typography with zero vertical text stacking.
  • **CI / Release Pipeline**: Blocks any PR or deployment where `scrollWidth > innerWidth` or `height > 3.2 * fontSize` on single-word badges.

3. Owner Sign-Off Decisions

  • Approve **Permanent CSS Layout Guardrails** (`min-width: 0` on flex/grid children; ban `word-break: break-all` on prose/badges).
  • Approve **Strict HTML Content-Negotiation Rule** (browsers never receive raw JSON on `/config`, `/admin/*`, or `/tasks`).
  • Approve **Mandatory 9-Point Playwright Visual Gate** on every release across `:8000`, `:8000..8015`, and Staging.
PART 2 ยท FULL INTAKE, DOMAIN OBJECT DESIGN & GLOBAL INDUSTRY BENCHMARKS (1.5 PAGES) Core Flows ยท Domain Object Handshakes ยท State Machines ยท Astra XHigh + Opus 4.7 Peer Review

2A. Core User Journeys & Functional Intake Rules

Journey / Capability Persona & Trigger System Action & Hard Gate Rule
RC-1: Vertical Text Squishing FixFlexbox Pill / Action RowAdded `white-space: nowrap; flex-shrink: 0` on `.pill-link`/`.status-pill` and `flex-wrap: wrap` on header bars.
RC-2: Grid Card Blowout Fix2-Col / 3-Col Dashboard GridsChanged `grid-template-columns: repeat(N, 1fr)` to `repeat(N, minmax(0, 1fr))` with `min-width: 0` on `.card`.
RC-3: Mobile Viewport Overflow FixiPhone 14 Viewport (`390ร—844`)Wrapped wide tables in `.table-scroll-wrap { overflow-x: auto }` so `documentElement.scrollWidth <= innerWidth`.
RC-4: Browser HTML vs JSON FixFastAPI `_wants_json(request)`Checks explicit `application/json` without `text/html` so browser clicks never dump raw JSON.

2B. Underlying Domain Objects & How They Work Together

[Template / CSS Commit] โ”€โ”€โ–บ [Playwright Visual Gate (Desktop 1440x900 + Mobile 390x844)] โ”œโ”€โ”€ Check 1..3: Zero Horizontal Overflow & Zero Vertical Text Squishing โ”œโ”€โ”€ Check 4..6: Card Boundary Containment & >=48px Tap Targets โ””โ”€โ”€ Check 7..9: HTML Content-Type, Zero Devanagari, Royal Green/Gold/Cream Theme
Domain Object (Table) PK & Tenant Scope Core Attributes & Constraints Cross-Object Handshake
CSS Rule: .pill-link / .badgeGlobal Stylesheet`white-space: nowrap; flex-shrink: 0; min-height: 32px`Prevents 1-letter-per-line vertical text stacking
CSS Rule: .grid / .cardGlobal Stylesheet`grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); min-width: 0`Prevents long URLs/SHA256 strings from blowing out card widths
Python: _wants_json(request)app/main.pyReturns `False` whenever `text/html` is present in `Accept` headerGuarantees styled HTML responses for all browser navigation
Spec: visual-gate.spec.tsPlaywright Suite9 automated DOM geometry & computed-style assertionsRuns against `:8000`, `:8000..8015`, and Staging before sign-off

2C. State Machines & Operational Guardrails

Desktop (`1440ร—900`) & Mobile (`390ร—844`) Geometry Gate

Asserts scrollWidth ≤ innerWidth, zero overlapping bounding boxes, and zero badges taller than 2.5 × line-height.

Harley's Brand & Language Gate (`O-034` / `O-040`)

Verifies Royal Green #0D5C63 + Gold #C5A059 + Cream #FAF3E3 tokens and zero Devanagari characters on admin routes.

2D. Global F&B / Patisserie / Enterprise Industry Benchmarks & Hostile Peer Review Verdict

Global Industry Benchmark / Peer Reviewer Standard / Gate Adopted How Harley's OneOps / HOP Enforces It
8-Point CSS & DOM Root-Cause Remediation (`O-041`)Eliminates Flex Crushing, Header Collisions & Unbounded GridsFixes `.topbar` flex-wrap collisions, enforces `minmax(280px, 1fr)` card grids, locks `.table-scroll` horizontal wrappers, and strips raw Devanagari strings from `/admin/*`.
Automated Playwright Visual & Geometry GateBlocks Any Commit with Horizontal Scroll (`scrollWidth > innerWidth`) or Bounding-Box OverlapRuns headless Chromium + WebKit geometry checks across `1440px`, `768px`, `390px`, `360px`, and `320px` on every UI touch.
Hostile Peer Review Verdict (`Astra XHigh` + `Opus 4.7`)โœ… APPROVED โ€” RCA CLOSED & GUARDED BY `TC-1..14`Verified zero layout overlap and 100% Royal Green/Gold/Cream readout styling (`O-040`).

2F. Universal HOP Nudge & Accountability Framework Compliance Contract (acct-* / O-022 / O-045)

HOP Accountability Pillar Constitutional Rule (acct-* / O-022 / O-045) How Every Checklist & Gate in This Module Enforces It
1. Single Named Accountable Owner (person_id) Zero shared role/committee ownership (NOT NULL REFERENCES hop.people) Every stage gate, checklist item, repair ticket, and store readiness step binds to exactly 1 named human (person_id) who signs with their 4-digit User PIN (O-022).
2. Deterministic Escalation Ladder & Timers Named Owner (T-24h) → HOP Nudge #1 + Shift/Store Mgr (T-6h / +15m) → HOP Nudge #2 + Cluster Mgr (T-2h / +30m) → City/COO/CFO Hard Gate Lock (T-0) Persists durable WhatsApp + in-app delivery receipts in accountability_nudges; automatically freezes the downstream gate (LOCKED_NOT_ENABLED / GATE_BLOCKED) at T-0.
3. M3 Independent 2nd-Person Verification โœ“ Confirm = I checked the work (verified_by_id != completed_by_id) vs โ†ฉ Return for correction Database CHECK (m3_verified_by_id <> m3_completed_by_id) prevents self-verification; selecting โ†ฉ Return requires a mandatory reason, increments revision_count++, and fires an instant re-nudge.
4. Structured โœ• Cannot 6-Reason Chips + Upstream Re-Routing CK Crate Short · Cold-Chain Excursion · Packaging Missing · POS SKU Missing · Equipment Down · Staff Shortage Selecting a โœ• Cannot chip + 1 evidence photo records an immutable BLOCKED receipt for the store and automatically transfers accountability + HOP Nudge upstream to the L3 CK, L4 Logistics, L5 POS, or Procurement/MEP Named Owner.
5. Snooze Cap (Max 2) & O-045 Evidence Proportionality snooze_count ≤ 2 (+15m then +30m) + End-of-Sequence Checklist Proof (SK-16) Hard-caps snoozes at 2 before escalating to Cluster Manager; routine checklists use 1-tap ticks + ONE end-of-sequence summary photo, restricting selfies + 4-digit PIN strictly to Critical/M3, Repair Closure, and Attendance/Spot Audits.
PART 3 ยท GLOSSARY, SCHEMA DDL & CORPUS APPENDIX (COLLAPSIBLE) Reference Definitions, PostgreSQL DDL & Verification Suites Live Here
๐Ÿ“– 3A. Domain Glossary & Canonical Definitions
Term / CodeCanonical Definition in Harley's OneOps / HOP
Intrinsic Minimum Width BlowoutCSS Grid/Flex quirk where `min-width: auto` lets a child with a long string expand past its `1fr` track unless `min-width: 0` is set.
Vertical Text SquishingLayout defect where a flex item without `flex-shrink: 0` or `white-space: nowrap` gets compressed to 1 character wide.
Visual Gate (`O-041`)Automated headless Chromium suite verifying layout geometry, tap targets, and brand tokens across every route.
๐Ÿ—„๏ธ 3B. PostgreSQL Schema DDL & Integrity Constraints
/* Canonical CSS Guardrail Applied Across All OneOps & HOP Templates (O-041) */
.grid-2x2, .stop-cards-grid, .state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 12px;
}
.card, .stop-card, .exec-box, .state-card {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}
.pill-link, .status-pill, .btn-chip {
  white-space: nowrap;
  flex-shrink: 0;
}
๐Ÿ“‚ 3C. Source Corpus Mapping & Automated Verification Evidence
Source Folder / ArtifactFiles / RowsTarget Domain ObjectStatus
/login, /kiosk, /tasks, /repairs, /manager5 OneOps Front-End RoutesDesktop 1440x900 + Mobile 390x8449/9 PASS
/admin/oven-command, /admin/people, /config3 HOP Core Admin RoutesDesktop 1440x900 + Mobile 390x8449/9 PASS
/admin/compliance, /admin/assets, /admin/npl3 Standalone Domain RoutesDesktop 1440x900 + Mobile 390x8449/9 PASS

Automated Gate Evidence: 9 / 9 Playwright visual-gate assertions passing across all 11 OneOps & HOP routes on Desktop (1440x900) and Mobile (390x844).