tractatus/.claude
TheFlow 073cfabd97 perf(docs): improve LCP with deferred scripts and font preloading
SUMMARY:
Optimized docs.html performance to improve Lighthouse score from 89/100
to >90/100 and reduce LCP from 1.8s to <1.5s.

PERFORMANCE OPTIMIZATIONS:

1. Deferred Script Loading:
   - Added defer attribute to 5 scripts (lines 865, 867-869, 872-873)
   - version-manager.js
   - document-cards.js
   - docs-app.js
   - docs-search-enhanced.js
   - i18n-simple.js
   - language-selector.js
   - Scripts now download in parallel without blocking HTML parsing
   - Execute in order after DOM ready

2. Font Preloading:
   - Added preload hints for critical fonts (lines 24-25)
   - Inter Regular (400) - body text
   - Inter Bold (700) - headings
   - Browser starts downloading fonts immediately
   - Reduces FOIT/FOUT (flash of invisible/unstyled text)

EXPECTED IMPACT:
- LCP improvement: 1.8s → <1.5s (expected 15-20% reduction)
- Performance score: 89/100 → >90/100
- Scripts no longer block initial render
- Fonts render faster with less layout shift
- Reduced critical request chain length

LIGHTHOUSE ISSUES ADDRESSED:
✓ Render-blocking scripts eliminated
✓ Font loading optimized with preload hints
✓ Critical resources prioritized

FILES MODIFIED:
- public/docs.html (added defer to 6 scripts, preload 2 fonts)

NEXT STEPS:
Deploy to production and run Lighthouse audit to verify improvements.

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-19 21:22:05 +13:00
..
metrics perf(docs): improve LCP with deferred scripts and font preloading 2025-10-19 21:22:05 +13:00
sessions feat: fix CSP violations & implement three audience paths 2025-10-07 12:21:00 +13:00
instruction-history.json chore(framework): update instruction history and hook metrics 2025-10-19 12:48:21 +13:00
instruction-history.json.backup-20251012-143441 feat: newsletter modal and deployment script enhancements 2025-10-14 13:11:46 +13:00
plan-registry.json feat: comprehensive accessibility improvements (WCAG 2.1 AA) 2025-10-12 07:08:40 +13:00
tractatus-config.json feat: ACTIVATE Tractatus Governance Framework 🤖 2025-10-07 09:22:05 +13:00