GLOBALGRID2050 / EXPLORE CODE

Part of: Explore Code / Websites and apps / globalgrid2050 / homepage_versions

Homepage V100 and 2 more files

A web page in the homepage versions folder of GlobalGrid2050 that draws homepage catalogue and cables. Published at https://globalgrid2050.com/homepage_versions/homepage_v100.html.

574 lines of HTML from globalgrid2050, in 3 files. Topic: Websites and apps. Section 1960 of 2044.

Cut 2026-12-06T03:07:51+00:00. A copy for reading; the repository at the stated commit is the source.

In the State lines below, domain stage, users and canonical status are rule-based first approximations from code and path evidence (rules explore-agent-rules-v1), not observed facts: the rules.

In this section

  1. Homepage V098 render · globalgrid2050 / homepage_versions/homepage_v098.html lines 1–168
  2. Homepage V099 render · globalgrid2050 / homepage_versions/homepage_v099.html lines 1–197
  3. Homepage V100 render · globalgrid2050 / homepage_versions/homepage_v100.html lines 1–209

Homepage V098

A web page in the homepage versions folder of GlobalGrid2050 that draws homepage catalogue. Published at https://globalgrid2050.com/homepage_versions/homepage_v098.html.

renderglobalgrid2050 / homepage_versions/homepage_v098.html · lines 1–168 of 168 · Entry point · pattern agentCell (shared by 3 files)

