tractatus/public
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
..
.well-known security: comprehensive security audit and hardening 2025-10-10 05:34:40 +13:00
about style(ui): update theme, branding, and GitHub repository links 2025-10-19 12:48:29 +13:00
admin style(ui): update theme, branding, and GitHub repository links 2025-10-19 12:48:29 +13:00
css feat(phase3): add data visualizations for context pressure and activity timeline 2025-10-19 20:49:26 +13:00
demos style(ui): update theme, branding, and GitHub repository links 2025-10-19 12:48:29 +13:00
downloads docs: regenerate PDFs and update documentation metadata 2025-10-14 10:53:48 +13:00
fonts fix(csp): clean all public-facing pages - 75 violations fixed (66%) 2025-10-19 13:17:50 +13:00
images feat(interactive): add clickable central core and improve desktop layout 2025-10-19 16:37:27 +13:00
js feat(phase3): add data visualizations for context pressure and activity timeline 2025-10-19 20:49:26 +13:00
koha fix(a11y): improve text contrast on koha transparency page 2025-10-19 14:07:38 +13:00
locales feat(messaging): revise homepage value proposition for strategic impact 2025-10-19 21:18:31 +13:00
about.html feat(phase3): implement smooth page transitions with fade effect 2025-10-19 20:44:25 +13:00
api-reference.html style(ui): update theme, branding, and GitHub repository links 2025-10-19 12:48:29 +13:00
architecture.html fix(accessibility): improve contrast ratios and add meta description 2025-10-19 20:55:04 +13:00
blog-post.html style(ui): update theme, branding, and GitHub repository links 2025-10-19 12:48:29 +13:00
blog.html style(ui): update theme, branding, and GitHub repository links 2025-10-19 12:48:29 +13:00
case-submission.html fix(csp): clean all public-facing pages - 75 violations fixed (66%) 2025-10-19 13:17:50 +13:00
check-version.html style(ui): update theme, branding, and GitHub repository links 2025-10-19 12:48:29 +13:00
docs-viewer.html feat(phase3): add code snippet copy buttons and collapsible TOC 2025-10-19 15:27:33 +13:00
docs.html perf(docs): improve LCP with deferred scripts and font preloading 2025-10-19 21:22:05 +13:00
faq.html fix(accessibility): improve contrast ratios and add meta description 2025-10-19 20:55:04 +13:00
favicon-new.svg fix(csp): clean all public-facing pages - 75 violations fixed (66%) 2025-10-19 13:17:50 +13:00
favicon.ico feat: implement Rule Manager and Project Manager admin systems 2025-10-11 17:16:51 +13:00
favicon.svg feat: comprehensive documentation improvements and GitHub integration 2025-10-09 14:33:14 +13:00
implementer.html fix(contact): replace personal email with research@agenticgovernance.digital 2025-10-19 21:00:38 +13:00
index.html feat(messaging): revise homepage value proposition for strategic impact 2025-10-19 21:18:31 +13:00
koha.html fix(accessibility): improve contrast ratios and add meta description 2025-10-19 20:55:04 +13:00
leader.html feat(phase3): implement smooth page transitions with fade effect 2025-10-19 20:44:25 +13:00
manifest.json style(ui): update theme, branding, and GitHub repository links 2025-10-19 12:48:29 +13:00
media-inquiry.html fix(csp): clean all public-facing pages - 75 violations fixed (66%) 2025-10-19 13:17:50 +13:00
media-triage-transparency.html style(ui): update theme, branding, and GitHub repository links 2025-10-19 12:48:29 +13:00
privacy.html fix(i18n): add cache-busting version strings to privacy page scripts 2025-10-19 14:56:25 +13:00
researcher.html feat(phase3): implement smooth page transitions with fade effect 2025-10-19 20:44:25 +13:00
service-worker.js style(ui): update theme, branding, and GitHub repository links 2025-10-19 12:48:29 +13:00
version.json style(ui): update theme, branding, and GitHub repository links 2025-10-19 12:48:29 +13:00