ui audit report
Guide for ui audit report
UI Projects Guardrails Audit Report
Date: 2026-01-12 Scope:loh-website,loh-ops-tools
1. Large Files (>300 Lines)
Status: 🔴 7 Violations in
loh-websiteRule: Files must be under 300 lines to ensure modularity.
components/wiki/WikiComponents.tsx(548 lines) - Needs splitting into sub-componentsapp/store/page.tsx(485 lines) - Extract sections to componentspages/_app.tsx(377 lines) - Refactor providers/layoutslib/wiki/renderer.tsx(353 lines) - Split rendering logiccomponents/FounderPacks.tsx(331 lines) - Extract individual pack cardslib/shop-data.ts(323 lines) - Split data or move to JSON/DBlib/wiki-data.ts(306 lines) - Split query logic
Note:
lib/knowledge-base/items/index.ts (3249 lines) is generated code and is exempt.2. TypeScript Safety (any Usage)
Status: 🟠 Warnings Found
Rule: Avoidany; use typed interfaces.
loh-website
lib/wiki-data.ts- Excessive use ofanyin database mapping.const row: any = db.prepare(...)options: any[] = []
loh-ops-tools
app/products/page.tsxapp/coupons/page.tsxapp/orders/page.tsxlib/auth.tsx
3. Production Logs (console.log)
Status: 🟢 Clean ( mostly)
Rule: Noconsole.login production code.
- Clean: No
console.logfound inloh-ops-toolscomponents. - Clean: No
console.logfound inloh-websitecomponents (only in scripts/utils).
4. Hardcoded Colors
Status: 🟡 Review Needed
styles/osrs-wiki.csscontains hardcoded colors. Should move to Tailwind config or CSS variables where possible to matching Design Bible.
Recommendations
- Refactor Large Files: Create
pending_tasks.mdentries to split the 7 identified large files. - Strict Types: Add
no-explicit-anyESLint rule toloh-ops-toolsand fix reported files. - Wiki Data: Create proper interfaces for SQLite results in
wiki-data.ts.