tractatus/public/js/components
TheFlow bcc4a4e844 fix(demos): resolve initialization timing for pressure chart and activity timeline
SUMMARY:
Fixed critical bug preventing pressure chart and activity timeline demos
from initializing. Both components now work correctly on architecture page.

ROOT CAUSE:
Scripts loaded at end of body after DOM was already ready. DOMContentLoaded
event had already fired, so initialization callback never executed.

FIX:
Changed initialization to check document.readyState before adding event listener:
- If DOM still loading → wait for DOMContentLoaded event
- If DOM already ready → initialize immediately

FILES FIXED:
- public/js/components/pressure-chart.js (lines 213-227)
- public/js/components/activity-timeline.js (lines 124-137)

IMPACT:
Both demos now function correctly:
✓ Pressure chart: Simulate button works, gauge animates, metrics update
✓ Activity timeline: Governance flow displays with service colors

TESTING:
Verified locally on http://localhost:9000/architecture.html
Both demos initialize and respond to user interactions.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-19 22:10:14 +13:00
..
activity-timeline.js fix(demos): resolve initialization timing for pressure chart and activity timeline 2025-10-19 22:10:14 +13:00
code-copy-button.js feat(phase3): add code snippet copy buttons and collapsible TOC 2025-10-19 15:27:33 +13:00
coming-soon-overlay.js fix(csp): clean all public-facing pages - 75 violations fixed (66%) 2025-10-19 13:17:50 +13:00
currency-selector.js feat: add multi-currency support and privacy policy to Koha system 2025-10-08 15:17:23 +13:00
document-cards.js feat: comprehensive accessibility improvements (WCAG 2.1 AA) 2025-10-12 07:08:40 +13:00
document-viewer.js style(ui): update theme, branding, and GitHub repository links 2025-10-19 12:48:29 +13:00
footer.js feat(i18n): add footer and privacy page translations (en/de/fr) 2025-10-19 14:44:14 +13:00
interactive-diagram.js fix(interactive): fix diagram sizing (75% reduction) and improve SVG detection 2025-10-19 18:35:13 +13:00
language-selector.js refactor(i18n): simplify language selector to icons-only for all devices 2025-10-17 09:07:42 +13:00
navbar.js style(ui): update theme, branding, and GitHub repository links 2025-10-19 12:48:29 +13:00
pressure-chart.js fix(demos): resolve initialization timing for pressure chart and activity timeline 2025-10-19 22:10:14 +13:00
toc.js feat(phase3): add code snippet copy buttons and collapsible TOC 2025-10-19 15:27:33 +13:00