# Ops Portal Full Code Audit — July 12, 2026 Auditor: Hermes | Pages: 11 | Total bugs: 42 ## The Four Root Causes Everything else flows from these four: ### RC-1: `window.initNav` is undefined (affects ALL pages) `app.js` exports `initNav` only under `window.Ops.initNav`, not `window.initNav`. Every page's guard `typeof window.initNav === 'function'` evaluates FALSE. Nav hamburger, active-link, and logout wiring are dead on every page. **Fix (one line in app.js, inside IIFE before `window.Ops = {...}`):** ```javascript window.initNav = initNav; ``` ### RC-2: `utils.js` does not exist All pages reference `/js/utils.js?v=2` but the file is `/js/app.js`. The 404 is silent because `app.js` loads next and provides `window.Ops`. But if the server returns a hard error, all pages break. **Fix:** Rename `app.js` → `utils.js` OR update all `