In this section
- Testcode — V05 Chord Dependencies Page render · globalgrid2050 / testcode/202609141522/v05-chord-dependencies/index.html lines 1–52
- Testcode — V06 Treemap Lines Page render · globalgrid2050 / testcode/202609141522/v06-treemap-lines/index.html lines 1–59
- Testcode — V07 Flow Repos Page render · globalgrid2050 / testcode/202609141522/v07-flow-repos/index.html lines 1–59
- Testcode — V08 Ring Journey Page render · globalgrid2050 / testcode/202609141522/v08-ring-journey/index.html lines 1–84
- Testcode — V09 Line River Page render · globalgrid2050 / testcode/202609141522/v09-line-river/index.html lines 1–60
- Testcode — V10 Ide Search Page render · globalgrid2050 / testcode/202609141522/v10-ide-search/index.html lines 1–70
- View render · globalgrid2050 / testcode/202609141531/view.js lines 1–12
- Testcode — Block Register Page render · globalgrid2050 / testcode/202609141754/block-register/index.html lines 1–126
Testcode — V05 Chord Dependencies Page
A web page in GlobalGrid2050 that opens family (`openFamily`) and draws SVG graphics. Published at https://globalgrid2050.com/testcode/202609141522/v05-chord-dependencies/. It opens family (`openFamily`).
renderglobalgrid2050 / testcode/202609141522/v05-chord-dependencies/index.html · lines 1–52 of 52 · version 2026-09-14 15:22 · 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
- It is itself an entry point, published at https://globalgrid2050.com/testcode/202609141522/v05-chord-dependencies/.
- What it achieves
- Defines `draw`, `pick` and `openFamily`. It responds to click events.
- Why it matters
- No other file in the estate was found to import it; it is an entry point.
- Application
- globalgrid2050 · testcode/202609141522/v05-chord-dependencies · page
- Uses
- GlobalGrid2050 — Testcode (script src)
- Used by
- none found
- 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/202609141522/v05-chord-dependencies/index.html:1-52 · blob bdcfa66290699f1997b0aa193a3c65352fc61a79 · 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 15:22'</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 universe…</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 light 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' }, `${b.description || ''} Yellow chords: depends on. Pink: used by. ${fams.length} families.`),
el('div', { class: 'u-links' }, b.symbol ? el('a', { class: 'u-chip', href: `${STARS}table.html?block=${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>Testcode — V06 Treemap Lines Page
A web page in GlobalGrid2050 that shows cat (`showCat`) and block (`showBlock`) and opens family (`openFamily`). Published at https://globalgrid2050.com/testcode/202609141522/v06-treemap-lines/. It shows cat (`showCat`), shows block (`showBlock`) and opens family (`openFamily`).
renderglobalgrid2050 / testcode/202609141522/v06-treemap-lines/index.html · lines 1–59 of 59 · version 2026-09-14 15:22 · 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
- It is itself an entry point, published at https://globalgrid2050.com/testcode/202609141522/v06-treemap-lines/.
- What it achieves
- Defines `squarify`, `render`, `showCat` and 2 more. It responds to resize events.
- Why it matters
- No other file in the estate was found to import it; it is an entry point.
- Application
- globalgrid2050 · testcode/202609141522/v06-treemap-lines · page
- Uses
- GlobalGrid2050 — Testcode (script src)
- Used by
- mentioned in Standalone (comment 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/202609141522/v06-treemap-lines/index.html:1-59 · blob 9ec9cb07012622643a66fde73ad8e0b3ed65bebf · 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 15:22'</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 universe…</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: c.title, 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-lines'); }).catch(e => fail('#count', e));
</script>Testcode — V07 Flow Repos Page
A web page in GlobalGrid2050 that shows block (`showBlock`), opens family (`openFamily`) and draws SVG graphics. Published at https://globalgrid2050.com/testcode/202609141522/v07-flow-repos/. It shows block (`showBlock`) and opens family (`openFamily`).
renderglobalgrid2050 / testcode/202609141522/v07-flow-repos/index.html · lines 1–59 of 59 · version 2026-09-14 15:22 · 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
- It is itself an entry point, published at https://globalgrid2050.com/testcode/202609141522/v07-flow-repos/.
- What it achieves
- Defines `draw`, `repoOf`, `place` and 4 more. It responds to click events.
- Why it matters
- No other file in the estate was found to import it; it is an entry point.
- Application
- globalgrid2050 · testcode/202609141522/v07-flow-repos · page
- Uses
- GlobalGrid2050 — Testcode (script src)
- Used by
- none found
- 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/202609141522/v07-flow-repos/index.html:1-59 · blob bf4f15f58ba9c368bb05e608384ce36a0501b586 · 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 15:22'</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 universe…</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');
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 = p.it.title; S.append(t); }
label(pb, 'start', 8, b => `${b.symbol} · ${b.title}`.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' }, `${b.description || ''} In ${(b.repos || []).length} repositories. ${fams.length} families.`),
el('div', { class: 'u-links' }, b.symbol ? el('a', { class: 'u-chip', href: `${STARS}table.html?block=${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-repos'); }).catch(e => fail('#count', e));
</script>Testcode — V08 Ring Journey Page
A web page in GlobalGrid2050 that opens block (`openBlock`) and fam (`openFam`) and draws SVG graphics. Published at https://globalgrid2050.com/testcode/202609141522/v08-ring-journey/. It opens block (`openBlock`) and opens fam (`openFam`).
renderglobalgrid2050 / testcode/202609141522/v08-ring-journey/index.html · lines 1–84 of 84 · version 2026-09-14 15:22 · 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
- It is itself an entry point, published at https://globalgrid2050.com/testcode/202609141522/v08-ring-journey/.
- What it achieves
- Defines `blockAt`, `draw`, `openBlock` and 1 more. It responds to click events.
- Why it matters
- No other file in the estate was found to import it; it is an entry point.
- Application
- globalgrid2050 · testcode/202609141522/v08-ring-journey · page
- Uses
- GlobalGrid2050 — Testcode (script src)
- Used by
- none found
- 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/202609141522/v08-ring-journey/index.html:1-84 · blob 139cebe8036d362f8f18556d8ffa6398e7908a48 · 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 the 360° ring journey</title>
<script>window.BUILT='2026-09-14 15:22'</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 universe…</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>The 360° journey.</b> The outer ring is every named block, round the full circle. 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 light up on the inner ring, and their blocks light on the outer ring. Tap any … [line shortened here: 528 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 core
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 journey 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' }, `${b.description || ''} ${blockFamilies(sym).length} families on the inner ring (first 150).`),
el('div', { class: 'u-links' }, el('a', { class: 'u-chip', href: `${STARS}table.html?block=${sym}`, target: '_blank', rel: 'noopener' }, 'Block page ↗'), ...((b.live || []).slice(-1).map(u => el('a', { class: 'u-chip live', href: 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-journey');
}).catch(e => fail('#count', e));
</script>Testcode — V09 Line River Page
A web page in GlobalGrid2050 that shows block (`showBlock`) and opens family (`openFamily`). Published at https://globalgrid2050.com/testcode/202609141522/v09-line-river/. It shows block (`showBlock`) and opens family (`openFamily`).
renderglobalgrid2050 / testcode/202609141522/v09-line-river/index.html · lines 1–60 of 60 · version 2026-09-14 15:22 · 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
- It is itself an entry point, published at https://globalgrid2050.com/testcode/202609141522/v09-line-river/.
- What it achieves
- Defines `showBlock`, `openFamily` and `list`.
- Why it matters
- No other file in the estate was found to import it; it is an entry point.
- Application
- globalgrid2050 · testcode/202609141522/v09-line-river · page
- Uses
- GlobalGrid2050 — Testcode (script src)
- Used by
- none found
- 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/202609141522/v09-line-river/index.html:1-60 · blob 0b75c80781f6bb7034a42340c55630dc62dd21fd · 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 river</title>
<script>window.BUILT='2026-09-14 15:22'</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}
.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}
.side h4{margin:6px 0 0;font-size:11px;text-transform:uppercase;letter-spacing:.06em}
@media(max-width:640px){.river{grid-template-columns:1fr}}
</style>
<h1>GLOBALGRID2050</h1><div class="u-count" id="count">Loading the universe…</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 flow as a river, 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}` }, c.title), 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' }, `${b.description || ''} ${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 arcs 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-river'); }).catch(e => fail('#count', e));
</script>Testcode — V10 Ide Search Page
A web page in GlobalGrid2050 that opens family (`openFamily`). Published at https://globalgrid2050.com/testcode/202609141522/v10-ide-search/. It opens family (`openFamily`) and is built from the nav build helper (`navBuild`) and the SLD step (`sld`).
renderglobalgrid2050 / testcode/202609141522/v10-ide-search/index.html · lines 1–70 of 70 · version 2026-09-14 15:22 · 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
- It is itself an entry point, published at https://globalgrid2050.com/testcode/202609141522/v10-ide-search/.
- What it achieves
- V10 read-only IDE. It responds to toggle and click events.
- Why it matters
- No other file in the estate was found to import it; it is an entry point.
- Application
- globalgrid2050 · testcode/202609141522/v10-ide-search · page
- Uses
- GlobalGrid2050 — Testcode (script src)
- Used by
- none found
- 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/202609141522/v10-ide-search/index.html:1-70 · blob 6b22841b77877fb7d4689204bd70aa5fd9b84b9a · 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 IDE</title>
<script>window.BUILT='2026-09-14 15:22'</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 universe…</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}` }, `${c.title} (${list.length})`));
for (const b of list) { const bd = el('details', {}, el('summary', {}, `${b.symbol} · ${b.title}`)); 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] ?? -1).th … [line shortened here: 667 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 = `${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: `${STARS}table.html?block=${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-ide-search'); }).catch(e => fail('#count', e));
</script>View
A JavaScript file in the testcode folder of GlobalGrid2050.
renderglobalgrid2050 / testcode/202609141531/view.js · lines 1–12 of 12 · version 2026-09-14 15:31 · Not reached from any entry point (candidate for review)
- What it does
- It draws its content. Defines render. Side effects: changes the web page (DOM); makes network requests.
- 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: JSON file data.json.
- What it achieves
- Defines `render`. It reads `data.json`. It responds to input and click events.
- Why it matters
- No other file in the estate was found to import it.
- Application
- globalgrid2050 · testcode/202609141531 · script
- Uses
- none found
- Used by
- none found
- Produces
- render
- Defines here
- render
- 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/202609141531/view.js:1-12 · blob 47aabed35bdc0d4840d0849f966dbf5ad920b7b5 · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: output · effects: dom, network · domain stage: experimental · users: none · canonical: unreached_review
'use strict';
(async()=>{
const response=await fetch('data.json');if(!response.ok)throw Error('Evidence HTTP '+response.status);
const data=await response.json();if(!Array.isArray(data.records)||!data.records.length)throw Error('Missing browser observations');
const status=document.querySelector('#status');status.textContent=`Observed ${data.observed_utc}\n${data.records.length} viewport loads across ${new Set(data.records.map(r=>r.url)).size} pages; ${data.discovered_pages} discovered page candidates at this snapshot.\nInventory commit: ${data.inventory_commit}\nChrome ${data.browser}; rendering: ${data.renderer}`;
let page=0;const size=40,filter=document.querySelector('#filter');
function render(){const records=data.records.filter(r=>r.url.toLowerCase().includes(filter.value.toLowerCase()));page=Math.min(page,Math.max(0,Math.ceil(records.length/size)-1));const body=document.querySelector('#rows');body.replaceChildren();
for(const r of records.slice(page*size,(page+1)*size)){const row=document.createElement('tr');const values=[r.url,r.width,r.status??'Incomplete',r.load_wall_ms??'—',`${r.console_errors.length} / ${r.failed_requests.length}`,r.metrics?.overflow?'Observed':'Not observed'];for(let i=0;i<values.length;i++){const td=document.createElement('td');if(i===0){const a=document.createElement('a');a.href=r.u … [line shortened here: 631 characters; full line on GitHub]
document.querySelector('#page').textContent=`${records.length? page*size+1:0}–${Math.min((page+1)*size,records.length)} of ${records.length}`;document.querySelector('#previous').disabled=page===0;document.querySelector('#next').disabled=(page+1)*size>=records.length;
}
filter.addEventListener('input',()=>{page=0;render();});document.querySelector('#previous').addEventListener('click',()=>{page--;render();});document.querySelector('#next').addEventListener('click',()=>{page++;render();});render();
})().catch(e=>{document.querySelector('#status').textContent='Evidence unavailable: '+e.message;});Testcode — Block Register Page
A web page in GlobalGrid2050 that draws blocks and uses data from the ventus-grid-engine, stars and code-generator repositories. Published at https://globalgrid2050.com/testcode/202609141754/block-register/. It closes panel (`closePanel`) and shows category (`showCategory`).
renderglobalgrid2050 / testcode/202609141754/block-register/index.html · lines 1–126 of 126 · version 2026-09-14 17:54 · Entry point · pattern showCategory (shared by 3 files)
- What it does
- It draws blocks. Defines 11 functions or classes, including $, esc, T, L, repoName. Side effects: changes the web page (DOM); makes network requests.
- 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: data source: ventus-grid-engine data; data source: stars data; data source: code-generator data; JSON file blocks.json. Out: web page.
- Downstream impact
- Used directly by 1 file: Testcode — Code Record Page (globalgrid2050, https://globalgrid2050.com/testcode/202609141754/code-record/). It is itself an entry point, published at https://globalgrid2050.com/testcode/202609141754/block-register/.
- What it achieves
- Defines `esc`, `repoName`, `byName` and 5 more.
- Why it matters
- Loaded by the Code Record page at https://globalgrid2050.com/testcode/202609141754/code-record/.
- Application
- globalgrid2050 · testcode/202609141754/block-register · page
- Uses
- GlobalGrid2050 — Testcode Page (link), Testcode — Code Record Page (link), Code Generator — Index Page (link), Corporate (script src), Code (estate URL), Stars — Index Page (estate URL)
- Used by
- linked from Testcode — Code Record Page (link)
- Produces
- $, esc, T, L, repoName, byName, closePanel, show, need, showCategory, tile
- Defines here
- $, esc, T, L, repoName, byName, closePanel, show, need, showCategory, tile
- 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/block-register/index.html:1-126 · blob 100ff885fe7abf0967456c3029f94e6f48637a36 · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: output · effects: dom, network · 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 · Block register</title>
<style>
:root{color-scheme:dark}
body{margin:0;padding:16px 18px 40px;background:#0b0d12;color:#eef2fb;font:14px/1.5 Inter,ui-sans-serif,system-ui,sans-serif}
a{color:#00e5ff}
h1{font-size:22px;margin:0 0 4px}
.ey{font-family:ui-monospace,monospace;font-size:11px;letter-spacing:.2em;text-transform:uppercase;color:#00e5ff}
.nav{display:flex;flex-wrap:wrap;gap:6px 14px;margin:8px 0 10px;font-size:13px;font-family:ui-monospace,monospace}
.muted{color:#9aa3b5}
.cat{margin:18px 0 6px;display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;scroll-margin-top:8px}
.cat h2{font-size:14px;margin:0;letter-spacing:.06em;text-transform:uppercase}
.cat.on h2{text-decoration:underline;text-underline-offset:4px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:8px}
.tile{border:1px solid #262b36;border-radius:10px;padding:8px 9px;background:linear-gradient(160deg,rgba(255,255,255,.055),rgba(255,255,255,.014));cursor:pointer;min-height:78px;display:flex;flex-direction:column;gap:2px}
.tile:hover,.tile.on{border-color:#00e5ff;box-shadow:0 0 0 1px rgba(0,229,255,.22)}
.tile .sym{font-family:ui-monospace,monospace;font-size:20px;font-weight:700;line-height:1}
.tile .num{font-family:ui-monospace,monospace;font-size:10px;color:#9aa3b5}
.tile .t{font-size:11.5px;line-height:1.2;color:#dfe6f3}
.tile .n{font-family:ui-monospace,monospace;font-size:10px;color:#9aa3b5;margin-top:auto}
.panel{position:sticky;bottom:0;border:1px solid #00e5ff;border-radius:14px;background:#12151c;padding:14px;margin-top:18px;box-shadow:0 -10px 40px rgba(0,0,0,.4);max-height:70vh;overflow:auto}
.panel h3{margin:0 0 4px;font-size:18px;padding-right:36px}
.close{position:absolute;top:8px;right:10px;background:none;border:1px solid #385464;color:#9aa3b5;border-radius:999px;width:28px;height:28px;font:inherit;cursor:pointer}
.close:hover{border-color:#00e5ff;color:#eef2fb}
.btn{display:inline-block;background:#0f1218;border:1px solid #385464;color:#eef2fb;padding:7px 12px;border-radius:999px;font:inherit;font-size:13px;cursor:pointer;margin:6px 6px 0 0;text-decoration:none}
.btn:hover{border-color:#00e5ff}
.btn.first{border-color:#00e5ff}
details{margin-top:8px}summary{cursor:pointer;color:#9aa3b5;font-size:13px}
.inside{font-family:ui-monospace,monospace;font-size:12px;columns:2;column-gap:20px}
.filter{margin:8px 0 0;font-size:13px}
@media(max-width:600px){.inside{columns:1}.grid{grid-template-columns:repeat(auto-fill,minmax(96px,1fr))}body{padding:12px 12px 40px}}
</style>
<div class="ey">Ventus · Global Grid 2050</div>
<h1>Block register</h1>
<nav class="nav"><a data-origin="https://ventusltd.github.io/ventus-grid-engine/?graph=periodic-table" href="https://ventusltd.github.io/ventus-grid-engine/?graph=periodic-table">← Map</a><a href="https://globalgrid2050.com/">Home</a><a href="../index.html">Start here</a><a data-origin="https://ventusltd.github.io/stars/code.html" href="../code-record/index.html">Code record</a></nav>
<div class="muted" id="status">Loading…</div>
<div class="muted">Select a block to see what it does, where it runs and what it depends on.</div>
<div class="filter" id="filter" hidden></div>
<div id="table"></div>
<div class="panel" id="panel" hidden></div>
<p class="muted" style="margin-top:20px">Every block has a permanent number. Numbers 1 to 47 are the original register entries; later numbers are blocks added as the code is reviewed. Each block contains its functions, each with its own permanent number; together they form the parts list, kept in the background. <a href="https://github.com/Ventusltd/stars/blob/main/MODULAR-STAR.md">About this regi … [line shortened here: 538 characters; full line on GitHub]
<script src="../corporate.js"></script>
<script>
const ORIGIN = 'https://ventusltd.github.io/stars/';
const $ = s => document.querySelector(s);
const esc = s => String(s).replace(/[&<>"]/g, c => ({'&':'&','<':'<','>':'>','"':'"'}[c]));
const T = s => Corporate.text(s);
const L = u => Corporate.link(u);
const repoName = r => Corporate.label(r, 'repo');
const byName = (a, b) => String(a).localeCompare(String(b), 'en');
document.querySelectorAll('a[data-origin]').forEach(a => a.href = L(a.dataset.origin));
let data;
function closePanel() {
$('#panel').hidden = true;
document.querySelectorAll('.tile.on').forEach(t => t.classList.remove('on'));
const q = new URLSearchParams(location.search); q.delete('block');
history.replaceState(null, '', q.toString() ? '?' + q : location.pathname);
}
function show(sym) {
const b = data.blocks.find(x => x.symbol === sym); if (!b) return;
document.querySelectorAll('.tile').forEach(t => t.classList.toggle('on', t.dataset.sym === sym));
const autos = $('#autos'); if (autos && b.kind === 'auto') autos.open = true;
const cat = data.categories.find(c => c.id === b.category) || { title: 'Other tools', colour: '#9aa3b5' };
const p = $('#panel'); p.hidden = false;
const kind = { constant: 'a value everyone must agree on', engine: 'an engine module', cartridge: 'a plug-in part of the map', layer: 'a map layer', deeplink: 'a link contract', app: 'an app', tool: 'a tool', auto: 'identified automatically from one source file' }[b.kind] || Corporate.type(b.kind);
const state = b.state === 'UNSETTLED' ? ' · value not yet agreed' : b.state === 'SETTLED' ? ' · agreed' : '';
const deps = (b.depends_on || []).slice().sort((x, y) => byName(x.title, y.title));
const usedBy = (b.used_by || []).slice().sort(byName);
const inside = (b.inside || []).slice().sort((x, y) => (y.places - x.places) || byName(x.name, y.name));
// A need whose meaning is just its code name is an identifier and stays as written.
const need = n => n.meaning === n.name ? n.name : T(n.meaning);
const buttons = [
b.live[0] ? `<a class="btn first" href="${esc(L(b.live[0]))}" target="_blank" rel="noopener">Open the live page</a>` : '',
`<a class="btn" href="${esc(L('https://ventusltd.github.io/ventus-grid-engine/?graph=periodic-table&focus=' + encodeURIComponent(b.symbol + ' · ' + b.title)))}">See it on the map</a>`,
b.functions ? `<a class="btn" href="https://ventusltd.github.io/code-generator/?blocks=${encodeURIComponent(b.symbol)}">Add to an app</a>` : '',
b.files[0] ? `<a class="btn" href="https://github.com/${esc(b.files[0].repo)}/blob/${esc(b.files[0].commit)}/${esc(b.files[0].path)}" target="_blank" rel="noopener">Source on GitHub</a>` : ''
].join('');
p.innerHTML = `<button class="close" id="close" title="Close" aria-label="Close">×</button>
<div class="ey" style="color:${cat.colour}">${esc(T(cat.title))} · block ${b.number}</div>
<h3><span style="font-family:ui-monospace,monospace">${esc(b.symbol)}</span> ${esc(T(b.title))}</h3>
<div>${esc(T(b.description))}</div>
<div class="muted" style="margin-top:6px">${esc(kind)}${state}${b.functions ? ` · ${b.functions} functions inside (${b.named_functions} named)` : ' · no code of its own'}${b.repos.length ? ' · held in ' + b.repos.map(r => repoName(r.split('/')[1])).sort(byName).map(esc).join(', ') : ''}${b.first_written ? ' · first written ' + b.first_written.slice(0, 10) : ''}</div>
<div>${buttons}</div>
${deps.length ? `<div style="margin-top:8px"><span class="muted">Depends on:</span> ${deps.map(d => `<a href="?block=${esc(d.symbol)}">${esc(d.symbol)} ${esc(T(d.title))}</a> <span class="muted">(through ${d.via.map(esc).join(", ")})</span>`).join("; ")}</div>` : ""}${usedBy.length ? `<div><span class="muted">Used by:</span> ${usedBy.map(s => `<a href="?block=${esc(s)}">${esc(s)}</a>`).join(", … [line shortened here: 417 characters; full line on GitHub]
${b.needs.length ? `<div style="margin-top:6px"><span style="color:#ffd54a">External dependencies:</span> ${b.needs.slice(0, 8).map(n => esc(need(n))).join('; ')}</div>` : ''}
${inside.length ? `<details><summary>Contents: the parts list (${inside.length} of ${b.named_functions} named functions, most used first)</summary><div class="inside">${inside.map(f => `<div><a href="${esc(L(ORIGIN + 'code.html?family=' + f.family))}">#${f.family}</a> ${esc(f.name)} <span class="muted">×${f.places}</span></div>`).join('')}</div></details>` : ''}`;
$('#close').onclick = closePanel;
document.querySelectorAll('#panel a[href^="?block="]').forEach(a => a.onclick = e => { e.preventDefault(); show(new URLSearchParams(a.getAttribute('href')).get('block')); });
const q = new URLSearchParams(location.search); q.set('block', sym);
history.replaceState(null, '', '?' + q);
}
function showCategory(id) {
const cat = data.categories.find(c => c.id === id); const f = $('#filter');
document.querySelectorAll('.cat').forEach(el => el.classList.toggle('on', el.dataset.cat === id));
if (!cat) { f.hidden = true; return; }
f.hidden = false;
f.innerHTML = `Showing the category <b style="color:${cat.colour}">${esc(T(cat.title))}</b> · <a href="${esc(L(ORIGIN + 'table.html'))}">show every category</a>`;
const h = document.getElementById('h-' + id); if (h) h.scrollIntoView({ block: 'start' });
}
(async () => {
try {
data = await (await fetch(ORIGIN + 'blocks/blocks.json', {cache: 'no-cache'})).json();
const named = data.blocks.filter(b => b.kind !== 'auto'), autos = data.blocks.filter(b => b.kind === 'auto');
$('#status').textContent = `${named.length} named blocks and ${autos.length} blocks identified automatically from source files · ${data.blocks.reduce((s, b) => s + b.functions, 0).toLocaleString('en-GB')} functions in total · updated ${data.generated_utc.slice(0, 16).replace('T', ' ')} UTC`;
const t = $('#table');
const tile = (b, c) => `<div class="tile" data-sym="${esc(b.symbol)}" style="border-top:3px solid ${c.colour}"><div class="num">${b.number}</div><div class="sym">${esc(b.symbol)}</div><div class="t">${esc(T(b.title))}</div><div class="n">${b.functions ? b.functions + ' functions' : 'data only'}${b.state === 'UNSETTLED' ? ' · not agreed' : ''}</div></div>`;
for (const c of data.categories) {
const all = data.blocks.filter(b => b.category === c.id && (b.kind !== 'auto' || b.functions >= 8)).sort((a, b) => a.number - b.number);
if (!all.length) continue;
const bs = all.filter(b => b.kind !== 'auto'), as = all.filter(b => b.kind === 'auto');
t.insertAdjacentHTML('beforeend', `<div class="cat" id="h-${esc(c.id)}" data-cat="${esc(c.id)}"><h2 style="color:${c.colour}"><a href="?category=${esc(c.id)}" style="color:inherit;text-decoration:none">${esc(T(c.title))}</a></h2><span class="muted">${esc(T(c.blurb))}</span></div>`);
if (bs.length) t.insertAdjacentHTML('beforeend', `<div class="grid">${bs.map(b => tile(b, c)).join('')}</div>`);
if (as.length) t.insertAdjacentHTML('beforeend', `<details id="autos"><summary>${as.length} blocks identified automatically from source files, in number order (select to show)</summary><div class="grid" style="margin-top:8px">${as.map(b => tile(b, c)).join('')}</div></details>`);
}
document.querySelectorAll('.tile').forEach(el => el.onclick = () => show(el.dataset.sym));
document.querySelectorAll('.cat h2 a').forEach(a => a.onclick = e => { e.preventDefault(); const id = new URLSearchParams(a.getAttribute('href')).get('category'); history.replaceState(null, '', '?category=' + id); showCategory(id); });
const q = new URLSearchParams(location.search);
if (q.get('category')) showCategory(q.get('category'));
if (q.get('block')) show(q.get('block'));
} catch (e) { $('#status').textContent = 'The block register is not published yet: ' + e.message; }
})();
</script>
</html>