diff --git a/.claude/metrics/hooks-metrics.json b/.claude/metrics/hooks-metrics.json index 5596e328..1b6c67f2 100644 --- a/.claude/metrics/hooks-metrics.json +++ b/.claude/metrics/hooks-metrics.json @@ -4423,6 +4423,34 @@ "file": "/home/theflow/projects/tractatus/public/architecture.html", "result": "passed", "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-19T05:33:42.582Z", + "file": "/home/theflow/projects/tractatus/public/architecture.html", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-19T05:34:01.479Z", + "file": "/home/theflow/projects/tractatus/public/architecture.html", + "result": "blocked", + "reason": "CSP violations in content after edit" + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-19T05:34:19.187Z", + "file": "/home/theflow/projects/tractatus/public/architecture.html", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-19T05:34:38.058Z", + "file": "/home/theflow/projects/tractatus/public/js/components/interactive-diagram.js", + "result": "passed", + "reason": null } ], "blocks": [ @@ -4659,12 +4687,18 @@ "timestamp": "2025-10-19T03:47:31.242Z", "file": "/home/theflow/projects/tractatus/public/architecture.html", "reason": "CSP violations in content after edit" + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-19T05:34:01.479Z", + "file": "/home/theflow/projects/tractatus/public/architecture.html", + "reason": "CSP violations in content after edit" } ], "session_stats": { - "total_edit_hooks": 447, - "total_edit_blocks": 34, - "last_updated": "2025-10-19T05:29:56.732Z", + "total_edit_hooks": 451, + "total_edit_blocks": 35, + "last_updated": "2025-10-19T05:34:38.058Z", "total_write_hooks": 185, "total_write_blocks": 5 } diff --git a/public/architecture.html b/public/architecture.html index 167c467d..157e1667 100644 --- a/public/architecture.html +++ b/public/architecture.html @@ -333,16 +333,16 @@
- +
- Tractatus Architecture Diagram + Tractatus Architecture Diagram
@@ -521,7 +521,7 @@ - + diff --git a/public/js/components/interactive-diagram.js b/public/js/components/interactive-diagram.js index 5ccb675f..f9cf24cf 100644 --- a/public/js/components/interactive-diagram.js +++ b/public/js/components/interactive-diagram.js @@ -149,11 +149,18 @@ class InteractiveDiagram { console.log('[InteractiveDiagram] Using documentElement as SVG'); } - if (!svg || (svg.tagName && svg.tagName.toLowerCase() !== 'svg')) { + if (!svg) { console.warn('[InteractiveDiagram] SVG diagram not found in contentDocument'); return; } + // Verify it's actually an SVG element (case-insensitive check) + const tagName = svg.tagName ? svg.tagName.toLowerCase() : ''; + if (tagName !== 'svg') { + console.warn('[InteractiveDiagram] Element found but not SVG, tagName:', tagName); + return; + } + // Store reference to SVG document for later use this.svgDoc = svgDoc; this.svg = svg;