In this section
- Code Map — V04 Block Register Links Page render · globalgrid2050 / testcode/202609141754/code-map/v04-block-register-links/index.html lines 1–59
- Code Map — V05 Chord Dependencies Page render · globalgrid2050 / testcode/202609141754/code-map/v05-chord-dependencies/index.html lines 1–53
- Code Map — V06 Treemap Page render · globalgrid2050 / testcode/202609141754/code-map/v06-treemap/index.html lines 1–60
- Code Map — V07 Flow Page render · globalgrid2050 / testcode/202609141754/code-map/v07-flow/index.html lines 1–60
- Code Map — V08 Ring Navigation Page render · globalgrid2050 / testcode/202609141754/code-map/v08-ring-navigation/index.html lines 1–85
- Code Map — V09 Line View Page render · globalgrid2050 / testcode/202609141754/code-map/v09-line-view/index.html lines 1–62
- Code Map — V10 Code Browser Page render · globalgrid2050 / testcode/202609141754/code-map/v10-code-browser/index.html lines 1–71
- Coder Walk R2 Probe render · globalgrid2050 / testcode/202609142225/proof/coder-walk-r2-probe.mjs lines 1–32
- Coder Walk R2 Probe2 render · globalgrid2050 / testcode/202609142225/proof/coder-walk-r2-probe2.mjs lines 1–23
Code Map — V04 Block Register Links Page
A web page in the testcode folder of GlobalGrid2050 that opens family (`openFamily`) and draws SVG graphics. Published at https://globalgrid2050.com/testcode/202609141754/code-map/v04-block-register-links/.
renderglobalgrid2050 / testcode/202609141754/code-map/v04-block-register-links/index.html · lines 1–59 of 59 · version 2026-09-14 17:54 · Entry point · pattern arrows (shared by 2 files)
- What it does
- It draws its content. Defines build, arrows, line, pick, openFamily. Side effects: changes the web page (DOM).
- Why it exists in the grid workflow
- Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
- Inputs & outputs
- Out: web page; SVG drawing.
- Downstream impact
- Used directly by 1 file: Testcode — Code Map Page (globalgrid2050, https://globalgrid2050.com/testcode/202609141754/code-map/). Reached from 1 other entry point, including Testcode — Code Navigation Page (globalgrid2050, https://globalgrid2050.com/testcode/202609141754/code-navigation/). It is itself an entry point, published at https://globalgrid2050.com/testcode/202609141754/code-map/v04-block-register-links/.
- What it achieves
- It opens family (`openFamily`) and is built from the build step (`build`) and the arrows step (`arrows`). V04 block register with dependencies. It responds to resize events.
- Why it matters
- Loaded by the Code Map page at https://globalgrid2050.com/testcode/202609141754/code-map/.
- Application
- globalgrid2050 · testcode/202609141754/code-map/v04-block-register-links · page
- Uses
- Corporate (script src), Testcode — Code Map (script src)
- Used by
- linked from Testcode — Code Map Page (link)
- Produces
- build, arrows, line, pick, openFamily
- Defines here
- build, arrows, line, pick, openFamily
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609141754/code-map/v04-block-register-links/index.html:1-59 · blob bc123a130bff18a37a38316e6413173ed2fe28f8 · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: output · effects: dom · domain stage: experimental · users: none · canonical: production_core
<!doctype html>
<html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>GlobalGrid2050 · v04 block register with dependencies</title>
<script>window.BUILT='2026-09-14 17:54'</script>
<script src="../../corporate.js"></script>
<script src="../core.js"></script>
<style>
#board{position:relative}
.cat{margin:10px 0 4px;font-size:11px;letter-spacing:.08em;text-transform:uppercase}
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(64px,1fr));gap:4px}
.tile{background:#12151c;border:1px solid #2a3140;border-top:3px solid var(--c);border-radius:6px;padding:4px;cursor:pointer;min-height:48px;position:relative}
.tile b{font-size:15px;color:#eef2fb;display:block}.tile small{font-size:9px;color:#8b93a7;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.tile .n{position:absolute;top:2px;right:4px;font-size:9px;color:#566079}
.tile.on{outline:2px solid #00e5ff}.tile.dep{outline:2px solid #ffd54a}.tile.use{outline:2px solid #ff7ab6}.dim{opacity:.35}
#arrows{position:absolute;inset:0;pointer-events:none;overflow:visible}
</style>
<h1>GLOBALGRID2050</h1><div class="u-count" id="count">Loading the code map…</div>
<div id="search"></div><div id="trail"></div><div id="legend"></div>
<div class="u-muted">The block register: the 207 named blocks as tiles. Tap a tile: arrows go to the blocks it depends on (yellow) and come from the blocks that use it (pink), and its function families open below.</div>
<div id="board"><svg id="arrows"></svg><div id="grid"></div></div>
<div class="u-panel" id="block" hidden></div><div class="u-panel" id="panel" hidden></div>
<script>
const G = $('#grid'), A = $('#arrows'), B = $('#block'), P = $('#panel'); const NS = 'http://www.w3.org/2000/svg'; let current = null;
function build() {
G.innerHTML = '';
for (const c of U.cats) {
const list = U.blocks.filter(b => b.category === c.id).sort((a, b) => a.number - b.number); if (!list.length) continue;
G.append(el('div', { class: 'cat', style: `color:${c.colour}` }, `${catName(c)} · ${list.length}`));
G.append(el('div', { class: 'tiles' }, list.map(b => el('div', { class: 'tile', 'data-sym': b.symbol, style: `--c:${c.colour}`, title: `${blockTitle(b)}: ${blockDesc(b)}`, on: { click: () => pick(b.symbol) } }, el('span', { class: 'n' }, b.number), el('b', {}, b.symbol), el('small', {}, blockTitle(b)), el('small', {}, `${blockFamilies(b.symbol).length} fam`)))));
}
G.append(el('div', { class: 'cat', style: 'color:#566079' }, `Not yet named · ${U.unnamed.length} groups (search a function to reach them)`));
}
function arrows(sym) {
A.innerHTML = '<defs><marker id="m" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M0,0L10,5L0,10z" fill="context-stroke"/></marker></defs>';
const box = $('#board').getBoundingClientRect(); const at = s => { const t = G.querySelector(`[data-sym="${CSS.escape(s)}"]`); if (!t) return null; const r = t.getBoundingClientRect(); return { x: r.left - box.left + r.width / 2, y: r.top - box.top + r.height / 2, t }; };
const me = at(sym); if (!me) return;
G.querySelectorAll('.tile').forEach(t => t.className = 'tile dim'); me.t.className = 'tile on';
const line = (a, b, col) => { const p = document.createElementNS(NS, 'path'); const mx = (a.x + b.x) / 2, my = Math.min(a.y, b.y) - 30; p.setAttribute('d', `M${a.x},${a.y}Q${mx},${my} ${b.x},${b.y}`); p.setAttribute('stroke', col); p.setAttribute('fill', 'none'); p.setAttribute('stroke-width', '1.6'); p.setAttribute('marker-end', 'url(#m)'); p.setAttribute('opacity', '.85'); A.append(p); };
for (const d of blockDeps(sym)) { const o = at(d); if (o) { o.t.className = 'tile dep'; line(me, o, REL['depends on']); } }
for (const u of blockUsers(sym)) { const o = at(u); if (o) { o.t.className = 'tile use'; line(o, me, REL['used by']); } }
}
function pick(sym) {
current = sym; trailPush('block', sym, blockLabel(sym)); if (U.bySym.has(sym)) arrows(sym);
const b = U.bySym.get(sym) || {}; const fams = blockFamilies(sym);
B.hidden = false; B.innerHTML = '';
B.append(el('div', { class: 'u-h' }, blockLabel(sym)), el('div', { class: 'u-muted' }, `${blockDesc(b)} Contains ${fams.length} function families.`),
el('div', { class: 'u-links' }, b.symbol ? el('a', { class: 'u-chip', href: blockPage(sym), target: '_blank', rel: 'noopener' }, 'Block page ↗') : null,
...blockDeps(sym).map(d => el('button', { class: 'u-chip', style: `border-color:${REL['depends on']}`, on: { click: () => pick(d) } }, `depends on → ${d}`)),
...blockUsers(sym).slice(0, 30).map(d => el('button', { class: 'u-chip', style: `border-color:${REL['used by']}`, on: { click: () => pick(d) } }, `← used by ${d}`))),
el('div', { class: 'u-sub', style: `color:${REL.contains}` }, 'contains'),
pageList(el('div', { class: 'u-links' }), fams, n => el('button', { class: 'u-chip', on: { click: () => openFamily(n) } }, `#${n}`), 100, 'families'));
B.scrollIntoView({ behavior: 'smooth', block: 'start' });
}
async function openFamily(n) { P.hidden = false; await showFamilyPanel(n, P, openFamily, pick); P.scrollIntoView({ behavior: 'smooth', block: 'start' }); }
window.goHome = () => { A.innerHTML = ''; G.querySelectorAll('.tile').forEach(t => t.className = 'tile'); B.hidden = P.hidden = true; scrollTo(0, 0); };
window.goTo = (k, id) => k === 'block' ? pick(id) : k === 'family' ? openFamily(id) : goHome();
addEventListener('resize', () => current && U.bySym.has(current) && arrows(current));
loadUniverse().then(() => { $('#count').textContent = countsLine(); legend($('#legend')); mountSearch($('#search'), openFamily); renderTrail(); build(); openAddress(); footer('v04-block-register-links'); }).catch(e => fail('#count', e));
</script>Code Map — V05 Chord Dependencies Page
A web page in the testcode folder of GlobalGrid2050 that opens family (`openFamily`) and draws SVG graphics. Published at https://globalgrid2050.com/testcode/202609141754/code-map/v05-chord-dependencies/. It opens family (`openFamily`).
renderglobalgrid2050 / testcode/202609141754/code-map/v05-chord-dependencies/index.html · lines 1–53 of 53 · version 2026-09-14 17:54 · Entry point · pattern openFamily (shared by 24 files)
- What it does
- It draws its content. Defines 6 functions or classes, including sv, draw, p, xy, pick. Side effects: changes the web page (DOM).
- Why it exists in the grid workflow
- Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
- Inputs & outputs
- Out: web page; SVG drawing.
- Downstream impact
- Used directly by 1 file: Testcode — Code Map Page (globalgrid2050, https://globalgrid2050.com/testcode/202609141754/code-map/). Reached from 1 other entry point, including Testcode — Code Navigation Page (globalgrid2050, https://globalgrid2050.com/testcode/202609141754/code-navigation/). It is itself an entry point, published at https://globalgrid2050.com/testcode/202609141754/code-map/v05-chord-dependencies/.
- What it achieves
- Defines `draw`, `pick` and `openFamily`. It responds to click events.
- Why it matters
- Loaded by the Code Map page at https://globalgrid2050.com/testcode/202609141754/code-map/.
- Application
- globalgrid2050 · testcode/202609141754/code-map/v05-chord-dependencies · page
- Uses
- Corporate (script src), Testcode — Code Map (script src)
- Used by
- linked from Testcode — Code Map Page (link)
- Produces
- sv, draw, p, xy, pick, openFamily
- Defines here
- sv, draw, p, xy, pick, openFamily
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609141754/code-map/v05-chord-dependencies/index.html:1-53 · blob 2d8feff596ec158a91d8f6ec90e0f5fa8be03ede · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: output · effects: dom · domain stage: experimental · users: none · canonical: production_core
<!doctype html>
<html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>GlobalGrid2050 · v05 chord dependencies</title>
<script>window.BUILT='2026-09-14 17:54'</script>
<script src="../../corporate.js"></script>
<script src="../core.js"></script>
<style>
#wrap{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-start}
svg{width:min(94vw,680px);height:auto}
.arc{cursor:pointer}.arc:hover{filter:brightness(1.4)}
.chord{fill:none;stroke-width:1.1;opacity:.28}.chord.hot{opacity:.95;stroke-width:2}
.lbl{fill:#8b93a7;font-size:8px}
#side{flex:1;min-width:280px}
</style>
<h1>GLOBALGRID2050</h1><div class="u-count" id="count">Loading the code map…</div>
<div id="search"></div><div id="trail"></div><div id="legend"></div>
<div id="wrap"><svg id="ch" viewBox="-340 -340 680 680"></svg><div id="side"><div class="u-panel" id="block">Every chord is one "depends on" relationship between two named blocks. Tap a block's arc to highlight its chords and open it.</div><div class="u-panel" id="panel" hidden></div></div></div>
<script>
const NS = 'http://www.w3.org/2000/svg', S = $('#ch'), B = $('#block'), P = $('#panel'); const pos = new Map();
const sv = (t, a) => { const e = document.createElementNS(NS, t); for (const k in a) e.setAttribute(k, a[k]); return e; };
function draw() {
S.innerHTML = ''; const order = []; for (const c of U.cats) for (const b of U.blocks.filter(x => x.category === c.id)) order.push(b);
const gap = 0.004, step = (Math.PI * 2) / order.length; const R = 270;
order.forEach((b, i) => {
const a0 = i * step, a1 = a0 + step - gap, m = (a0 + a1) / 2; pos.set(b.symbol, m);
const p = (r, a) => `${r * Math.cos(a - Math.PI / 2)},${r * Math.sin(a - Math.PI / 2)}`;
const path = sv('path', { d: `M${p(R, a0)}A${R},${R} 0 0 1 ${p(R, a1)}L${p(R + 14, a1)}A${R + 14},${R + 14} 0 0 0 ${p(R + 14, a0)}Z`, fill: catColour(b.category), class: 'arc' });
path.append(sv('title', {})); path.firstChild.textContent = `${blockLabel(b.symbol)} · ${blockFamilies(b.symbol).length} families`;
path.addEventListener('click', () => pick(b.symbol)); S.append(path);
const t = sv('text', { class: 'lbl', transform: `rotate(${(m * 180) / Math.PI - 90}) translate(${R + 18},0)${m > Math.PI ? ' rotate(180)' : ''}`, 'text-anchor': m > Math.PI ? 'end' : 'start', 'dominant-baseline': 'middle' }); t.textContent = b.symbol; S.append(t);
});
const xy = a => [R * 0.98 * Math.cos(a - Math.PI / 2), R * 0.98 * Math.sin(a - Math.PI / 2)]; let n = 0;
for (const b of order) for (const d of blockDeps(b.symbol)) {
if (!pos.has(d)) continue; const [x0, y0] = xy(pos.get(b.symbol)), [x1, y1] = xy(pos.get(d));
S.append(sv('path', { d: `M${x0},${y0}Q0,0 ${x1},${y1}`, class: 'chord', stroke: catColour(b.category), 'data-a': b.symbol, 'data-b': d })); n++;
}
$('#count').textContent = `${countsLine()} · ${n} depends-on chords between named blocks`;
}
function pick(sym) {
trailPush('block', sym, blockLabel(sym));
S.querySelectorAll('.chord').forEach(c => { const hotOut = c.dataset.a === sym, hotIn = c.dataset.b === sym; c.classList.toggle('hot', hotOut || hotIn); if (hotOut) c.setAttribute('stroke', REL['depends on']); else if (hotIn) c.setAttribute('stroke', REL['used by']); });
const b = U.bySym.get(sym) || {}; const fams = blockFamilies(sym); B.innerHTML = '';
B.append(el('div', { class: 'u-h' }, blockLabel(sym)), el('div', { class: 'u-muted' }, `${blockDesc(b)} Yellow chords: depends on. Pink: used by. ${fams.length} families.`),
el('div', { class: 'u-links' }, b.symbol ? el('a', { class: 'u-chip', href: blockPage(sym), target: '_blank', rel: 'noopener' }, 'Block page ↗') : null,
...blockDeps(sym).map(d => el('button', { class: 'u-chip', style: `border-color:${REL['depends on']}`, on: { click: () => pick(d) } }, `→ ${d}`)),
...blockUsers(sym).slice(0, 30).map(d => el('button', { class: 'u-chip', style: `border-color:${REL['used by']}`, on: { click: () => pick(d) } }, `← ${d}`))),
pageList(el('div', { class: 'u-links' }), fams, n => el('button', { class: 'u-chip', on: { click: () => openFamily(n) } }, `#${n}`), 100, 'families'));
}
async function openFamily(n) { P.hidden = false; await showFamilyPanel(n, P, openFamily, pick); P.scrollIntoView({ behavior: 'smooth', block: 'start' }); }
window.goHome = () => { S.querySelectorAll('.chord').forEach(c => c.classList.remove('hot')); P.hidden = true; };
window.goTo = (k, id) => k === 'block' ? pick(id) : k === 'family' ? openFamily(id) : goHome();
loadUniverse().then(() => { legend($('#legend')); mountSearch($('#search'), openFamily); renderTrail(); draw(); openAddress(); footer('v05-chord-dependencies'); }).catch(e => fail('#count', e));
</script>Code Map — V06 Treemap Page
A web page in the testcode folder of GlobalGrid2050 that shows cat (`showCat`) and block (`showBlock`) and opens family (`openFamily`). Published at https://globalgrid2050.com/testcode/202609141754/code-map/v06-treemap/.
renderglobalgrid2050 / testcode/202609141754/code-map/v06-treemap/index.html · lines 1–60 of 60 · version 2026-09-14 17:54 · Entry point · pattern squarify (shared by 2 files)
- What it does
- It draws its content. Defines squarify, render, showCat, showBlock, openFamily. Side effects: changes the web page (DOM).
- Why it exists in the grid workflow
- Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
- Inputs & outputs
- Out: web page.
- Downstream impact
- Used directly by 1 file: Testcode — Code Map Page (globalgrid2050, https://globalgrid2050.com/testcode/202609141754/code-map/). Reached from 1 other entry point, including Testcode — Code Navigation Page (globalgrid2050, https://globalgrid2050.com/testcode/202609141754/code-navigation/). It is itself an entry point, published at https://globalgrid2050.com/testcode/202609141754/code-map/v06-treemap/.
- What it achieves
- It shows cat (`showCat`), shows block (`showBlock`) and opens family (`openFamily`). Defines `squarify`, `render`, `showCat` and 2 more. It responds to resize events.
- Why it matters
- Loaded by the Code Map page at https://globalgrid2050.com/testcode/202609141754/code-map/.
- Application
- globalgrid2050 · testcode/202609141754/code-map/v06-treemap · page
- Uses
- Corporate (script src), Testcode — Code Map (script src)
- Used by
- linked from Testcode — Code Map Page (link)
- Produces
- squarify, render, showCat, showBlock, openFamily
- Defines here
- squarify, render, showCat, showBlock, openFamily
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609141754/code-map/v06-treemap/index.html:1-60 · blob 7e1a3282a09f65d0dac44b679175c6e17e2c434a · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: output · effects: dom · domain stage: experimental · users: none · canonical: production_core
<!doctype html>
<html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>GlobalGrid2050 · v06 treemap</title>
<script>window.BUILT='2026-09-14 17:54'</script>
<script src="../../corporate.js"></script>
<script src="../core.js"></script>
<style>
#map{position:relative;width:100%;height:min(68vh,680px);border:1px solid #1f2633;border-radius:8px;overflow:hidden}
.cell{position:absolute;box-sizing:border-box;border:1px solid #0b0d12;overflow:hidden;cursor:pointer;padding:3px;font-size:11px;color:#0b0d12}
.cell:hover{filter:brightness(1.25)} .cell b{display:block}
</style>
<h1>GLOBALGRID2050</h1><div class="u-count" id="count">Loading the code map…</div>
<div id="search"></div><div id="trail"></div><div id="legend"></div>
<div class="u-muted" id="how">Area = function families. Tap a category, then a block; inside a block, area = numbered lines per family.</div>
<div id="map"></div><div class="u-panel" id="panel" hidden></div>
<script>
const M = $('#map'), P = $('#panel');
/* squarified treemap */
function squarify(items, x, y, w, h) {
const out = []; items = items.filter(i => i.w > 0).sort((a, b) => b.w - a.w); const total = items.reduce((s, i) => s + i.w, 0) || 1;
let rest = items.map(i => ({ ...i, a: (i.w / total) * w * h }));
while (rest.length) {
const short = Math.min(w, h); let row = [], worst = Infinity;
for (const it of rest) { const r = [...row, it]; const s = r.reduce((q, z) => q + z.a, 0); const wr = Math.max(...r.map(z => Math.max((short * short * z.a) / (s * s), (s * s) / (short * short * z.a)))); if (wr > worst && row.length) break; row = r; worst = wr; }
const s = row.reduce((q, z) => q + z.a, 0); const thick = s / short; let off = 0;
for (const z of row) { const len = z.a / thick; out.push(w >= h ? { ...z, x, y: y + off, w: thick, h: len } : { ...z, x: x + off, y, w: len, h: thick }); off += len; }
if (w >= h) { x += thick; w -= thick; } else { y += thick; h -= thick; }
rest = rest.slice(row.length);
}
return out;
}
function render(items, onClick) {
M.innerHTML = ''; const W = M.clientWidth, H = M.clientHeight;
for (const c of squarify(items.slice(0, 380), 0, 0, W, H)) M.append(el('div', { class: 'cell', style: `left:${c.x}px;top:${c.y}px;width:${c.w}px;height:${c.h}px;background:${c.colour}`, title: `${c.label} · ${c.sub}`, on: { click: () => onClick(c) } }, c.w > 40 && c.h > 18 ? el('b', {}, c.label) : null, c.w > 60 && c.h > 32 ? c.sub : null));
}
window.goHome = function () {
$('#how').textContent = 'Area = function families. Tap a category.';
const items = U.cats.map(c => ({ id: c.id, label: catName(c), colour: c.colour, w: U.blocks.filter(b => b.category === c.id).reduce((s, b) => s + blockFamilies(b.symbol).length, 0), sub: `${U.blocks.filter(b => b.category === c.id).length} blocks` }));
items.push({ id: '_unnamed', label: 'Not yet named', colour: '#566079', w: U.unnamed.reduce((s, g) => s + blockFamilies(g).length, 0), sub: `${U.unnamed.length} groups` });
items.forEach(i => i.sub += ` · ${i.w} families`);
render(items, c => { trailPush('cat', c.id, c.label); showCat(c.id); }); P.hidden = true;
};
window.goTo = (k, id) => k === 'cat' ? showCat(id) : k === 'block' ? showBlock(id) : openFamily(id);
function showCat(id) {
$('#how').textContent = 'Area = function families per block. Tap a block.';
const list = id === '_unnamed' ? U.unnamed.map(g => ({ symbol: g })) : U.blocks.filter(b => b.category === id);
render(list.map(b => ({ id: b.symbol, label: b.symbol, colour: catColour(id), w: Math.max(1, blockFamilies(b.symbol).length), sub: `${blockLabel(b.symbol)} · ${blockFamilies(b.symbol).length} families` })), c => showBlock(c.id));
}
async function showBlock(sym) {
trailPush('block', sym, blockLabel(sym));
const fams = blockFamilies(sym).slice(0, 120); const col = catColour((U.bySym.get(sym) || {}).category);
$('#how').textContent = `Loading ${fams.length} family records to size them by numbered lines…`;
const recs = await Promise.all(fams.map(n => family(n).then(r => ({ n, r })).catch(() => ({ n, r: null }))));
$('#how').textContent = `${blockLabel(sym)}: area = numbered lines per family (${fams.length} of ${blockFamilies(sym).length} shown). Tap one to read it.`;
render(recs.map(({ n, r }) => ({ id: n, label: `#${n} ${famName(r)}`, colour: col, w: r ? r.lines.length : 1, sub: r ? `${r.lines.length} lines` : 'record missing' })), c => openFamily(c.id));
}
async function openFamily(n) { P.hidden = false; await showFamilyPanel(n, P, openFamily, showBlock); P.scrollIntoView({ behavior: 'smooth', block: 'start' }); }
addEventListener('resize', () => { const last = U.trail[U.trail.length - 1]; last ? goTo(last.kind, last.id) : goHome(); });
loadUniverse().then(() => { $('#count').textContent = countsLine(); legend($('#legend')); mountSearch($('#search'), openFamily); renderTrail(); goHome(); openAddress(); footer('v06-treemap'); }).catch(e => fail('#count', e));
</script>Code Map — V07 Flow Page
A web page in the testcode folder of GlobalGrid2050 that shows block (`showBlock`), opens family (`openFamily`) and draws SVG graphics. Published at https://globalgrid2050.com/testcode/202609141754/code-map/v07-flow/.
renderglobalgrid2050 / testcode/202609141754/code-map/v07-flow/index.html · lines 1–60 of 60 · version 2026-09-14 17:54 · Entry point · pattern repoOf (shared by 8 files)
- What it does
- It draws its content. Defines 8 functions or classes, including sv, draw, repoOf, place, band. Side effects: changes the web page (DOM).
- Why it exists in the grid workflow
- Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
- Inputs & outputs
- Out: web page; SVG drawing.
- Downstream impact
- Used directly by 1 file: Testcode — Code Map Page (globalgrid2050, https://globalgrid2050.com/testcode/202609141754/code-map/). Reached from 1 other entry point, including Testcode — Code Navigation Page (globalgrid2050, https://globalgrid2050.com/testcode/202609141754/code-navigation/). It is itself an entry point, published at https://globalgrid2050.com/testcode/202609141754/code-map/v07-flow/.
- What it achieves
- It shows block (`showBlock`) and opens family (`openFamily`). Defines `draw`, `repoOf`, `place` and 4 more. It responds to click events.
- Why it matters
- Loaded by the Code Map page at https://globalgrid2050.com/testcode/202609141754/code-map/.
- Application
- globalgrid2050 · testcode/202609141754/code-map/v07-flow · page
- Uses
- Corporate (script src), Testcode — Code Map (script src)
- Used by
- linked from Testcode — Code Map Page (link)
- Produces
- sv, draw, repoOf, place, band, hot, showBlock, openFamily
- Defines here
- sv, draw, repoOf, place, band, hot, showBlock, openFamily
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609141754/code-map/v07-flow/index.html:1-60 · blob 40e81607c0da44ccfe57016628a747455d409749 · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: output · effects: dom · domain stage: experimental · users: none · canonical: production_core
<!doctype html>
<html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>GlobalGrid2050 · v07 flow</title>
<script>window.BUILT='2026-09-14 17:54'</script>
<script src="../../corporate.js"></script>
<script src="../core.js"></script>
<style>
#box{overflow-x:auto;border:1px solid #1f2633;border-radius:8px}
svg{display:block;min-width:720px}
.node{cursor:pointer}.node:hover rect{filter:brightness(1.4)}
.band{fill:none;opacity:.22}.band.hot{opacity:.8}
.t{fill:#d8dee9;font-size:11px}
</style>
<h1>GLOBALGRID2050</h1><div class="u-count" id="count">Loading the code map…</div>
<div id="search"></div><div id="trail"></div><div id="legend"></div>
<div class="u-muted">Left: repositories. Middle: categories. Right: blocks. Band thickness = how many blocks a repository carries into a category. Tap a repository, category or block to follow its bands.</div>
<div id="box"><svg id="flow"></svg></div>
<div class="u-panel" id="block" hidden></div><div class="u-panel" id="panel" hidden></div>
<script>
const NS = 'http://www.w3.org/2000/svg', S = $('#flow'), B = $('#block'), P = $('#panel');
const sv = (t, a) => { const e = document.createElementNS(NS, t); for (const k in a) e.setAttribute(k, a[k]); return e; };
let focusBlocks = null;
function draw() {
S.innerHTML = '';
const blocks = focusBlocks ? U.blocks.filter(b => focusBlocks.has(b.symbol)) : U.blocks;
const repoOf = b => (b.repos || []).map(r => r.replace('Ventusltd/', ''));
const repos = [...new Set(blocks.flatMap(repoOf))].sort(); const cats = U.cats.filter(c => blocks.some(b => b.category === c.id));
const right = [...blocks].sort((a, b) => a.category.localeCompare(b.category) || a.number - b.number).slice(0, 120);
const H = Math.max(420, right.length * 14 + 40), W = 900; S.setAttribute('viewBox', `0 0 ${W} ${H}`); S.setAttribute('height', H);
const place = (list, x, key) => { const gap = (H - 20) / Math.max(1, list.length); return new Map(list.map((it, i) => [key(it), { x, y: 10 + i * gap + gap / 2, it }])); };
const pr = place(repos, 150, r => r), pc = place(cats, 450, c => c.id), pb = place(right, 640, b => b.symbol);
const band = (a, b, w, col, tag) => S.append(sv('path', { d: `M${a.x},${a.y}C${(a.x + b.x) / 2},${a.y} ${(a.x + b.x) / 2},${b.y} ${b.x},${b.y}`, class: 'band', stroke: col, 'stroke-width': Math.max(1, w), 'data-tag': tag }));
const rc = new Map(); for (const b of blocks) for (const r of repoOf(b)) rc.set(`${r}|${b.category}`, (rc.get(`${r}|${b.category}`) || 0) + 1);
for (const [k, n] of rc) { const [r, c] = k.split('|'); if (pr.get(r) && pc.get(c)) band(pr.get(r), pc.get(c), Math.sqrt(n) * 2.2, catColour(c), `r:${r} c:${c}`); }
for (const b of right) band(pc.get(b.category), pb.get(b.symbol), 1.4, catColour(b.category), `c:${b.category} b:${b.symbol} ${repoOf(b).map(r => 'r:' + r).join(' ')}`);
const label = (m, anchor, dx, text, onClick, colour) => { for (const [id, p] of m) { const g = sv('g', { class: 'node' }); g.append(sv('rect', { x: p.x - 4, y: p.y - 6, width: 8, height: 12, fill: colour(p.it) })); const t = sv('text', { x: p.x + dx, y: p.y + 4, class: 't', 'text-anchor': anchor }); t.textContent = text(p.it); g.append(t); g.addEventListener('click', () => onClick(id, p.it)); S. … [line shortened here: 415 characters; full line on GitHub]
label(pr, 'end', -8, r => r, id => hot(`r:${id}`), () => '#9fd8ff'); // repository names stay names
label(pc, 'middle', 0, c => '', id => hot(`c:${id}`), c => c.colour);
for (const [id, p] of pc) { const t = sv('text', { x: p.x, y: p.y - 10, class: 't', 'text-anchor': 'middle' }); t.textContent = catName(p.it); S.append(t); }
label(pb, 'start', 8, b => `${b.symbol} · ${blockTitle(b)}`.slice(0, 38), id => showBlock(id), b => catColour(b.category));
$('#count').textContent = `${countsLine()} · ${repos.length} repositories${focusBlocks ? ' (filtered)' : ''}${U.blocks.length > 120 && !focusBlocks ? ' · first 120 blocks listed on the right' : ''}`;
}
function hot(tag) { S.querySelectorAll('.band').forEach(p => p.classList.toggle('hot', p.dataset.tag.split(' ').includes(tag))); }
function showBlock(sym) {
trailPush('block', sym, blockLabel(sym)); if (U.bySym.has(sym)) hot(`b:${sym}`);
const b = U.bySym.get(sym) || {}; const fams = blockFamilies(sym); B.hidden = false; B.innerHTML = '';
B.append(el('div', { class: 'u-h' }, blockLabel(sym)), el('div', { class: 'u-muted' }, `${blockDesc(b)} In ${(b.repos || []).length} repositories. ${fams.length} families.`),
el('div', { class: 'u-links' }, b.symbol ? el('a', { class: 'u-chip', href: blockPage(sym), target: '_blank', rel: 'noopener' }, 'Block page ↗') : null,
el('button', { class: 'u-chip', on: { click: () => { focusBlocks = new Set([sym, ...blockDeps(sym), ...blockUsers(sym)]); draw(); hot(`b:${sym}`); } } }, 'Show only this block and its neighbours'),
el('button', { class: 'u-chip', on: { click: () => { focusBlocks = null; draw(); } } }, 'Show all'),
...blockDeps(sym).map(d => el('button', { class: 'u-chip', style: `border-color:${REL['depends on']}`, on: { click: () => showBlock(d) } }, `→ ${d}`)),
...blockUsers(sym).slice(0, 30).map(d => el('button', { class: 'u-chip', style: `border-color:${REL['used by']}`, on: { click: () => showBlock(d) } }, `← ${d}`))),
pageList(el('div', { class: 'u-links' }), fams, n => el('button', { class: 'u-chip', on: { click: () => openFamily(n) } }, `#${n}`), 100, 'families'));
B.scrollIntoView({ behavior: 'smooth', block: 'start' });
}
async function openFamily(n) { P.hidden = false; await showFamilyPanel(n, P, openFamily, showBlock); P.scrollIntoView({ behavior: 'smooth', block: 'start' }); }
window.goHome = () => { focusBlocks = null; draw(); B.hidden = P.hidden = true; };
window.goTo = (k, id) => k === 'block' ? showBlock(id) : k === 'family' ? openFamily(id) : goHome();
loadUniverse().then(() => { legend($('#legend')); mountSearch($('#search'), openFamily); renderTrail(); draw(); openAddress(); footer('v07-flow'); }).catch(e => fail('#count', e));
</script>Code Map — V08 Ring Navigation Page
A web page in the testcode folder of GlobalGrid2050 that opens block (`openBlock`) and fam (`openFam`) and draws SVG graphics. Published at https://globalgrid2050.com/testcode/202609141754/code-map/v08-ring-navigation/.
renderglobalgrid2050 / testcode/202609141754/code-map/v08-ring-navigation/index.html · lines 1–85 of 85 · version 2026-09-14 17:54 · Entry point · pattern openBlock (shared by 2 files)
- What it does
- It draws its content. Defines 6 functions or classes, including sv, pt, blockAt, draw, openBlock. Side effects: changes the web page (DOM).
- Why it exists in the grid workflow
- Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
- Inputs & outputs
- Out: web page; SVG drawing.
- Downstream impact
- Used directly by 1 file: Testcode — Code Map Page (globalgrid2050, https://globalgrid2050.com/testcode/202609141754/code-map/). Reached from 1 other entry point, including Testcode — Code Navigation Page (globalgrid2050, https://globalgrid2050.com/testcode/202609141754/code-navigation/). It is itself an entry point, published at https://globalgrid2050.com/testcode/202609141754/code-map/v08-ring-navigation/.
- What it achieves
- It opens block (`openBlock`) and opens fam (`openFam`). Defines `blockAt`, `draw`, `openBlock` and 1 more. It responds to click events.
- Why it matters
- Loaded by the Code Map page at https://globalgrid2050.com/testcode/202609141754/code-map/.
- Application
- globalgrid2050 · testcode/202609141754/code-map/v08-ring-navigation · page
- Uses
- Corporate (script src), Testcode — Code Map (script src)
- Used by
- linked from Testcode — Code Map Page (link)
- Produces
- sv, pt, blockAt, draw, openBlock, openFam
- Defines here
- sv, pt, blockAt, draw, openBlock, openFam
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609141754/code-map/v08-ring-navigation/index.html:1-85 · blob ddfea1e3e4b28422e6b40b6a89f31258d2e93d90 · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: output · effects: dom · domain stage: experimental · users: none · canonical: production_core
<!doctype html>
<html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>GlobalGrid2050 · v08 ring navigation</title>
<script>window.BUILT='2026-09-14 17:54'</script>
<script src="../../corporate.js"></script>
<script src="../core.js"></script>
<style>
#wrap{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-start}
svg{width:min(94vw,700px);height:auto;touch-action:manipulation}
.b,.f{cursor:pointer}.b:hover,.f:hover{filter:brightness(1.5)}
.lbl{fill:#8b93a7;font-size:8px;pointer-events:none}.big{fill:#eef2fb;font-size:14px;pointer-events:none}
.ar{fill:none;stroke-width:1.6;opacity:.9}
.journey{fill:none;stroke:#00e5ff;stroke-width:1;stroke-dasharray:3 3;opacity:.6}
#side{flex:1;min-width:280px}
</style>
<h1>GLOBALGRID2050</h1><div class="u-count" id="count">Loading the code map…</div>
<div id="search"></div><div id="trail"></div><div id="legend"></div>
<div id="wrap"><svg id="ring" viewBox="-350 -350 700 700"></svg>
<div id="side"><div class="u-panel" id="note"><b>Ring navigation.</b> The outer ring is every named block, round the full 360°. Tap a block: arrows cross the circle to what it depends on and what uses it, and its families form the inner ring. Tap a family: its numbered lines open, the families it uses and that use it are highlighted on the inner ring, and their blocks are highlighted on the outer … [line shortened here: 553 characters; full line on GitHub]
<script>
const NS = 'http://www.w3.org/2000/svg', S = $('#ring'), P = $('#panel');
const sv = (t, a) => { const e = document.createElementNS(NS, t); for (const k in a) e.setAttribute(k, a[k]); return e; };
const RB = 300, RF = 190; let order = [], angle = new Map(), curBlock = null, curFam = null, famAngle = new Map(), rec = null, path = [];
const pt = (r, a) => [r * Math.cos(a - Math.PI / 2), r * Math.sin(a - Math.PI / 2)];
function blockAt(sym) { if (angle.has(sym)) return angle.get(sym); return null; }
function draw() {
S.innerHTML = '<defs><marker id="m" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="5" markerHeight="5" orient="auto-start-reverse"><path d="M0,0L10,5L0,10z" fill="context-stroke"/></marker></defs>';
// outer ring: named blocks
const step = (Math.PI * 2) / order.length;
const lit = new Set(); if (curBlock) { blockDeps(curBlock).forEach(s => lit.add(s)); blockUsers(curBlock).forEach(s => lit.add(s)); }
const famBlocks = new Set(); if (rec) for (const u of [...(rec.uses || []), ...(rec.used_by || [])]) { const g = U.famToGroup.get(u.family); if (g) famBlocks.add(g); }
order.forEach((b, i) => {
const a = i * step + step / 2; angle.set(b.symbol, a); const [x, y] = pt(RB, a); const on = b.symbol === curBlock, l = lit.has(b.symbol) || famBlocks.has(b.symbol);
const c = sv('circle', { cx: x, cy: y, r: on ? 9 : l ? 6 : 3.2, fill: catColour(b.category), class: 'b', opacity: curBlock && !on && !l ? .35 : 1, stroke: on ? '#00e5ff' : famBlocks.has(b.symbol) ? '#39d353' : 'none', 'stroke-width': 2 });
c.append(sv('title', {})); c.firstChild.textContent = `${blockLabel(b.symbol)} · ${blockFamilies(b.symbol).length} families`; c.addEventListener('click', () => openBlock(b.symbol)); S.append(c);
if (on || l || order.length < 90) { const [tx, ty] = pt(RB + 16, a); const t = sv('text', { x: tx, y: ty, class: 'lbl', 'text-anchor': 'middle', 'dominant-baseline': 'middle', style: on ? 'fill:#00e5ff;font-size:11px' : '' }); t.textContent = b.symbol; S.append(t); }
});
// arrows across the circle for the current block
if (curBlock && angle.has(curBlock)) {
const [x0, y0] = pt(RB - 8, angle.get(curBlock));
for (const [list, col, rev] of [[blockDeps(curBlock), REL['depends on'], false], [blockUsers(curBlock), REL['used by'], true]]) for (const s of list) { if (!angle.has(s)) continue; const [x1, y1] = pt(RB - 8, angle.get(s)); S.append(sv('path', { class: 'ar', stroke: col, d: rev ? `M${x1},${y1}Q0,0 ${x0},${y0}` : `M${x0},${y0}Q0,0 ${x1},${y1}`, 'marker-end': 'url(#m)' })); }
}
// inner ring: families of the current block (or group)
famAngle.clear();
if (curBlock) {
const fams = blockFamilies(curBlock).slice(0, 150); const fs = (Math.PI * 2) / Math.max(fams.length, 1);
const nb = new Set(rec ? [...(rec.uses || []), ...(rec.used_by || [])].map(u => u.family) : []);
fams.forEach((n, i) => { const a = i * fs + fs / 2; famAngle.set(n, a); const [x, y] = pt(RF, a); const on = n === curFam, l = nb.has(n);
const c = sv('rect', { x: x - (on ? 6 : 3), y: y - (on ? 6 : 3), width: on ? 12 : 6, height: on ? 12 : 6, fill: on ? '#00e5ff' : l ? REL.uses : REL.contains, class: 'f', opacity: curFam && !on && !l ? .4 : 1 });
c.append(sv('title', {})); c.firstChild.textContent = `family #${n}`; c.addEventListener('click', () => openFam(n)); S.append(c); });
if (angle.has(curBlock)) { const [bx, by] = pt(RB - 10, angle.get(curBlock)); const [ix, iy] = pt(RF + 12, angle.get(curBlock)); S.append(sv('path', { class: 'ar', stroke: REL.contains, d: `M${bx},${by}L${ix},${iy}`, 'marker-end': 'url(#m)' })); }
if (rec) for (const u of [...(rec.uses || []).map(x => ({ ...x, d: 'uses' })), ...(rec.used_by || []).map(x => ({ ...x, d: 'used by' }))]) {
if (!famAngle.has(u.family) || !famAngle.has(curFam)) continue; const [x0, y0] = pt(RF - 8, famAngle.get(curFam)), [x1, y1] = pt(RF - 8, famAngle.get(u.family));
S.append(sv('path', { class: 'ar', stroke: REL[u.d], d: u.d === 'uses' ? `M${x0},${y0}Q0,0 ${x1},${y1}` : `M${x1},${y1}Q0,0 ${x0},${y0}`, 'marker-end': 'url(#m)' }));
}
}
// the centre
S.append(sv('circle', { r: 110, fill: '#0f1218', stroke: '#2a3140' }));
const t1 = sv('text', { y: -10, class: 'big', 'text-anchor': 'middle' }); t1.textContent = rec ? `#${curFam} ${famName(rec)}`.slice(0, 26) : curBlock ? curBlock : 'GLOBALGRID2050'; S.append(t1);
const t2 = sv('text', { y: 12, class: 'lbl', 'text-anchor': 'middle', style: 'font-size:10px' }); t2.textContent = rec ? `${rec.lines.length} numbered lines · read them on the right` : curBlock ? `${blockFamilies(curBlock).length} families · inner ring` : `${order.length} blocks round the ring`; S.append(t2);
// the path so far, as a dashed line through the visited points
const pts = path.map(p => p.kind === 'block' && angle.has(p.id) ? pt(RB, angle.get(p.id)) : p.kind === 'family' && famAngle.has(p.id) ? pt(RF, famAngle.get(p.id)) : null).filter(Boolean);
if (pts.length > 1) S.append(sv('path', { class: 'journey', d: 'M' + pts.map(p => p.join(',')).join('L') }));
}
function openBlock(sym) {
if (!U.bySym.has(sym)) { // an unnamed group: not on the ring, still openable as the inner ring
curBlock = sym; curFam = null; rec = null; path.push({ kind: 'block', id: sym }); trailPush('block', sym, blockLabel(sym)); draw(); return;
}
curBlock = sym; curFam = null; rec = null; path.push({ kind: 'block', id: sym }); trailPush('block', sym, blockLabel(sym)); draw();
const b = U.bySym.get(sym); P.hidden = false; P.innerHTML = '';
P.append(el('div', { class: 'u-h' }, blockLabel(sym)), el('div', { class: 'u-muted' }, `${blockDesc(b)} ${blockFamilies(sym).length} families on the inner ring (first 150).`),
el('div', { class: 'u-links' }, el('a', { class: 'u-chip', href: blockPage(sym), target: '_blank', rel: 'noopener' }, 'Block page ↗'), ...((b.live || []).slice(-1).map(u => el('a', { class: 'u-chip live', href: pageLink(u), target: '_blank', rel: 'noopener' }, 'Live file ↗')))));
}
async function openFam(n) {
const g = U.famToGroup.get(n); if (g && g !== curBlock) { curBlock = g; path.push({ kind: 'block', id: g }); }
curFam = n; P.hidden = false; path.push({ kind: 'family', id: n });
rec = await showFamilyPanel(n, P, openFam, openBlock) || null; draw();
}
window.goHome = () => { curBlock = curFam = null; rec = null; path = []; P.hidden = true; draw(); };
window.goTo = (k, id) => k === 'block' ? openBlock(id) : k === 'family' ? openFam(id) : goHome();
loadUniverse().then(() => {
for (const c of U.cats) for (const b of U.blocks.filter(x => x.category === c.id)) order.push(b);
$('#count').textContent = countsLine(); legend($('#legend')); mountSearch($('#search'), openFam); renderTrail(); draw(); openAddress(); footer('v08-ring-navigation');
}).catch(e => fail('#count', e));
</script>Code Map — V09 Line View Page
A web page in the testcode folder of GlobalGrid2050 that shows block (`showBlock`) and opens family (`openFamily`). Published at https://globalgrid2050.com/testcode/202609141754/code-map/v09-line-view/. It shows block (`showBlock`) and opens family (`openFamily`).
renderglobalgrid2050 / testcode/202609141754/code-map/v09-line-view/index.html · lines 1–62 of 62 · version 2026-09-14 17:54 · Entry point · pattern showBlock (shared by 10 files)
- What it does
- It draws its content. Defines showBlock, openFamily, list. Side effects: changes the web page (DOM).
- Why it exists in the grid workflow
- Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
- Inputs & outputs
- Out: web page.
- Downstream impact
- Used directly by 1 file: Testcode — Code Map Page (globalgrid2050, https://globalgrid2050.com/testcode/202609141754/code-map/). Reached from 1 other entry point, including Testcode — Code Navigation Page (globalgrid2050, https://globalgrid2050.com/testcode/202609141754/code-navigation/). It is itself an entry point, published at https://globalgrid2050.com/testcode/202609141754/code-map/v09-line-view/.
- What it achieves
- Defines `showBlock`, `openFamily` and `list`.
- Why it matters
- Loaded by the Code Map page at https://globalgrid2050.com/testcode/202609141754/code-map/.
- Application
- globalgrid2050 · testcode/202609141754/code-map/v09-line-view · page
- Uses
- Corporate (script src), Testcode — Code Map (script src)
- Used by
- linked from Testcode — Code Map Page (link)
- Produces
- showBlock, openFamily, list
- Defines here
- showBlock, openFamily, list
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609141754/code-map/v09-line-view/index.html:1-62 · blob 9277c7a46552a0acc94570edc150e4f84b4057b2 · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: output · effects: dom · domain stage: experimental · users: none · canonical: production_core
<!doctype html>
<html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>GlobalGrid2050 · v09 line view</title>
<script>window.BUILT='2026-09-14 17:54'</script>
<script src="../../corporate.js"></script>
<script src="../core.js"></script>
<style>
.mini{display:grid;grid-template-columns:repeat(auto-fill,minmax(46px,1fr));gap:3px}
.mini button{background:#12151c;border:1px solid #2a3140;border-bottom:3px solid var(--c);color:#eef2fb;font:inherit;font-size:11px;padding:4px 0;border-radius:4px;cursor:pointer}
.river{display:grid;grid-template-columns:minmax(0,1fr) 190px;gap:8px;margin-top:10px}
.lines{background:#07090d;border:1px solid #1f2633;border-radius:8px;padding:6px 0;overflow:auto;max-height:70vh;position:relative;min-width:0}
.ln{white-space:pre;font-size:12px;padding:0 8px;border-left:3px solid transparent}
.ln.sh{border-left-color:#39d353;background:#0d1a12}
.ln .k{color:#ffd54a;display:inline-block;min-width:62px}
.side{display:flex;flex-direction:column;gap:6px;font-size:12px;min-width:0}
.side h4{margin:6px 0 0;font-size:11px;text-transform:uppercase;letter-spacing:.06em}
.u-h,.u-muted,.u-chip{overflow-wrap:anywhere}
@media(max-width:640px){.river{grid-template-columns:minmax(0,1fr)}}
</style>
<h1>GLOBALGRID2050</h1><div class="u-count" id="count">Loading the code map…</div>
<div id="search"></div><div id="trail"></div><div id="legend"></div>
<div class="u-panel" id="home"></div>
<div id="view"></div>
<script>
const Hm = $('#home'), V = $('#view');
window.goHome = function () {
V.innerHTML = ''; Hm.hidden = false; Hm.innerHTML = '';
Hm.append(el('div', { class: 'u-muted' }, 'Every named block, by category. Tap one to list its families; open a family to see its numbered lines in sequence, with every relationship alongside.'));
for (const c of U.cats) { const list = U.blocks.filter(b => b.category === c.id); if (!list.length) continue; Hm.append(el('div', { class: 'u-sub', style: `color:${c.colour}` }, catName(c)), el('div', { class: 'mini' }, list.map(b => el('button', { style: `--c:${c.colour}`, title: blockLabel(b.symbol), on: { click: () => showBlock(b.symbol) } }, b.symbol)))); }
};
window.goTo = (k, id) => k === 'block' ? showBlock(id) : k === 'family' ? openFamily(id) : goHome();
function showBlock(sym) {
trailPush('block', sym, blockLabel(sym)); Hm.hidden = true; V.innerHTML = '';
const fams = blockFamilies(sym); const b = U.bySym.get(sym) || {};
V.append(el('div', { class: 'u-panel' }, el('div', { class: 'u-h' }, blockLabel(sym)), el('div', { class: 'u-muted' }, `${blockDesc(b)} ${fams.length} families.`),
el('div', { class: 'u-links' }, ...blockDeps(sym).map(d => el('button', { class: 'u-chip', style: `border-color:${REL['depends on']}`, on: { click: () => showBlock(d) } }, `depends on → ${d}`)), ...blockUsers(sym).slice(0, 30).map(d => el('button', { class: 'u-chip', style: `border-color:${REL['used by']}`, on: { click: () => showBlock(d) } }, `← used by ${d}`))),
pageList(el('div', { class: 'u-links' }), fams, n => el('button', { class: 'u-chip', on: { click: () => openFamily(n) } }, `#${n}`), 100, 'families')));
}
async function openFamily(n) {
Hm.hidden = true; V.innerHTML = '<div class="u-muted">Loading…</div>';
let rec; try { rec = await family(n); } catch (e) { V.innerHTML = ''; V.append(el('div', { class: 'u-fail' }, e.message)); return; }
if (!rec) { V.innerHTML = `<div class="u-fail">Family #${n} is not in the published records.</div>`; return; }
trailPush('family', n, `#${n} ${famName(rec)}`); const L = familyLinks(rec, n); const g = U.famToGroup.get(n);
// shared lines, from buckets already loaded: load the buckets of its neighbours first so the markers mean something
await Promise.all([...(rec.uses || []), ...(rec.used_by || [])].slice(0, 20).map(u => family(u.family).catch(() => null)));
const keys = new Map(rec.lines.map(k => [k, []]));
for (const p of U.buckets.values()) { const bucket = await p.catch(() => ({})); for (const [m, r] of Object.entries(bucket)) { if (+m === n) continue; for (const k of r.lines || []) if (keys.has(k)) keys.get(k).push(+m); } }
const sharedFams = new Map(); for (const [k, list] of keys) for (const m of list) sharedFams.set(m, (sharedFams.get(m) || 0) + 1);
V.innerHTML = '';
V.append(el('div', { class: 'u-panel' }, el('div', { class: 'u-h' }, `#${n} ${famName(rec)}`), el('div', { class: 'u-muted' }, `${rec.lines.length} numbered lines · ${rec.repos.length} repositories · a green edge marks a line that also appears in another family (among ${U.buckets.size} loaded record buckets of ${U.index.buckets})`),
el('div', { class: 'u-links' }, g ? el('button', { class: 'u-chip', on: { click: () => showBlock(g) } }, `◂ contained in ${blockLabel(g)}`) : null, el('a', { class: 'u-chip', href: L.page, target: '_blank', rel: 'noopener' }, 'Function page ↗'), L.gh ? el('a', { class: 'u-chip', href: L.gh, target: '_blank', rel: 'noopener' }, 'File at commit ↗') : null, L.live ? el('a', { class: 'u-chip live' … [line shortened here: 478 characters; full line on GitHub]
const linesBox = el('div', { class: 'lines' }, 'Fetching the code at its pinned commit…');
const side = el('div', { class: 'side' });
const list = (title, items, colour) => { if (!items.length) return; side.append(el('h4', { style: `color:${colour}` }, `${title} (${items.length})`)); items.slice(0, 30).forEach(it => side.append(el('button', { class: 'u-chip', style: `border-color:${colour};text-align:left`, on: { click: () => openFamily(it.family) } }, `#${it.family} ${it.name || ''}`))); };
list('→ uses', rec.uses || [], REL.uses); list('← used by', rec.used_by || [], REL['used by']); // paged below 30 via the side list
list('≡ shares lines with', [...sharedFams].sort((a, b) => b[1] - a[1]).map(([m, c]) => ({ family: m, name: `${c} lines` })), REL['shared line']);
V.append(el('div', { class: 'river' }, linesBox, side));
try { const rows = await familyLines(rec); linesBox.innerHTML = ''; rows.forEach(r => { const sh = (keys.get(r.key) || []).length; linesBox.append(el('div', { class: 'ln' + (sh ? ' sh' : ''), title: sh ? `line ${r.key} also in ${sh} other families` : `line ${r.key}` }, el('span', { class: 'k' }, r.key), ` │ ${r.text}`)); }); }
catch (e) { linesBox.textContent = `The code could not be fetched (${e.message}). Line keys: ${rec.lines.join(', ')}`; }
}
loadUniverse().then(() => { $('#count').textContent = countsLine(); legend($('#legend')); mountSearch($('#search'), openFamily); renderTrail(); goHome(); openAddress(); footer('v09-line-view'); }).catch(e => fail('#count', e));
</script>Code Map — V10 Code Browser Page
A web page in the testcode folder of GlobalGrid2050 that opens family (`openFamily`). Published at https://globalgrid2050.com/testcode/202609141754/code-map/v10-code-browser/.
renderglobalgrid2050 / testcode/202609141754/code-map/v10-code-browser/index.html · lines 1–71 of 71 · version 2026-09-14 17:54 · Entry point · pattern navBuild (shared by 2 files)
- What it does
- It draws its content. Defines sv, navBuild, sld, openFamily. Side effects: changes the web page (DOM).
- Why it exists in the grid workflow
- Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
- Inputs & outputs
- Out: web page.
- Downstream impact
- Used directly by 1 file: Testcode — Code Map Page (globalgrid2050, https://globalgrid2050.com/testcode/202609141754/code-map/). Reached from 1 other entry point, including Testcode — Code Navigation Page (globalgrid2050, https://globalgrid2050.com/testcode/202609141754/code-navigation/). It is itself an entry point, published at https://globalgrid2050.com/testcode/202609141754/code-map/v10-code-browser/.
- What it achieves
- It opens family (`openFamily`) and is built from the nav build helper (`navBuild`) and the SLD step (`sld`). V10 read-only code browser. It responds to toggle and click events.
- Why it matters
- Loaded by the Code Map page at https://globalgrid2050.com/testcode/202609141754/code-map/.
- Application
- globalgrid2050 · testcode/202609141754/code-map/v10-code-browser · page
- Uses
- Corporate (script src), Testcode — Code Map (script src)
- Used by
- linked from Testcode — Code Map Page (link)
- Produces
- sv, navBuild, sld, openFamily
- Defines here
- sv, navBuild, sld, openFamily
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609141754/code-map/v10-code-browser/index.html:1-71 · blob a6e01c0290ec7904ec29f9dede0867d4f4da44e9 · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: output · effects: dom · domain stage: experimental · users: none · canonical: production_core
<!doctype html>
<html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>GlobalGrid2050 · v10 read-only code browser</title>
<script>window.BUILT='2026-09-14 17:54'</script>
<script src="../../corporate.js"></script>
<script src="../core.js"></script>
<style>
.ide{display:grid;grid-template-columns:230px minmax(0,1fr) 260px;gap:8px;height:calc(100vh - 170px);min-height:460px}
.pane{background:#0f1218;border:1px solid #2a3140;border-radius:8px;overflow:auto;padding:6px}
.pane h3{margin:2px 4px 6px;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:#7da0c8}
details{margin:2px 0}summary{cursor:pointer;font-size:12px;padding:2px 4px}
.nav button{display:block;width:100%;text-align:left;background:none;border:0;color:#d8dee9;font:inherit;font-size:12px;padding:2px 10px;cursor:pointer;border-radius:4px}
.nav button:hover,.nav button.on{background:#12151c;color:#00e5ff}
.sld{width:100%;height:auto}
.bus{stroke:#eef2fb;stroke-width:4}.feeder{stroke-width:1.6}.tag{fill:#d8dee9;font-size:10px}.small{fill:#8b93a7;font-size:9px}
@media(max-width:900px){.ide{grid-template-columns:1fr;height:auto}.pane{max-height:60vh}}
</style>
<h1>GLOBALGRID2050</h1><div class="u-count" id="count">Loading the code map…</div>
<div id="search"></div><div id="trail"></div><div id="legend"></div>
<div class="u-muted">Read-only. Navigator on the left; the numbered code in the middle; on the right, the relationships drawn like a single-line diagram: the block is the busbar, each relationship a feeder with its type, key and count.</div>
<div class="ide"><div class="pane nav" id="nav"><h3>Blocks</h3></div><div class="pane" id="code"><h3>Code</h3><div class="u-muted">Choose a family.</div></div><div class="pane" id="rel"><h3>Relationships</h3></div></div>
<script>
const N = $('#nav'), C = $('#code'), R = $('#rel'); const NS = 'http://www.w3.org/2000/svg';
const sv = (t, a) => { const e = document.createElementNS(NS, t); for (const k in a) e.setAttribute(k, a[k]); return e; };
function navBuild() {
for (const c of U.cats) {
const list = U.blocks.filter(b => b.category === c.id); if (!list.length) continue;
const d = el('details', {}, el('summary', { style: `color:${c.colour}` }, `${catName(c)} (${list.length})`));
for (const b of list) { const bd = el('details', {}, el('summary', {}, `${b.symbol} · ${blockTitle(b)}`)); bd.addEventListener('toggle', () => { if (!bd.open || bd.dataset.done) return; bd.dataset.done = 1; sld(b.symbol); pageList(bd, blockFamilies(b.symbol), n => el('button', { 'data-n': n, on: { click: () => openFamily(n) } }, `#${n}`), 100, 'families'); family(blockFamilies(b.symbol)[0] ?? … [line shortened here: 673 characters; full line on GitHub]
N.append(d);
}
N.append(el('div', { class: 'u-muted', style: 'padding:6px' }, `${U.unnamed.length} unnamed groups: reach them through search.`));
}
/* single-line diagram of relationships: a horizontal busbar for the subject, feeders dropping to each related item */
function sld(sym, rec, n) {
R.innerHTML = '<h3>Relationships</h3>';
const feeders = [];
if (rec) {
const g = U.famToGroup.get(n); if (g) feeders.push({ type: 'contains', key: g, label: blockLabel(g), go: () => sld(g) });
(rec.uses || []).slice(0, 12).forEach(u => feeders.push({ type: 'uses', key: `#${u.family}`, label: u.name, go: () => openFamily(u.family) }));
(rec.used_by || []).slice(0, 12).forEach(u => feeders.push({ type: 'used by', key: `#${u.family}`, label: u.name, go: () => openFamily(u.family) }));
} else {
blockDeps(sym).forEach(s => feeders.push({ type: 'depends on', key: s, label: blockLabel(s), go: () => sld(s) }));
blockUsers(sym).slice(0, 16).forEach(s => feeders.push({ type: 'used by', key: s, label: blockLabel(s), go: () => sld(s) }));
trailPush('block', sym, blockLabel(sym));
}
const title = rec ? `#${n} ${famName(rec)}` : blockLabel(sym);
const rowH = 30, H = 60 + feeders.length * rowH, W = 250; const svg = sv('svg', { class: 'sld', viewBox: `0 0 ${W} ${H}` });
svg.append(sv('line', { x1: 20, y1: 30, x2: 20, y2: H - 10, class: 'bus' }));
const t = sv('text', { x: 4, y: 16, class: 'tag', style: 'fill:#00e5ff;font-size:11px' }); t.textContent = title.slice(0, 38); svg.append(t);
feeders.forEach((f, i) => {
const y = 46 + i * rowH; const col = REL[f.type];
svg.append(sv('line', { x1: 20, y1: y, x2: 60, y2: y, class: 'feeder', stroke: col }));
svg.append(sv('rect', { x: 60, y: y - 5, width: 10, height: 10, fill: 'none', stroke: col })); // the "breaker": the relationship type
const g = sv('g', { style: 'cursor:pointer' }); g.addEventListener('click', f.go);
const a = sv('text', { x: 76, y: y - 2, class: 'tag' }); a.textContent = `${f.key}`; const b = sv('text', { x: 76, y: y + 9, class: 'small' }); b.textContent = `${sayType(f.type)} · ${String(f.label || '').slice(0, 30)}`;
g.append(sv('rect', { x: 72, y: y - 13, width: 176, height: 26, fill: 'transparent' }), a, b); svg.append(g);
});
R.append(svg); if (!feeders.length) R.append(el('div', { class: 'u-muted' }, 'No relationships recorded.'));
if (!rec && U.bySym.has(sym)) R.append(el('a', { class: 'u-chip', href: blockPage(sym), target: '_blank', rel: 'noopener' }, 'Block page ↗'));
}
async function openFamily(n) {
N.querySelectorAll('button.on').forEach(b => b.classList.remove('on')); const btn = N.querySelector(`button[data-n="${n}"]`); btn && btn.classList.add('on');
C.innerHTML = '<h3>Code</h3>'; const host = el('div'); C.append(host);
const rec = await showFamilyPanel(n, host, openFamily, s => sld(s));
if (rec) sld(null, rec, n);
}
window.goHome = () => { C.innerHTML = '<h3>Code</h3><div class="u-muted">Choose a family.</div>'; R.innerHTML = '<h3>Relationships</h3>'; };
window.goTo = (k, id) => k === 'block' ? sld(id) : k === 'family' ? openFamily(id) : goHome();
loadUniverse().then(() => { $('#count').textContent = countsLine(); legend($('#legend')); mountSearch($('#search'), openFamily); renderTrail(); navBuild(); openAddress(); footer('v10-code-browser'); }).catch(e => fail('#count', e));
</script>Coder Walk R2 Probe
A JavaScript module in the proof folder of GlobalGrid2050. It is built from the sleep step (`sleep`).
renderglobalgrid2050 / testcode/202609142225/proof/coder-walk-r2-probe.mjs · lines 1–32 of 32 · version 2026-09-14 22:25 · Not reached from any entry point (candidate for review)
- What it does
- Defines sleep. Uses libraries node:module, node:fs, C:/Users/vikra/Desktop/Claude-Sandbox-MSI/bench/node_modules/puppeteer-core. Side effects: changes the web page (DOM); reads or writes files.
- Why it exists in the grid workflow
- Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
- Inputs & outputs
- In: command-line arguments. Out: JSON file coder-walk-r2-probe.json.
- What it achieves
- Round-2 side probe: is the lens bar really 1 px below the screen, and is the sheet's "✕ close" reachable under the sticky action row? It writes `coder-walk-r2-probe.json`.
- Why it matters
- No other file in the estate was found to import it.
- Application
- globalgrid2050 · testcode/202609142225/proof · JavaScript module
- Uses
- node:module, node:fs, C:/Users/vikra/Desktop/Claude-Sandbox-MSI/bench/node_modules/puppeteer-core
- Used by
- none found
- Produces
- sleep
- Defines here
- sleep
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609142225/proof/coder-walk-r2-probe.mjs:1-32 · blob 363e8c3647f8806052f050e707c655bf154defb3 · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: output · effects: dom, filesystem · domain stage: experimental · users: none · canonical: unreached_review
// Round-2 side probe: is the lens bar really 1 px below the screen, and is the sheet's "✕ close" reachable under the sticky action row?
import { createRequire } from 'node:module';
import fs from 'node:fs';
const require = createRequire(import.meta.url);
const puppeteer = require('C:/Users/vikra/Desktop/Claude-Sandbox-MSI/bench/node_modules/puppeteer-core');
const PORT = process.argv[2] || '8896', BASE = `http://127.0.0.1:${PORT}/testcode/202609142225/`;
const OUT = 'C:/Users/vikra/Documents/GitHub/globalgrid2050/testcode/202609142225/proof/';
const sleep = ms => new Promise(r => setTimeout(r, ms));
const browser = await puppeteer.launch({ executablePath: 'C:/Program Files/Google/Chrome/Application/chrome.exe', headless: 'new', args: ['--enable-gpu', '--use-gl=angle', '--use-angle=d3d11', '--ignore-gpu-blocklist', '--no-first-run'], protocolTimeout: 90000 });
const page = await browser.newPage();
await page.setViewport({ width: 430, height: 900, deviceScaleFactor: 2, isMobile: true, hasTouch: true });
const out = {};
await page.goto(BASE + '?lens=river&key=family:511&trail=family:511&recipe=family:511,block:Vd', { waitUntil: 'networkidle0', timeout: 90000 });
await page.waitForFunction(() => /blocks on the table/.test(document.getElementById('count').textContent) && document.getElementById('count').title.length > 0, { timeout: 60000 }); await sleep(1200);
out.lensbar = await page.evaluate(() => { const L = document.getElementById('lensbar').getBoundingClientRect(); const a = document.querySelector('#lensbar a').getBoundingClientRect(); return { innerHeight, visualViewportH: visualViewport.height, visualOffsetTop: visualViewport.offsetTop, lensbar: [L.top, L.bottom], tab: [a.top, a.bottom], docClientH: document.documentElement.clientHeight, hitAt873 … [line shortened here: 531 characters; full line on GitHub]
// open the sheet by tapping the tray
const tr = await page.evaluate(() => { const r = document.getElementById('tray').getBoundingClientRect(); return { x: r.left + r.width / 2, y: r.top + r.height / 2 }; });
await page.touchscreen.tap(tr.x, tr.y); await sleep(700);
out.sheet = await page.evaluate(() => { const S = document.getElementById('sheet'); const c = [...S.querySelectorAll('button')].find(b => /close/.test(b.textContent)); const r = c.getBoundingClientRect(); const row = S.querySelector('.row.act').getBoundingClientRect(); const pts = [[r.left + r.width / 2, r.top + 3], [r.left + r.width / 2, r.top + r.height / 2], [r.left + r.width / 2, r.bottom - 3] … [line shortened here: 1,014 characters; full line on GitHub]
await page.screenshot({ path: OUT + 'coder-r2-08c-sheet-close.png', clip: { x: 0, y: 160, width: 430, height: 120 } });
// tap the close and see whether it closes
const c = await page.evaluate(() => { const S = document.getElementById('sheet'); const c = [...S.querySelectorAll('button')].find(b => /close/.test(b.textContent)); const r = c.getBoundingClientRect(); return { x: r.left + r.width / 2, y: r.top + r.height / 2 }; });
await page.touchscreen.tap(c.x, c.y); await sleep(500);
out.afterCloseTap = await page.evaluate(() => ({ sheetHidden: document.getElementById('sheet').hidden, panelHidden: document.getElementById('panel').hidden, url: location.search }));
// the tray at the moment: which words does a person actually see (ellipsis)?
out.tray = await page.evaluate(() => { const c = document.querySelector('#tray .cnt'); const r = c.getBoundingClientRect(); const range = document.createRange(); const t = c.firstChild; let visible = ''; for (let i = 1; i <= t.length; i++) { range.setStart(t, 0); range.setEnd(t, i); if (range.getBoundingClientRect().right <= r.right - 12) visible = t.data.slice(0, i); else break; } return { full: … [line shortened here: 498 characters; full line on GitHub]
await page.screenshot({ path: OUT + 'coder-r2-tray-crop.png', clip: { x: 0, y: 790, width: 430, height: 110 } });
// long-press on a line key inside the measured panel: does the shared-line count show as a tip?
await page.evaluate(() => { const S = document.getElementById('sheet'); S.hidden = true; });
await browser.close();
fs.writeFileSync(OUT + 'coder-walk-r2-probe.json', JSON.stringify(out, null, 1));
console.log(JSON.stringify(out, null, 1));Coder Walk R2 Probe2
A JavaScript module in the proof folder of GlobalGrid2050. It is built from the sleep step (`sleep`).
renderglobalgrid2050 / testcode/202609142225/proof/coder-walk-r2-probe2.mjs · lines 1–23 of 23 · version 2026-09-14 22:25 · Not reached from any entry point (candidate for review)
- What it does
- Defines sleep. Uses libraries node:module, node:fs, C:/Users/vikra/Desktop/Claude-Sandbox-MSI/bench/node_modules/puppeteer-core. Side effects: changes the web page (DOM); reads or writes files.
- Why it exists in the grid workflow
- Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
- Inputs & outputs
- In: command-line arguments. Out: JSON file coder-walk-r2-probe2.json.
- What it achieves
- Round-2 side probe 2: how much of the tray's chips a person can see once two things are in the recipe, and whether the remove (×) of the second chip is reachable by touch. It writes `coder-walk-r2-probe2.json`.
- Why it matters
- No other file in the estate was found to import it.
- Application
- globalgrid2050 · testcode/202609142225/proof · JavaScript module
- Uses
- node:module, node:fs, C:/Users/vikra/Desktop/Claude-Sandbox-MSI/bench/node_modules/puppeteer-core
- Used by
- none found
- Produces
- sleep
- Defines here
- sleep
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609142225/proof/coder-walk-r2-probe2.mjs:1-23 · blob 50afcb3ede536c1ccf796c61544ff487cb4bd08e · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: output · effects: dom, filesystem · domain stage: experimental · users: none · canonical: unreached_review
// Round-2 side probe 2: how much of the tray's chips a person can see once two things are in the recipe, and whether the
// remove (×) of the second chip is reachable by touch.
import { createRequire } from 'node:module';
import fs from 'node:fs';
const require = createRequire(import.meta.url);
const puppeteer = require('C:/Users/vikra/Desktop/Claude-Sandbox-MSI/bench/node_modules/puppeteer-core');
const PORT = process.argv[2] || '8896', BASE = `http://127.0.0.1:${PORT}/testcode/202609142225/`;
const OUT = 'C:/Users/vikra/Documents/GitHub/globalgrid2050/testcode/202609142225/proof/';
const sleep = ms => new Promise(r => setTimeout(r, ms));
const browser = await puppeteer.launch({ executablePath: 'C:/Program Files/Google/Chrome/Application/chrome.exe', headless: 'new', args: ['--enable-gpu', '--use-gl=angle', '--use-angle=d3d11', '--ignore-gpu-blocklist', '--no-first-run'], protocolTimeout: 90000 });
const page = await browser.newPage();
await page.setViewport({ width: 430, height: 900, deviceScaleFactor: 2, isMobile: true, hasTouch: true });
const out = {};
const trayFacts = () => page.evaluate(() => { const T = document.getElementById('tray'), C = T.querySelector('.chips'); const cb = C.getBoundingClientRect(); return { chipsBox: [Math.round(cb.left), Math.round(cb.right)], chipsClientW: C.clientWidth, chipsScrollW: C.scrollWidth, chips: [...T.querySelectorAll('.rc')].map(c => { const r = c.getBoundingClientRect(); const x = c.querySelector('button' … [line shortened here: 1,200 characters; full line on GitHub]
for (const [name, q] of [['two', 'recipe=family:511,block:Vd'], ['three', 'recipe=family:511,block:Vd,block:Gc'], ['oneBlock', 'recipe=block:Vd']]) {
await page.goto(BASE + '?lens=river&' + q, { waitUntil: 'networkidle0', timeout: 90000 });
await page.waitForFunction(() => /blocks on the table/.test(document.getElementById('count').textContent) && document.getElementById('count').title.length > 0, { timeout: 60000 }); await sleep(1000);
out[name] = await trayFacts();
await page.screenshot({ path: OUT + `coder-r2-tray-${name}.png`, clip: { x: 0, y: 790, width: 430, height: 60 } });
}
await browser.close();
fs.writeFileSync(OUT + 'coder-walk-r2-probe2.json', JSON.stringify(out, null, 1));
console.log(JSON.stringify(out, null, 1));