Files
hermes-recovery/references/ops-portal-audit-2026-07-12.md
T

45 lines
2.1 KiB
Markdown

# Ops Portal Full Bug Audit Report
**Date:** July 12, 2026
**Scope:** All 11 pages at ops.itpropartner.com
**Auditor:** Claude Sonnet 4-6 (via delegation)
**Total bugs found:** 42 (14 Critical, 9 High, 12 Medium, 7 Low)
## Root Cause Summary
1. `/js/utils.js` returned 404 — file existed at `/var/www/ops/js/utils.js` but not at `/opt/ops-portal/static/js/` (the backend's JS directory)
2. `window.initNav` not exported from app.js — only exists at `Ops.initNav`. Every page calls `window.initNav()` which is undefined
3. `logoutBtn` DOM lookups happen before nav fetch completes on 3 pages
4. `window.fetchStatus` undefined on cost.html — hard crash on load
5. 6 pages have no auth guard at all
6. audit.html uses sessionStorage instead of localStorage for token
## Priority Fix List
### 🔴 P1 — Critical (fix first)
| Bug | Pages | Fix |
|-----|-------|-----|
| `utils.js` 404 | All 10 pages | ✅ Already fixed — copied to backend static dir |
| `window.initNav` undefined | All fetched-nav pages | Export `window.initNav = initNav` in app.js |
| `logoutBtn` null ref before nav | services, servers, backups | Move getElementById inside fetch callback |
| `window.fetchStatus` crash | cost.html | Replace with raw fetch() call |
| `window.escapeHtml` undefined | config.html | Use Ops.escapeHtml or add window alias |
| audit.html uses sessionStorage | audit.html | Change to localStorage |
| No auth guard | network, cron, config, logs, cost, fleet | Add login overlay + auth check |
### 🟠 P2 — High
| Bug | Fix |
|-----|-----|
| Login overlay hardcoded `show` class | Remove `show` from HTML |
| `<main>` misplaced in cron.html | Move `<main>` to wrap content |
| Grafana Tailscale IP breaks on mobile | Replace with hostname or remove |
### 🟡 P3 — Medium
| Bug | Fix |
|-----|-----|
| `summary-bar` CSS missing from ops.css | Add styles |
| fleet tracker missing viewport-fit=cover | Add to meta |
| Hardcoded username `germaine` in audit.html | Remove value attribute |
| COT midnight hour bug in fleet tracker | Use % 24 |
## Full Bug List (42 items)
See `/root/.hermes/cache/delegation/subagent-summary-0-20260712_081532_243138.txt` for complete details.