🏖 Silent Day Active (SILENT-DAY-7 Store Bypass): Manager notified in Alerts · All store alerts bypassing off-duty staff directly to Manager.
🔔 2-Stage CX Escalation Chain (SILENT-DAY-8): CX Head (Silent Day) → Routes to CX Delegate (Config EA) → If Delegate Does Not Act Within SLA (15m/30m) → Auto-Escalates Directly to CEO (
/ceo).
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)
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 Fix | Flexbox Pill / Action Row | Added `white-space: nowrap; flex-shrink: 0` on `.pill-link`/`.status-pill` and `flex-wrap: wrap` on header bars. |
| RC-2: Grid Card Blowout Fix | 2-Col / 3-Col Dashboard Grids | Changed `grid-template-columns: repeat(N, 1fr)` to `repeat(N, minmax(0, 1fr))` with `min-width: 0` on `.card`. |
| RC-3: Mobile Viewport Overflow Fix | iPhone 14 Viewport (`390ร844`) | Wrapped wide tables in `.table-scroll-wrap { overflow-x: auto }` so `documentElement.scrollWidth <= innerWidth`. |
| RC-4: Browser HTML vs JSON Fix | FastAPI `_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
Domain Object (Table) |
PK & Tenant Scope | Core Attributes & Constraints | Cross-Object Handshake |
|---|---|---|---|
CSS Rule: .pill-link / .badge | Global Stylesheet | `white-space: nowrap; flex-shrink: 0; min-height: 32px` | Prevents 1-letter-per-line vertical text stacking |
CSS Rule: .grid / .card | Global 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.py | Returns `False` whenever `text/html` is present in `Accept` header | Guarantees styled HTML responses for all browser navigation |
Spec: visual-gate.spec.ts | Playwright Suite | 9 automated DOM geometry & computed-style assertions | Runs 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 Grids | Fixes `.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 Gate | Blocks Any Commit with Horizontal Scroll (`scrollWidth > innerWidth`) or Bounding-Box Overlap | Runs 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 / Code | Canonical Definition in Harley's OneOps / HOP |
|---|---|
| Intrinsic Minimum Width Blowout | CSS 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 Squishing | Layout 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 / Artifact | Files / Rows | Target Domain Object | Status |
|---|---|---|---|
/login, /kiosk, /tasks, /repairs, /manager | 5 OneOps Front-End Routes | Desktop 1440x900 + Mobile 390x844 | 9/9 PASS |
/admin/oven-command, /admin/people, /config | 3 HOP Core Admin Routes | Desktop 1440x900 + Mobile 390x844 | 9/9 PASS |
/admin/compliance, /admin/assets, /admin/npl | 3 Standalone Domain Routes | Desktop 1440x900 + Mobile 390x844 | 9/9 PASS |
Automated Gate Evidence: 9 / 9 Playwright visual-gate assertions passing across all 11 OneOps & HOP routes on Desktop (1440x900) and Mobile (390x844).

OneOps