What it does
It draws homepage catalogue. Defines 8 functions or classes, including esc, rowsFor, passes, sortRows, agentCell. Side effects: changes the web page (DOM); makes network requests.
Inputs & outputs
In: JSON file homepage-catalogue.json; form fields (user input). Out: web page.
Downstream impact
It is itself an entry point, published at https://globalgrid2050.com/homepage_versions/homepage_v098.html.
What it achieves
It sorts rows (`sortRows`) and is built from the rows for helper (`rowsFor`) and the agent cell helper (`agentCell`). Defines `esc`, `rowsFor`, `passes` and 4 more. It reads `./catalogue/homepage-catalogue.json`. It responds to click and input events.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · homepage_versions · page
Uses
GlobalGrid2050 Historical Builds (link)
Used by
none found
Produces
esc, rowsFor, passes, sortRows, agentCell, row, th, build
Defines here
esc, rowsFor, passes, sortRows, agentCell, row, th, build
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 homepage_versions/homepage_v098.html:1-168 · blob becc31d171115eaff98ac7587589990755565307 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom, network · domain stage: unknown · users: none · canonical: production_core
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>GlobalGrid2050</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
  :root { color-scheme: dark; }
  html { background:#000; }
  body { background:#000; color:#fff; font-family:Courier,monospace; padding:40px; max-width:980px; margin:0 auto; font-size:20px; line-height:1.6; }
  h1 { margin:0 0 6px; }
  a { color:#66ccff; text-decoration:none; }
  a:hover { text-decoration:underline; }
  .lede { color:#aaa; font-size:16px; margin:0 0 22px; }
  #q { width:100%; padding:12px; background:#111; color:#fff; border:1px solid #444; font-family:Courier,monospace; font-size:18px; margin:6px 0 10px; box-sizing:border-box; }
  #q:focus { outline:none; border-color:#66ccff; }
  .controls { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin:0 0 18px; font-size:14px; }
  .controls button, .controls select { background:#000; color:#aab3bf; border:1px solid #343b45; padding:7px 10px; font:700 12px Courier,monospace; cursor:pointer; text-transform:uppercase; }
  .controls button.on, .controls button:hover, .controls select:hover { border-color:#00ffff; color:#00ffff; }
  .controls .count { margin-left:auto; color:#7a7a7a; }
  details.area { border-bottom:1px solid #333; }
  details.area > summary { list-style:none; cursor:pointer; padding:14px 0; color:#00ffff; font-weight:bold; letter-spacing:.5px; font-size:24px; }
  details.area > summary::-webkit-details-marker { display:none; }
  details.area > summary::before { content:"[+] "; }
  details.area[open] > summary::before { content:"[−] "; }
  details.area > summary:hover { color:#66ffff; }
  .current { display:block; margin:4px 0 14px; padding:12px 0; border-top:1px solid #333; border-bottom:1px solid #333; color:#00ffff; font-weight:bold; font-size:26px; line-height:1.15; }
  .current small { display:block; color:#53ff4c; font-size:14px; font-weight:bold; margin-top:4px; }
  .tablewrap { overflow-x:auto; -webkit-overflow-scrolling:touch; margin:0 0 10px; }
  table { width:100%; border-collapse:collapse; font-size:14px; min-width:760px; }
  th { text-align:left; color:#00ffff; padding:8px 10px; border-bottom:1px solid #333; cursor:pointer; white-space:nowrap; user-select:none; }
  th[data-sort]:hover { color:#66ffff; }
  th .dir { color:#7a7a7a; }
  td { padding:8px 10px; border-bottom:1px solid #1c1c1c; vertical-align:top; overflow-wrap:anywhere; }
  td.name a { color:#66ccff; font-weight:bold; }
  td.name .title { display:block; color:#aaa; font-size:12px; }
  .agent { display:inline-block; padding:2px 6px; border:1px solid #3b444f; font-size:11px; font-weight:bold; letter-spacing:.5px; }
  .agent.Claude { border-color:#c8b900; color:#fff95a; } .agent.Codex { border-color:#167d4d; color:#60ff9c; }
  .agent.Copilot { border-color:#a46f00; color:#ffbe45; } .agent.unknown, .agent.none { color:#626b77; }
  .status-current { color:#53ff4c; font-weight:bold; } .status-test { color:#ffbe45; } .status-archived, .status-live { color:#7a7a7a; }
  code { color:#9aa3af; font-size:12px; }
  .more { background:#000; color:#aab3bf; border:1px solid #343b45; padding:8px 14px; font:700 12px Courier,monospace; cursor:pointer; margin:0 0 18px; text-transform:uppercase; }
  .more:hover { border-color:#00ffff; color:#00ffff; }
  .noresult { color:#888; padding:20px 0; }
  .footer { margin-top:50px; font-size:14px; color:#aaa; line-height:1.5; }
  .footer a { color:#5a5a5a; }
  @media(max-width:600px){ body{padding:22px;font-size:18px} details.area>summary{font-size:22px} .current{font-size:22px} }
</style>
</head>
<body>
<header>
  <h1>GlobalGrid2050</h1>
  <p class="lede">UK renewables pipeline and grid atlas. Every published version, newest first. Two references per version: the GlobalGrid2050 reference (UTC stamp-name) and the independent git reference (tree hash) — reconciled on Linux by CI.</p>
</header>
<main>
  <input type="text" id="q" placeholder="Search everything… (name, stamp, agent, commit)" autocomplete="off">
  <div class="controls">
    <span>Agent:</span>
    <button data-agent="" class="on">all</button><button data-agent="Claude">Claude</button><button data-agent="Codex">Codex</button>
    <span style="margin-left:10px">Show:</span>
    <button data-status="" class="on">all</button><button data-status="current">current</button><button data-status="test">test code</button><button data-status="archived">archived</button>
    <span class="count" id="count"></span>
  </div>
  <div id="menu"></div>
</main>
<div class="footer">
  <p><strong>Disclaimer:</strong> Content provided for general technical documentation and research purposes only.</p>
  <p>Catalogue generated from the repository and its git history by <code>scripts/build_homepage_catalogue.py</code>; nothing on this page is typed by hand. <a href="./historical_builds.html">Full archive</a> · <a href="./homepage_versions/">Earlier homepages</a></p>
</div>
<script>
/* THREE NESTS, THREE ROWS EACH, EVERYTHING ELSE ON DEMAND.
 *
 * The data is ./catalogue/homepage-catalogue.json, generated - never typed -
 * from the tree and git. The page is a VIEW over it: the nest headline is the
 * one current release, the table beneath shows the three newest rows, and the
 * rest are behind "show more" and the search. At 409 rows or a million, the DOM
 * only ever carries what is on screen; filtering and sorting happen on the
 * array. The same slice-the-view-never-the-data rule as Pipeline News.
 *
 * Columns: stamp-name (yyyymmddhhmm-name-of-the-project, UTC) · agent · status
 * · commit · barcode. The barcode is the git tree hash, `git rev-parse
 * HEAD:<path>`: a content address that changes if and only if the version
 * changes - the same role the REPD REF plays for a project in Pipeline News.
 * It is what every runner pins, so a CI pin is copied from the table. */
const NESTS = [
  { key: "pipeline-news", title: "Pipeline News", families: ["pipeline-news"], testProject: "test-code-pipeline-news" },
  { key: "grid-atlas",    title: "Grid Atlas",    families: ["grid-atlas"],    testProject: "test-code-grid-atlas" },
  { key: "about-media",   title: "About & Media", families: ["about-media"],   testProject: null },
];
const PAGE = 3;
const state = { q: "", agent: "", status: "", sort: { key: "stamp", dir: -1 }, open: {} };
let ALL = [];
const esc = s => String(s ?? "").replace(/[&<>"']/g, c => ({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[c]));

function rowsFor(nest) {
  return ALL.filter(e => nest.families.includes(e.family) || (nest.testProject && e.project === nest.testProject) || (nest.key === "grid-atlas" && e.project === "test-code-cable-geometry") || (nest.key === "about-media" && e.project === "test-code"));
}
function passes(e) {
  if (state.agent && (e.agent || "") !== state.agent) return false;
  if (state.status && (e.status || "") !== state.status) return false;
  if (state.q) {
    const hay = [e.id, e.title, e.agent, e.agent_source, e.commit, e.tree, e.family, e.status, e.kind].join(" ").toLowerCase();
    if (!hay.includes(state.q)) return false;
  }
  return true;
}
function sortRows(rows) {
  const { key, dir } = state.sort;
  return rows.slice().sort((a, b) => {
    const x = String(a[key] ?? ""), y = String(b[key] ?? "");
    if (x === y) return (b.stamp || "").localeCompare(a.stamp || "");
    return x < y ? -dir : dir;
  });
}
function agentCell(e) {
  const a = e.agent || "—";
  const model = e.agent_model ? ` <code>${esc(e.agent_model)}</code>` : "";
  return `<span class="agent ${esc(a)}" title="${esc(e.agent_source || "")}">${esc(a)}</span>${model}`;
}
function row(e) {
  const tree = e.tree ? `<code title="${esc(e.tree)} — click to copy" data-copy="${esc(e.tree)}" style="cursor:copy">${esc(e.tree.slice(0, 12))}</code>` : `<code>—</code>`;
  const commit = e.commit ? `<code title="${esc(e.commit_full || e.commit)}">${esc(e.commit)}</code>` : `<code>—</code>`;
  return `<tr>
    <td class="name"><a href="${encodeURI(e.url)}">${esc(e.id)}</a><span class="title">${esc(e.title)}</span></td>
    <td>${agentCell(e)}</td>
    <td class="status-${esc(e.status || "")}">${esc(e.status || "")}</td>
    <td>${commit}</td><td>${tree}</td></tr>`;
}
function th(label, key) {
  const on = state.sort.key === key;
  return `<th data-sort="${key}">${label} <span class="dir">${on ? (state.sort.dir < 0 ? "▼" : "▲") : "↕"}</span></th>`;
}
function build() {
  const menu = document.getElementById("menu");
  let html = "", total = 0, shown = 0;
  for (const nest of NESTS) {
    const all = rowsFor(nest);
    const current = all.find(e => e.status === "current");
    const rows = sortRows(all.filter(passes));
    total += rows.length;
    const limit = state.open[nest.key] ? rows.length : PAGE;
    const visible = rows.slice(0, limit); shown += visible.length;
    const head = current && !state.q && !state.agent && !state.status
      ? `<a class="current" href="${encodeURI(current.url)}">${esc(current.title)}<small>${esc(current.id)} · ${esc(current.agent || "")} · ${esc(current.commit || "")}</small></a>` : "";
    const table = rows.length ? `<div class="tablewrap"><table><thead><tr>${th("Version · UTC stamp-name", "id")}${th("Agent", "agent")}${th("Status", "status")}${th("Commit", "commit")}<th title="git rev-parse HEAD:&lt;path&gt; — a content address: it changes if and only if the version changes. The value every runner pins.">Barcode · git tree</th></tr></thead><tbody>${visible.map(row).join("")}</  … [line shortened here: 482 characters; full line on GitHub]
    const more = rows.length > PAGE ? `<button class="more" data-more="${nest.key}">${state.open[nest.key] ? "show 3" : `show all ${rows.length}`}</button>` : "";
    const open = state.q || state.agent || state.status || nest.key !== "about-media" ? " open" : "";
    html += `<details class="area"${open}><summary>${esc(nest.title)} <span style="color:#7a7a7a;font-size:15px">(${rows.length})</span></summary>${head}${table}${more}</details>`;
  }
  menu.innerHTML = html;
  document.getElementById("count").textContent = `${shown} of ${total} shown · ${ALL.length} versions catalogued`;
}
document.addEventListener("click", ev => {
  const c = ev.target.closest("[data-copy]");
  if (c && navigator.clipboard) { navigator.clipboard.writeText(c.dataset.copy); c.textContent = "copied"; setTimeout(() => { c.textContent = c.dataset.copy.slice(0, 12); }, 900); return; }
  const t = ev.target.closest("[data-more],[data-agent],[data-status],th[data-sort]");
  if (!t) return;
  if (t.dataset.more !== undefined) { state.open[t.dataset.more] = !state.open[t.dataset.more]; build(); }
  else if (t.dataset.agent !== undefined) { state.agent = t.dataset.agent; document.querySelectorAll("[data-agent]").forEach(b => b.classList.toggle("on", b === t)); build(); }
  else if (t.dataset.status !== undefined) { state.status = t.dataset.status; document.querySelectorAll("[data-status]").forEach(b => b.classList.toggle("on", b === t)); build(); }
  else if (t.dataset.sort) { const k = t.dataset.sort; state.sort = { key: k, dir: state.sort.key === k ? -state.sort.dir : -1 }; build(); }
});
document.getElementById("q").addEventListener("input", e => { state.q = e.target.value.trim().toLowerCase(); build(); });
fetch("./catalogue/homepage-catalogue.json").then(r => r.json()).then(d => { ALL = d.entries; build(); })
  .catch(err => { document.getElementById("menu").innerHTML = `<p class="noresult">Catalogue unavailable: ${esc(err.message)}. <a href="./historical_builds.html">Full archive</a>.</p>`; });
</script>
</body>
</html>

Homepage V099

A web page in the homepage versions folder of GlobalGrid2050 that draws homepage catalogue. Published at https://globalgrid2050.com/homepage_versions/homepage_v099.html.

renderglobalgrid2050 / homepage_versions/homepage_v099.html · lines 1–197 of 197 · Entry point · pattern agentCell (shared by 3 files)

What it does
It draws homepage catalogue. Defines 9 functions or classes, including esc, rowsFor, passes, sortRows, agentCell. Side effects: changes the web page (DOM); makes network requests.
Inputs & outputs
In: JSON file homepage-catalogue.json; form fields (user input). Out: web page.
Downstream impact
It is itself an entry point, published at https://globalgrid2050.com/homepage_versions/homepage_v099.html.
What it achieves
It sorts rows (`sortRows`) and is built from the rows for helper (`rowsFor`) and the agent cell helper (`agentCell`). Defines `esc`, `rowsFor`, `passes` and 5 more. It reads `./catalogue/homepage-catalogue.json`. It responds to click and input events.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · homepage_versions · page
Uses
GlobalGrid2050 Historical Builds (link)
Used by
none found
Produces
esc, rowsFor, passes, sortRows, agentCell, row, th, browsing, build
Defines here
esc, rowsFor, passes, sortRows, agentCell, row, th, browsing, build
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 homepage_versions/homepage_v099.html:1-197 · blob 4f9fe26e31c80c3eaf06fe2decf5339f3040835a · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom, network · domain stage: unknown · users: none · canonical: production_core
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>GlobalGrid2050</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
  :root { color-scheme: dark; }
  html { background:#000; }
  body { background:#000; color:#fff; font-family:Courier,monospace; padding:40px; max-width:980px; margin:0 auto; font-size:20px; line-height:1.6; }
  h1 { margin:0 0 6px; }
  a { color:#66ccff; text-decoration:none; }
  a:hover { text-decoration:underline; }
  .lede { color:#aaa; font-size:16px; margin:0 0 22px; }
  #q { width:100%; padding:12px; background:#111; color:#fff; border:1px solid #444; font-family:Courier,monospace; font-size:18px; margin:6px 0 10px; box-sizing:border-box; }
  #q:focus { outline:none; border-color:#66ccff; }
  .controls { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin:0 0 18px; font-size:14px; }
  .controls button, .controls select { background:#000; color:#aab3bf; border:1px solid #343b45; padding:7px 10px; font:700 12px Courier,monospace; cursor:pointer; text-transform:uppercase; }
  .controls button.on, .controls button:hover, .controls select:hover { border-color:#00ffff; color:#00ffff; }
  .controls .count { margin-left:auto; color:#7a7a7a; }
  details.area { border-bottom:1px solid #333; }
  details.area > summary { list-style:none; cursor:pointer; padding:14px 0; color:#00ffff; font-weight:bold; letter-spacing:.5px; font-size:24px; }
  details.area > summary::-webkit-details-marker { display:none; }
  details.area > summary::before { content:"[+] "; }
  details.area[open] > summary::before { content:"[−] "; }
  details.area > summary:hover { color:#66ffff; }
  .current { display:block; margin:4px 0 14px; padding:12px 0; border-top:1px solid #333; border-bottom:1px solid #333; color:#00ffff; font-weight:bold; font-size:26px; line-height:1.15; }
  .current small { display:block; color:#53ff4c; font-size:14px; font-weight:bold; margin-top:4px; }
  .tablewrap { overflow-x:auto; -webkit-overflow-scrolling:touch; margin:0 0 10px; }
  table { width:100%; border-collapse:collapse; font-size:14px; min-width:760px; }
  th { text-align:left; color:#00ffff; padding:8px 10px; border-bottom:1px solid #333; cursor:pointer; white-space:nowrap; user-select:none; }
  th[data-sort]:hover { color:#66ffff; }
  th .dir { color:#7a7a7a; }
  td { padding:8px 10px; border-bottom:1px solid #1c1c1c; vertical-align:top; overflow-wrap:anywhere; }
  td.name a { color:#66ccff; font-weight:bold; }
  td.name .title { display:block; color:#aaa; font-size:12px; }
  .agent { display:inline-block; padding:2px 6px; border:1px solid #3b444f; font-size:11px; font-weight:bold; letter-spacing:.5px; }
  .agent.Claude { border-color:#c8b900; color:#fff95a; } .agent.Codex { border-color:#167d4d; color:#60ff9c; }
  .agent.Copilot { border-color:#a46f00; color:#ffbe45; } .agent.unknown, .agent.none { color:#626b77; }
  .status-current { color:#53ff4c; font-weight:bold; } .status-test { color:#ffbe45; } .status-archived, .status-live { color:#7a7a7a; }
  code { color:#9aa3af; font-size:12px; }
  .more { background:#000; color:#aab3bf; border:1px solid #343b45; padding:8px 14px; font:700 12px Courier,monospace; cursor:pointer; margin:0 0 18px; text-transform:uppercase; }
  .more:hover { border-color:#00ffff; color:#00ffff; }
  .noresult { color:#888; padding:20px 0; }
  .footer { margin-top:50px; font-size:14px; color:#aaa; line-height:1.5; }
  .footer a { color:#5a5a5a; }
  @media(max-width:600px){ body{padding:22px;font-size:18px} details.area>summary{font-size:22px} .current{font-size:22px} }
</style>
</head>
<body>
<header>
  <h1>GlobalGrid2050</h1>
  <p class="lede">UK renewables pipeline. Every published version, newest first, with two references each: the GlobalGrid2050 reference (UTC stamp-name) and the independent git reference (tree hash) — reconciled on Linux by CI. Everything else on this site is archived and reachable from the search box below.</p>
</header>
<main>
  <input type="text" id="q" placeholder="Search everything… (name, stamp, agent, commit)" autocomplete="off">
  <div class="controls">
    <span>Agent:</span>
    <button data-agent="" class="on">all</button><button data-agent="Claude">Claude</button><button data-agent="Codex">Codex</button>
    <span style="margin-left:10px">Show:</span>
    <button data-status="" class="on">all</button><button data-status="current">current</button><button data-status="test">test code</button><button data-status="archived">archived</button>
    <span class="count" id="count"></span>
  </div>
  <div id="menu"></div>
</main>
<div class="footer">
  <p><strong>Disclaimer:</strong> Content provided for general technical documentation and research purposes only.</p>
  <p>Catalogue generated from the repository and its git history by <code>scripts/build_homepage_catalogue.py</code>; nothing on this page is typed by hand. <a href="./historical_builds.html">Full archive</a> · <a href="./homepage_versions/">Earlier homepages</a></p>
</div>
<script>
/* THREE NESTS, THREE ROWS EACH, EVERYTHING ELSE ON DEMAND.
 *
 * The data is ./catalogue/homepage-catalogue.json, generated - never typed -
 * from the tree and git. The page is a VIEW over it: the nest headline is the
 * one current release, the table beneath shows the three newest rows, and the
 * rest are behind "show more" and the search. At 409 rows or a million, the DOM
 * only ever carries what is on screen; filtering and sorting happen on the
 * array. The same slice-the-view-never-the-data rule as Pipeline News.
 *
 * Columns: stamp-name (yyyymmddhhmm-name-of-the-project, UTC) · agent · status
 * · commit · barcode. The barcode is the git tree hash, `git rev-parse
 * HEAD:<path>`: a content address that changes if and only if the version
 * changes - the same role the REPD REF plays for a project in Pipeline News.
 * It is what every runner pins, so a CI pin is copied from the table. */
const NESTS = [
  { key: "pipeline-news", title: "Pipeline News", families: ["pipeline-news"], testProject: "test-code-pipeline-news" },
  { key: "grid-atlas",    title: "Grid Atlas",    families: ["grid-atlas"],    testProject: "test-code-grid-atlas" },
  { key: "about-media",   title: "About & Media", families: ["about-media"],   testProject: null },
];
const PAGE = 3;
const state = { q: "", agent: "", status: "", sort: { key: "stamp", dir: -1 }, open: {} };
let ALL = [];
const esc = s => String(s ?? "").replace(/[&<>"']/g, c => ({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[c]));

function rowsFor(nest) {
  return ALL.filter(e => nest.families.includes(e.family) || (nest.testProject && e.project === nest.testProject) || (nest.key === "grid-atlas" && e.project === "test-code-cable-geometry") || (nest.key === "about-media" && e.project === "test-code"));
}
function passes(e) {
  if (state.agent && (e.agent || "") !== state.agent) return false;
  if (state.status && (e.status || "") !== state.status) return false;
  if (state.q) {
    const hay = [e.id, e.title, e.agent, e.agent_source, e.commit, e.tree, e.family, e.status, e.kind].join(" ").toLowerCase();
    if (!hay.includes(state.q)) return false;
  }
  return true;
}
function sortRows(rows) {
  const { key, dir } = state.sort;
  return rows.slice().sort((a, b) => {
    const x = String(a[key] ?? ""), y = String(b[key] ?? "");
    if (x === y) return (b.stamp || "").localeCompare(a.stamp || "");
    return x < y ? -dir : dir;
  });
}
function agentCell(e) {
  const a = e.agent || "—";
  const model = e.agent_model ? ` <code>${esc(e.agent_model)}</code>` : "";
  return `<span class="agent ${esc(a)}" title="${esc(e.agent_source || "")}">${esc(a)}</span>${model}`;
}
function row(e) {
  const tree = e.tree ? `<code title="${esc(e.tree)} — click to copy" data-copy="${esc(e.tree)}" style="cursor:copy">${esc(e.tree.slice(0, 12))}</code>` : `<code>—</code>`;
  const commit = e.commit ? `<code title="${esc(e.commit_full || e.commit)}">${esc(e.commit)}</code>` : `<code>—</code>`;
  return `<tr>
    <td class="name"><a href="${encodeURI(e.url)}">${esc(e.id)}</a><span class="title">${esc(e.title)}</span></td>
    <td>${agentCell(e)}</td>
    <td class="status-${esc(e.status || "")}">${esc(e.status || "")}</td>
    <td>${commit}</td><td>${tree}</td></tr>`;
}
function th(label, key) {
  const on = state.sort.key === key;
  return `<th data-sort="${key}">${label} <span class="dir">${on ? (state.sort.dir < 0 ? "▼" : "▲") : "↕"}</span></th>`;
}
/* ARCHIVED, NOT DELETED.
 *
 * The owner asked for the site to be archived down to a search box and Pipeline
 * News. Archived is the operative word: the catalogue still carries all 400-odd
 * versions, the generator is untouched, and nothing has been removed from the
 * data. What changed is the VIEW - the same slice-the-view-never-the-data rule
 * the table has always followed.
 *
 * So Pipeline News is the page. Grid Atlas and About & Media are not shown
 * until the reader asks for them, and the moment anything is typed in the
 * search box or a filter is pressed, every nest returns and the search runs
 * across all of them. A homepage that hid its own history behind a link nobody
 * clicks would not be an archive, it would be a loss. */
const DEFAULT_NESTS = ["pipeline-news"];
function browsing() { return Boolean(state.q || state.agent || state.status); }

function build() {
  const menu = document.getElementById("menu");
  let html = "", total = 0, shown = 0;
  const nests = browsing() ? NESTS : NESTS.filter(n => DEFAULT_NESTS.includes(n.key));
  for (const nest of nests) {
    const all = rowsFor(nest);
    const current = all.find(e => e.status === "current");
    const rows = sortRows(all.filter(passes));
    total += rows.length;
    const limit = state.open[nest.key] ? rows.length : PAGE;
    const visible = rows.slice(0, limit); shown += visible.length;
    const head = current && !state.q && !state.agent && !state.status
      ? `<a class="current" href="${encodeURI(current.url)}">${esc(current.title)}<small>${esc(current.id)} · ${esc(current.agent || "")} · ${esc(current.commit || "")}</small></a>` : "";
    const table = rows.length ? `<div class="tablewrap"><table><thead><tr>${th("Version · UTC stamp-name", "id")}${th("Agent", "agent")}${th("Status", "status")}${th("Commit", "commit")}<th title="git rev-parse HEAD:&lt;path&gt; — a content address: it changes if and only if the version changes. The value every runner pins.">Barcode · git tree</th></tr></thead><tbody>${visible.map(row).join("")}</  … [line shortened here: 482 characters; full line on GitHub]
    const more = rows.length > PAGE ? `<button class="more" data-more="${nest.key}">${state.open[nest.key] ? "show 3" : `show all ${rows.length}`}</button>` : "";
    const open = browsing() || nest.key !== "about-media" ? " open" : "";
    html += `<details class="area"${open}><summary>${esc(nest.title)} <span style="color:#7a7a7a;font-size:15px">(${rows.length})</span></summary>${head}${table}${more}</details>`;
  }
  /* Say what is being withheld and how to reach it, in the place the reader is
     already looking. An archive nobody can find is indistinguishable from a
     deletion. */
  if (!browsing()) {
    const rest = ALL.length - rowsFor(NESTS[0]).length;
    html += `<p class="noresult">Grid Atlas and About &amp; Media are archived: `
      + `${rest} further versions stay in the catalogue and are not shown here. `
      + `Search above to reach any of them, or open the `
      + `<a href="./historical_builds.html">full archive</a>.</p>`;
  }
  menu.innerHTML = html;
  document.getElementById("count").textContent = browsing()
    ? `${shown} of ${total} shown · ${ALL.length} versions catalogued`
    : `${shown} of ${total} Pipeline News shown · ${ALL.length} versions catalogued, searchable above`;
}
document.addEventListener("click", ev => {
  const c = ev.target.closest("[data-copy]");
  if (c && navigator.clipboard) { navigator.clipboard.writeText(c.dataset.copy); c.textContent = "copied"; setTimeout(() => { c.textContent = c.dataset.copy.slice(0, 12); }, 900); return; }
  const t = ev.target.closest("[data-more],[data-agent],[data-status],th[data-sort]");
  if (!t) return;
  if (t.dataset.more !== undefined) { state.open[t.dataset.more] = !state.open[t.dataset.more]; build(); }
  else if (t.dataset.agent !== undefined) { state.agent = t.dataset.agent; document.querySelectorAll("[data-agent]").forEach(b => b.classList.toggle("on", b === t)); build(); }
  else if (t.dataset.status !== undefined) { state.status = t.dataset.status; document.querySelectorAll("[data-status]").forEach(b => b.classList.toggle("on", b === t)); build(); }
  else if (t.dataset.sort) { const k = t.dataset.sort; state.sort = { key: k, dir: state.sort.key === k ? -state.sort.dir : -1 }; build(); }
});
document.getElementById("q").addEventListener("input", e => { state.q = e.target.value.trim().toLowerCase(); build(); });
fetch("./catalogue/homepage-catalogue.json").then(r => r.json()).then(d => { ALL = d.entries; build(); })
  .catch(err => { document.getElementById("menu").innerHTML = `<p class="noresult">Catalogue unavailable: ${esc(err.message)}. <a href="./historical_builds.html">Full archive</a>.</p>`; });
</script>
</body>
</html>

Homepage V100

A web page in the homepage versions folder of GlobalGrid2050 that draws homepage catalogue and cables. Published at https://globalgrid2050.com/homepage_versions/homepage_v100.html.

renderglobalgrid2050 / homepage_versions/homepage_v100.html · lines 1–209 of 209 · Entry point · pattern agentCell (shared by 3 files)

What it does
It draws homepage catalogue and cables. Defines 9 functions or classes, including esc, rowsFor, passes, sortRows, agentCell. Side effects: changes the web page (DOM); makes network requests.
Why it exists in the grid workflow
Domain terms in the code: cables.
Inputs & outputs
In: JSON file homepage-catalogue.json; form fields (user input). Out: web page.
Downstream impact
It is itself an entry point, published at https://globalgrid2050.com/homepage_versions/homepage_v100.html.
What it achieves
It sorts rows (`sortRows`) and is built from the rows for helper (`rowsFor`) and the agent cell helper (`agentCell`). Defines `esc`, `rowsFor`, `passes` and 5 more. It reads `./catalogue/homepage-catalogue.json`. It responds to click and input events.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · homepage_versions · page
Uses
GlobalGrid2050 Historical Builds (link)
Used by
none found
Produces
esc, rowsFor, passes, sortRows, agentCell, row, th, browsing, build
Defines here
esc, rowsFor, passes, sortRows, agentCell, row, th, browsing, build
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 homepage_versions/homepage_v100.html:1-209 · blob cd5caa44423dff1aae2149bc7469e5964a734483 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom, network · domain stage: unknown · users: none · canonical: production_core
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>GlobalGrid2050</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
  :root { color-scheme: dark; }
  html { background:#000; }
  body { background:#000; color:#fff; font-family:Courier,monospace; padding:40px; max-width:980px; margin:0 auto; font-size:20px; line-height:1.6; }
  h1 { margin:0 0 6px; }
  a { color:#66ccff; text-decoration:none; }
  a:hover { text-decoration:underline; }
  .lede { color:#aaa; font-size:16px; margin:0 0 22px; }
  #q { width:100%; padding:12px; background:#111; color:#fff; border:1px solid #444; font-family:Courier,monospace; font-size:18px; margin:6px 0 10px; box-sizing:border-box; }
  #q:focus { outline:none; border-color:#66ccff; }
  .controls { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin:0 0 18px; font-size:14px; }
  .controls button, .controls select { background:#000; color:#aab3bf; border:1px solid #343b45; padding:7px 10px; font:700 12px Courier,monospace; cursor:pointer; text-transform:uppercase; }
  .controls button.on, .controls button:hover, .controls select:hover { border-color:#00ffff; color:#00ffff; }
  .controls .count { margin-left:auto; color:#7a7a7a; }
  details.area { border-bottom:1px solid #333; }
  details.area > summary { list-style:none; cursor:pointer; padding:14px 0; color:#00ffff; font-weight:bold; letter-spacing:.5px; font-size:24px; }
  details.area > summary::-webkit-details-marker { display:none; }
  details.area > summary::before { content:"[+] "; }
  details.area[open] > summary::before { content:"[−] "; }
  details.area > summary:hover { color:#66ffff; }
  .current { display:block; margin:4px 0 14px; padding:12px 0; border-top:1px solid #333; border-bottom:1px solid #333; color:#00ffff; font-weight:bold; font-size:26px; line-height:1.15; }
  .current small { display:block; color:#53ff4c; font-size:14px; font-weight:bold; margin-top:4px; }
  .tablewrap { overflow-x:auto; -webkit-overflow-scrolling:touch; margin:0 0 10px; }
  table { width:100%; border-collapse:collapse; font-size:14px; min-width:760px; }
  th { text-align:left; color:#00ffff; padding:8px 10px; border-bottom:1px solid #333; cursor:pointer; white-space:nowrap; user-select:none; }
  th[data-sort]:hover { color:#66ffff; }
  th .dir { color:#7a7a7a; }
  td { padding:8px 10px; border-bottom:1px solid #1c1c1c; vertical-align:top; overflow-wrap:anywhere; }
  td.name a { color:#66ccff; font-weight:bold; }
  td.name .title { display:block; color:#aaa; font-size:12px; }
  .agent { display:inline-block; padding:2px 6px; border:1px solid #3b444f; font-size:11px; font-weight:bold; letter-spacing:.5px; }
  .agent.Claude { border-color:#c8b900; color:#fff95a; } .agent.Codex { border-color:#167d4d; color:#60ff9c; }
  .agent.Copilot { border-color:#a46f00; color:#ffbe45; } .agent.unknown, .agent.none { color:#626b77; }
  .status-current { color:#53ff4c; font-weight:bold; } .status-test { color:#ffbe45; } .status-archived, .status-live { color:#7a7a7a; }
  code { color:#9aa3af; font-size:12px; }
  .more { background:#000; color:#aab3bf; border:1px solid #343b45; padding:8px 14px; font:700 12px Courier,monospace; cursor:pointer; margin:0 0 18px; text-transform:uppercase; }
  .more:hover { border-color:#00ffff; color:#00ffff; }
  .noresult { color:#888; padding:20px 0; }
  .footer { margin-top:50px; font-size:14px; color:#aaa; line-height:1.5; }
  .footer a { color:#5a5a5a; }
  @media(max-width:600px){ body{padding:22px;font-size:18px} details.area>summary{font-size:22px} .current{font-size:22px} }
</style>
</head>
<body>
<header>
  <h1>GlobalGrid2050</h1>
  <p class="lede">UK renewables pipeline — the current release. Every earlier version, and everything else on this site, is archived and reachable from the search box below, each with two references: the GlobalGrid2050 reference (UTC stamp-name) and the independent git reference (tree hash), reconciled on Linux by CI.</p>
</header>
<main>
  <input type="text" id="q" placeholder="Search everything… (name, stamp, agent, commit)" autocomplete="off">
  <div class="controls">
    <span>Agent:</span>
    <button data-agent="" class="on">all</button><button data-agent="Claude">Claude</button><button data-agent="Codex">Codex</button>
    <span style="margin-left:10px">Show:</span>
    <button data-status="" class="on">all</button><button data-status="current">current</button><button data-status="test">test code</button><button data-status="archived">archived</button>
    <span class="count" id="count"></span>
  </div>
  <div id="menu"></div>
</main>
<div class="footer">
  <p><strong>Disclaimer:</strong> Content provided for general technical documentation and research purposes only.</p>
  <p>Catalogue generated from the repository and its git history by <code>scripts/build_homepage_catalogue.py</code>; nothing on this page is typed by hand. <a href="./historical_builds.html">Full archive</a> · <a href="./homepage_versions/">Earlier homepages</a></p>
</div>
<script>
/* THREE NESTS, THREE ROWS EACH, EVERYTHING ELSE ON DEMAND.
 *
 * The data is ./catalogue/homepage-catalogue.json, generated - never typed -
 * from the tree and git. The page is a VIEW over it: the nest headline is the
 * one current release, the table beneath shows the three newest rows, and the
 * rest are behind "show more" and the search. At 409 rows or a million, the DOM
 * only ever carries what is on screen; filtering and sorting happen on the
 * array. The same slice-the-view-never-the-data rule as Pipeline News.
 *
 * Columns: stamp-name (yyyymmddhhmm-name-of-the-project, UTC) · agent · status
 * · commit · barcode. The barcode is the git tree hash, `git rev-parse
 * HEAD:<path>`: a content address that changes if and only if the version
 * changes - the same role the REPD REF plays for a project in Pipeline News.
 * It is what every runner pins, so a CI pin is copied from the table. */
const NESTS = [
  { key: "pipeline-news", title: "Pipeline News", families: ["pipeline-news"], testProject: "test-code-pipeline-news" },
  { key: "grid-atlas",    title: "Grid Atlas",    families: ["grid-atlas"],    testProject: "test-code-grid-atlas" },
  { key: "about-media",   title: "About & Media", families: ["about-media"],   testProject: null },
];
const PAGE = 3;
const state = { q: "", agent: "", status: "", sort: { key: "stamp", dir: -1 }, open: {} };
let ALL = [];
const esc = s => String(s ?? "").replace(/[&<>"']/g, c => ({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[c]));

function rowsFor(nest) {
  return ALL.filter(e => nest.families.includes(e.family) || (nest.testProject && e.project === nest.testProject) || (nest.key === "grid-atlas" && e.project === "test-code-cable-geometry") || (nest.key === "about-media" && e.project === "test-code"));
}
function passes(e) {
  if (state.agent && (e.agent || "") !== state.agent) return false;
  if (state.status && (e.status || "") !== state.status) return false;
  if (state.q) {
    const hay = [e.id, e.title, e.agent, e.agent_source, e.commit, e.tree, e.family, e.status, e.kind].join(" ").toLowerCase();
    if (!hay.includes(state.q)) return false;
  }
  return true;
}
function sortRows(rows) {
  const { key, dir } = state.sort;
  return rows.slice().sort((a, b) => {
    const x = String(a[key] ?? ""), y = String(b[key] ?? "");
    if (x === y) return (b.stamp || "").localeCompare(a.stamp || "");
    return x < y ? -dir : dir;
  });
}
function agentCell(e) {
  const a = e.agent || "—";
  const model = e.agent_model ? ` <code>${esc(e.agent_model)}</code>` : "";
  return `<span class="agent ${esc(a)}" title="${esc(e.agent_source || "")}">${esc(a)}</span>${model}`;
}
function row(e) {
  const tree = e.tree ? `<code title="${esc(e.tree)} — click to copy" data-copy="${esc(e.tree)}" style="cursor:copy">${esc(e.tree.slice(0, 12))}</code>` : `<code>—</code>`;
  const commit = e.commit ? `<code title="${esc(e.commit_full || e.commit)}">${esc(e.commit)}</code>` : `<code>—</code>`;
  return `<tr>
    <td class="name"><a href="${encodeURI(e.url)}">${esc(e.id)}</a><span class="title">${esc(e.title)}</span></td>
    <td>${agentCell(e)}</td>
    <td class="status-${esc(e.status || "")}">${esc(e.status || "")}</td>
    <td>${commit}</td><td>${tree}</td></tr>`;
}
function th(label, key) {
  const on = state.sort.key === key;
  return `<th data-sort="${key}">${label} <span class="dir">${on ? (state.sort.dir < 0 ? "▼" : "▲") : "↕"}</span></th>`;
}
/* ARCHIVED, NOT DELETED.
 *
 * The owner asked for the site to be archived down to a search box and Pipeline
 * News. Archived is the operative word: the catalogue still carries all 400-odd
 * versions, the generator is untouched, and nothing has been removed from the
 * data. What changed is the VIEW - the same slice-the-view-never-the-data rule
 * the table has always followed.
 *
 * So Pipeline News is the page. Grid Atlas and About & Media are not shown
 * until the reader asks for them, and the moment anything is typed in the
 * search box or a filter is pressed, every nest returns and the search runs
 * across all of them. A homepage that hid its own history behind a link nobody
 * clicks would not be an archive, it would be a loss. */
const DEFAULT_NESTS = ["pipeline-news"];
function browsing() { return Boolean(state.q || state.agent || state.status); }

function build() {
  const menu = document.getElementById("menu");
  let html = "", total = 0, shown = 0;
  const nests = browsing() ? NESTS : NESTS.filter(n => DEFAULT_NESTS.includes(n.key));
  for (const nest of nests) {
    const all = rowsFor(nest);
    const current = all.find(e => e.status === "current");
    const rows = sortRows(all.filter(passes));
    total += rows.length;
    const limit = state.open[nest.key] ? rows.length : PAGE;
    const visible = rows.slice(0, limit); shown += visible.length;
    const head = current && !state.q && !state.agent && !state.status
      ? `<a class="current" href="${encodeURI(current.url)}">${esc(current.title)}<small>${esc(current.id)} · ${esc(current.agent || "")} · ${esc(current.commit || "")}</small></a>` : "";
    const table = rows.length ? `<div class="tablewrap"><table><thead><tr>${th("Version · UTC stamp-name", "id")}${th("Agent", "agent")}${th("Status", "status")}${th("Commit", "commit")}<th title="git rev-parse HEAD:&lt;path&gt; — a content address: it changes if and only if the version changes. The value every runner pins.">Barcode · git tree</th></tr></thead><tbody>${visible.map(row).join("")}</  … [line shortened here: 482 characters; full line on GitHub]
    const more = rows.length > PAGE ? `<button class="more" data-more="${nest.key}">${state.open[nest.key] ? "show 3" : `show all ${rows.length}`}</button>` : "";
    const open = browsing() || nest.key !== "about-media" ? " open" : "";
    /* JUST THE WORKING VERSION.
     *
     * The owner, after publishing 202609081016 on the offshore cable engine:
     * archive everything else, leave just this working version. So the default
     * view is the one current release and nothing beneath it - no table of older
     * releases, no show-all. Every one of them is still in the catalogue and
     * returns the moment anything is typed in the search or a filter is pressed;
     * the notice below says how many and how. Archived, not deleted. */
    const body = browsing() ? `${table}${more}` : "";
    const summary = browsing()
      ? `${esc(nest.title)} <span style="color:#7a7a7a;font-size:15px">(${rows.length})</span>`
      : `${esc(nest.title)} <span style="color:#7a7a7a;font-size:15px">current release</span>`;
    html += `<details class="area"${open}><summary>${summary}</summary>${head}${body}</details>`;
  }
  /* Say what is being withheld and how to reach it, in the place the reader is
     already looking. An archive nobody can find is indistinguishable from a
     deletion. */
  if (!browsing()) {
    const rest = ALL.length - 1;
    html += `<p class="noresult">Everything else is archived: `
      + `${rest} earlier versions of Pipeline News, Grid Atlas and About &amp; Media stay in the `
      + `catalogue and are not shown here. Search above to reach any of them, or open the `
      + `<a href="./historical_builds.html">full archive</a>.</p>`;
  }
  menu.innerHTML = html;
  document.getElementById("count").textContent = browsing()
    ? `${shown} of ${total} shown · ${ALL.length} versions catalogued`
    : `1 current release shown · ${ALL.length} versions catalogued, searchable above`;
}
document.addEventListener("click", ev => {
  const c = ev.target.closest("[data-copy]");
  if (c && navigator.clipboard) { navigator.clipboard.writeText(c.dataset.copy); c.textContent = "copied"; setTimeout(() => { c.textContent = c.dataset.copy.slice(0, 12); }, 900); return; }
  const t = ev.target.closest("[data-more],[data-agent],[data-status],th[data-sort]");
  if (!t) return;
  if (t.dataset.more !== undefined) { state.open[t.dataset.more] = !state.open[t.dataset.more]; build(); }
  else if (t.dataset.agent !== undefined) { state.agent = t.dataset.agent; document.querySelectorAll("[data-agent]").forEach(b => b.classList.toggle("on", b === t)); build(); }
  else if (t.dataset.status !== undefined) { state.status = t.dataset.status; document.querySelectorAll("[data-status]").forEach(b => b.classList.toggle("on", b === t)); build(); }
  else if (t.dataset.sort) { const k = t.dataset.sort; state.sort = { key: k, dir: state.sort.key === k ? -state.sort.dir : -1 }; build(); }
});
document.getElementById("q").addEventListener("input", e => { state.q = e.target.value.trim().toLowerCase(); build(); });
fetch("./catalogue/homepage-catalogue.json").then(r => r.json()).then(d => { ALL = d.entries; build(); })
  .catch(err => { document.getElementById("menu").innerHTML = `<p class="noresult">Catalogue unavailable: ${esc(err.message)}. <a href="./historical_builds.html">Full archive</a>.</p>`; });
</script>
</body>
</html>