From bc377c0a157816f94144a6bdecdd1cbdc3fdd300 Mon Sep 17 00:00:00 2001 From: Pastorsimon1798 Date: Tue, 26 May 2026 20:20:30 -0700 Subject: [PATCH] fix: add window.ERAS initialization from PROJECT_DATA; dynamic key-person callout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - window.ERAS was declared empty but never populated — era map charts always blank. Added initEras() IIFE that reads from PROJECT_DATA on load + data-loaded event. Supports both {eras:[]} and bare list shapes in commit_eras. - Era card section: fixed data path to handle both shapes - Replace hardcoded personal narrative callout with dynamic LEARNING.keyPerson block (renders only if learning.keyPerson is set in data.json; hidden otherwise) --- archaeology/visualization/template.html | 46 ++++++++++++++++++------- 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/archaeology/visualization/template.html b/archaeology/visualization/template.html index 0681d6f..1e25a87 100644 --- a/archaeology/visualization/template.html +++ b/archaeology/visualization/template.html @@ -441,15 +441,16 @@

Hidden Patterns<

The Learning Curve

2,470 AI videos watched over 3 years (1,481 in 2025–2026 analyzed here). 815 creators (all-time). 3 years of self-directed education that made 43 days of building possible.

-
-
- 🌟 - KEY PERSON — Jake Van Clief -
-

- Jake invented ICM (Interpreted Context Methodology) — the "folder system" that broke the iteration trap. His video on the topic was watched in Oct 2025 during the Ramp phase. Simon's first-ever PR was to Jake's ICM repo (the workspaces commit on Feb 22). A second PR to mcp-video was merged into an MCP aggregator on GitHub. ICM is why Simon could stop iterating through frameworks and start shipping. -

-
+
+
The 3-Year Learning Arc — Monthly AI Video Consumption (2023–2026)
Topic Evolution — How Viewing Focus Shifted Before and During the Build
@@ -549,9 +550,27 @@ // Shared state window.ERA_BRUSH = { activeEra: null, startDate: null, endDate: null }; window.CHARTS = {}; -// ERAS is populated from data.json via the fetch() call above. -// Fallback to empty array if data hasn't loaded yet. window.ERAS = []; +// Populate ERAS from PROJECT_DATA once available +(function initEras() { + const ERA_PALETTE = ['#3b82f6','#8b5cf6','#10b981','#f59e0b','#ef4444','#ec4899']; + function buildEras(d) { + if (!d) return; + const tv = d.telemetry_visualizations || {}; + let raw = []; + // Support both {eras:[...]} and bare list + if (tv.commit_eras && Array.isArray(tv.commit_eras)) raw = tv.commit_eras; + else if (tv.commit_eras && Array.isArray(tv.commit_eras.eras)) raw = tv.commit_eras.eras; + else if (Array.isArray(d.commit_eras)) raw = d.commit_eras; + window.ERAS = raw.map((e, i) => ({ + ...e, + color: e.color || ERA_PALETTE[i % ERA_PALETTE.length], + hex: e.hex || ERA_PALETTE[i % ERA_PALETTE.length], + })); + } + if (window.PROJECT_DATA) { buildEras(window.PROJECT_DATA); } + window.addEventListener('data-loaded', function() { buildEras(window.PROJECT_DATA); }); +})(); window.COLORS = { bg:'#080c14', surface:'#0d1117', surface2:'#161b22', border:'#1e2a3a', @@ -2415,8 +2434,9 @@ const container = document.getElementById('era-cards-container'); if (!container) return; - // Get era data from commit_eras - const eraData = D.telemetry_visualizations.commit_eras.eras || []; + // Get era data — support both {eras:[]} and bare list in telemetry_visualizations.commit_eras + const _ce = (D.telemetry_visualizations || {}).commit_eras || {}; + const eraData = Array.isArray(_ce) ? _ce : (_ce.eras || D.commit_eras || []); const eraMap = {}; eraData.forEach(e => { eraMap[e.id] = e; });