GLOBALGRID2050 / EXPLORE CODE

Part of: Explore Code / Cables and conductors / globalgrid2050 / testcode/202609060432/cable

Testcode — Cable Page and 2 more files

A web page in GlobalGrid2050 that reads inputs for route name, section length and installation condition, covering cables. Published at https://globalgrid2050.com/testcode/202609060432/cable/.

694 lines of HTML from globalgrid2050, in 3 files. Topic: Cables and conductors. Section 27 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. Testcode — Cable Page render · globalgrid2050 / testcode/202609060432/cable/index.html lines 1–555
  2. Testcode — V01 Spider Drill Page render · globalgrid2050 / testcode/202609141522/v01-spider-drill/index.html lines 1–69
  3. Code Map — V01 Dependency Drill Page render · globalgrid2050 / testcode/202609141754/code-map/v01-dependency-drill/index.html lines 1–70

Testcode — Cable Page

A web page in GlobalGrid2050 that reads inputs for route name, section length and installation condition, covering cables. Published at https://globalgrid2050.com/testcode/202609060432/cable/.

renderglobalgrid2050 / testcode/202609060432/cable/index.html · lines 1–555 of 555 · version 2026-09-06 04:32 · Entry point

What it does
It draws cables. Uses libraries app.js. 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. Domain terms in the code: cables, 110kV, 33kV, 11kV.
Inputs & outputs
In: form fields (user input). Out: web page. Voltage levels named: 110kV, 33kV, 11kV.
Downstream impact
Used directly by 16 files: Homepage V077 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v077.html); Homepage V078 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v078.html); Homepage V079 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v079.html); Homepage V080 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v080.html); and 12 more. It is itself an entry point, published at https://globalgrid2050.com/testcode/202609060432/cable/.
What it achieves
Cable Geometry Visualiser v1.6.0. Its code works with 11 kV, 110 kV and 33 kV.
Why it matters
Loaded by the Homepage V077 page at https://globalgrid2050.com/homepage_versions/homepage_v077.html and 15 other pages.
Application
globalgrid2050 · testcode/202609060432/cable · page
Uses
Data Core (script src), Data LV (script src), Data MV HV (script src), Data Solar (script src), Drawing View Exit (script src), app.js
Used by
linked from Homepage V077 (link), linked from Homepage V078 (link), linked from Homepage V079 (link), linked from Homepage V080 (link), linked from Homepage V082 (link), linked from Homepage V083 (link), linked from Homepage V084 (link), linked from Homepage V085 (link), and 8 more
Produces
none declared
Defines here
none
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/202609060432/cable/index.html:1-555 · blob bb8270ae80be088c8407fb5f43ed96ad7968a963 · 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">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Cable Geometry Visualiser v1.6.0</title>
    <style>
        :root {
            --bg: #050505;
            --panel: rgba(10, 10, 10, 0.96);
            --panel-soft: #0b0e14;
            --line: #2f343d;
            --line-soft: #222;
            --text: #ffffff;
            --muted: #a6adbb;
            --muted-soft: #8d95a3;
            --accent: #00ffff;
            --accent-2: #ff00ff;
            --ok: #00ff88;
            --warn: #ffcc66;
            --warn-bg: rgba(80, 50, 0, 0.18);
            --warn-line: #5a3d00;
            --error: #ff6666;
            --error-bg: rgba(80, 10, 10, 0.18);
            --error-line: #5a1f1f;
            --info: #8fb2d9;
            --info-bg: rgba(14, 32, 48, 0.28);
            --info-line: #28455d;
            --input-bg: #111;
            --canvas-bg: #000;
            --shadow: 0 0 15px rgba(0, 0, 0, 0.5);
        }

        * { box-sizing: border-box; }

        body {
            margin: 0;
            padding: 20px;
            background: var(--bg);
            color: var(--text);
            font-family: "Courier New", monospace;
            display: flex;
            justify-content: center;
        }

        .dashboard {
            display: flex;
            gap: 20px;
            width: 100%;
            max-width: 1480px;
            align-items: flex-start;
        }

        .panel {
            background: var(--panel);
            border: 1px solid var(--line);
            border-radius: 4px;
            padding: 20px;
            display: flex;
            flex-direction: column;
        }

        .panel-left {
            width: 470px;
            flex-shrink: 0;
        }

        .panel-right {
            flex: 1 1 auto;
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        h2 {
            margin: 0 0 15px 0;
            color: var(--accent);
            font-size: 18px;
            letter-spacing: 2px;
            text-transform: uppercase;
            border-bottom: 1px solid var(--line);
            padding-bottom: 10px;
        }

        h3 {
            margin: 0 0 10px 0;
            color: var(--muted-soft);
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .section-title { margin-top: 18px; }

        .subtle-note {
            font-size: 11px;
            color: #999;
            line-height: 1.45;
            margin: 0 0 14px 0;
        }

        .warning-box,
        .status-box,
        .guidance-box,
        .assumption-box,
        .review-box,
        .conflict-box {
            padding: 12px;
            font-size: 11px;
            line-height: 1.5;
            border-radius: 3px;
        }

        .warning-box {
            border: 1px solid var(--warn-line);
            background: var(--warn-bg);
            color: var(--warn);
            margin-bottom: 18px;
        }

        .guidance-box {
            border: 1px solid #30455a;
            background: #08101a;
            color: #bed1e2;
            margin-top: 16px;
        }

        .guidance-box strong,
        .assumption-box strong,
        .review-box strong,
        .conflict-box strong { color: #fff; }

        .guidance-box ul,
        .review-box ul,
        .conflict-box ul,
        .assumption-box ul { margin: 8px 0 0 18px; padding: 0; }

        .guidance-box li + li,
        .review-box li + li,
        .conflict-box li + li,
        .assumption-box li + li { margin-top: 4px; }

        .assumption-box {
            margin-top: 16px;
            border: 1px solid var(--info-line);
            background: var(--info-bg);
            color: var(--info);
        }

        .review-box {
            margin-top: 16px;
            border: 1px solid var(--warn-line);
            background: var(--warn-bg);
            color: var(--warn);
        }

        .conflict-box {
            margin-top: 16px;
            border: 1px solid var(--error-line);
            background: var(--error-bg);
            color: #ffb0b0;
        }

        .status-box {
            margin: 0 0 16px 0;
            border: 1px solid var(--line);
            background: #090c11;
            color: var(--muted);
        }

        .status-box.ok    { border-color: rgba(0,255,136,0.35); color: #aef7d1; }
        .status-box.warn  { border-color: rgba(255,204,102,0.35); color: #ffd98a; }
        .status-box.error { border-color: rgba(255,102,102,0.35); color: #ffb0b0; }

        .input-group {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 10px;
            font-size: 12px;
            color: var(--muted);
            align-items: center;
        }

        .input-group label { flex: 1 1 auto; min-width: 0; }

        .input-group input,
        .input-group select {
            width: 190px;
            background: var(--input-bg);
            color: var(--accent);
            border: 1px solid #444;
            padding: 7px 8px;
            font-family: monospace;
            border-radius: 3px;
        }

        .input-group input[data-numeric="true"] { text-align: right; }
        .input-group input[type="text"]:not([data-numeric]) { text-align: left; }

        .input-group input:focus,
        .input-group select:focus { border-color: var(--accent); outline: none; }

        .input-group input[disabled],
        .input-group select[disabled] { opacity: 0.6; cursor: not-allowed; }

        .inline-note {
            margin: -2px 0 10px 0;
            font-size: 10px;
            color: var(--muted-soft);
            line-height: 1.45;
        }

        .stat-block {
            margin-top: 18px;
            border-top: 1px solid var(--line);
            padding-top: 14px;
        }

        .stat-row {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            font-size: 12px;
            margin-bottom: 8px;
            color: var(--muted-soft);
            padding: 4px 0;
        }

        .stat-val {
            color: var(--text);
            font-weight: bold;
            text-align: right;
        }

        .canvas-container {
            background: var(--panel-soft);
            border: 1px solid var(--line-soft);
            border-radius: 4px;
            padding: 15px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        canvas {
            background: var(--canvas-bg);
            border: 1px solid #333;
            box-shadow: var(--shadow);
            display: block;
            max-width: 100%;
            height: auto;
        }

        .button-row {
            display: flex;
            gap: 10px;
            margin-top: 14px;
        }

        .btn {
            flex: 1 1 auto;
            padding: 12px;
            background: var(--bg);
            color: var(--ok);
            border: 1px solid var(--ok);
            cursor: pointer;
            font-family: monospace;
            font-weight: bold;
            text-transform: uppercase;
            border-radius: 3px;
            transition: all 0.2s;
        }

        .btn:hover { background: var(--ok); color: #000; }
        .btn-alt { color: var(--accent-2); border-color: var(--accent-2); }
        .btn-alt:hover { background: var(--accent-2); color: #000; }

        .snapshot-box {
            margin-top: 16px;
            border: 1px solid var(--line-soft);
            background: #07090d;
            padding: 12px;
            border-radius: 3px;
            font-size: 11px;
            color: #cfcfcf;
            line-height: 1.45;
            white-space: pre-wrap;
        }

        .legend {
            display: flex;
            gap: 14px;
            align-self: flex-start;
            font-size: 11px;
            color: var(--muted);
            margin: 0 0 10px 0;
            flex-wrap: wrap;
        }

        .legend-item { display: inline-flex; align-items: center; gap: 6px; }

        .legend-swatch {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            border: 1px solid #666;
        }

        body.drawing-view .panel-left { display: none; }
        body.drawing-view .dashboard { max-width: 100%; }
        body.drawing-view .panel-right { width: 100%; }
        body.drawing-view .canvas-container { padding: 12px; }
        body.drawing-view .subtle-note { margin-bottom: 8px; }

        @media (orientation: landscape) and (max-width: 1200px) {
            body.landscape-mobile .panel-left { display: none; }
            body.landscape-mobile .dashboard { max-width: 100%; }
            body.landscape-mobile .panel-right { width: 100%; }
            body.landscape-mobile .canvas-container { padding: 10px; }
            body.landscape-mobile .subtle-note { margin-bottom: 8px; font-size: 10px; }
        }

        @media (max-width: 1080px) {
            .dashboard { flex-direction: column; }
            .panel-left { width: 100%; }
        }
    </style>
</head>
<body>
    <div class="dashboard">
        <div class="panel panel-left">
            <h2>Geometry Inputs</h2>

            <div class="warning-box">
                This tool produces indicative geometry records only and must not be used for trench design, duct sizing, burial depth specification, electrical design or any construction document without independent verification by a competent engineer with responsibility for the project.<br>
                No electrical calculation is performed.<br>
                No thermal rating is performed.<br>
                No compliance verdict is produced.<br>
                The user must verify safety, protection, rating and utility compliance with a competent person in accordance with local law, site conditions and the relevant infrastructure owner requirements.
            </div>

            <div id="status_box" class="status-box ok" aria-live="polite">Geometry only. Ready for capture.</div>

            <h3>Route Identity</h3>
            <div class="input-group">
                <label for="route_name">Route ID</label>
                <input type="text" id="route_name" value="M_W3_BESS_to_PCS" />
            </div>
            <div class="input-group">
                <label for="section_length">Worst Case Section Length m</label>
                <input type="text" inputmode="decimal" enterkeyhint="done" autocomplete="off" autocorrect="off" spellcheck="false" data-numeric="true" id="section_length" value="30" />
            </div>

            <h3 class="section-title">Installation Basis</h3>
            <div class="input-group">
                <label for="installation_condition">Installation Condition</label>
                <select id="installation_condition">
                    <option value="buried_duct">Buried Duct</option>
                    <option value="direct_buried">Direct Buried</option>
                    <option value="open_trough">Open Trough</option>
                    <option value="free_air">Free Air on Cleats</option>
                    <option value="metallic_enclosure">Metallic Enclosure</option>
                </select>
            </div>
            <div class="input-group">
                <label for="service_type">Service Type</label>
                <select id="service_type">
                    <option value="lv" selected>LV Power AC</option>
                    <option value="mv">MV AC</option>
                    <option value="ehv">HV AC</option>
                    <option value="dc">DC</option>
                </select>
            </div>
            <div class="input-group">
                <label for="grouping_basis">Grouping Basis</label>
                <select id="grouping_basis">
                    <option value="same_circuit">Same Circuit</option>
                    <option value="same_service">Same Service</option>
                    <option value="mixed_service">Mixed Service</option>
                </select>
            </div>
            <div class="input-group">
                <label for="burial_depth">Burial Depth mm</label>
                <input type="text" inputmode="decimal" enterkeyhint="done" autocomplete="off" autocorrect="off" spellcheck="false" data-numeric="true" id="burial_depth" value="900" />
            </div>
            <div class="inline-note" id="burial_note">Default burial depth shown. Verify project basis separately.</div>

            <h3 class="section-title">Cable OD Lookup</h3>
            <div class="input-group">
                <label for="lookup_cores">Cores</label>
                <select id="lookup_cores">
                    <option value="any">All Core Types</option>
                    <option value="single">Single Core</option>
                    <option value="two">2 Core</option>
                    <option value="three">3 Core</option>
                    <option value="four">4 Core</option>
                    <option value="five">5 Core</option>
                </select>
            </div>
            <div class="input-group">
                <label for="lookup_voltage">Voltage Class</label>
                <select id="lookup_voltage">
                    <option value="">— manual OD entry —</option>
                </select>
            </div>
            <div class="input-group">
                <label for="lookup_csa">Conductor CSA mm²</label>
                <select id="lookup_csa">
                    <option value="">— select voltage first —</option>
                </select>
            </div>
            <div class="inline-note" id="lookup_note">
                Select voltage class and CSA to auto populate OD and bend radius. Conductor shape and system notes appear here.
            </div>

            <h3 class="section-title">Formation</h3>
            <div class="input-group">
                <label for="formation_type">Formation Type</label>
                <select id="formation_type"></select>
            </div>
            <div class="input-group">
                <label for="circuit_qty">Number of Circuit Groups</label>
                <input type="text" inputmode="decimal" enterkeyhint="done" autocomplete="off" autocorrect="off" spellcheck="false" data-numeric="true" id="circuit_qty" value="4" />
            </div>
            <div class="input-group">
                <label for="max_per_row">Max Groups per Row</label>
                <input type="text" inputmode="decimal" enterkeyhint="done" autocomplete="off" autocorrect="off" spellcheck="false" data-numeric="true" id="max_per_row" value="2" />
            </div>
            <div class="input-group">
                <label for="cable_od">Cable Outer Diameter mm</label>
                <input type="text" inputmode="decimal" enterkeyhint="done" autocomplete="off" autocorrect="off" spellcheck="false" data-numeric="true" id="cable_od" value="45" />
            </div>
            <div class="inline-note" id="od_source_note">OD entered manually.</div>
            <div class="input-group">
                <label for="spacing_basis">Spacing Basis</label>
                <select id="spacing_basis">
                    <option value="clear_gap">Clear Gap</option>
                    <option value="touching">Touching</option>
                    <option value="centre_to_centre">Centre to Centre</option>
                </select>
            </div>
            <div class="input-group">
                <label for="spacing_h">Horizontal Spacing mm</label>
                <input type="text" inputmode="decimal" enterkeyhint="done" autocomplete="off" autocorrect="off" spellcheck="false" data-numeric="true" id="spacing_h" value="150" />
            </div>
            <div class="input-group">
                <label for="spacing_v">Vertical Spacing mm</label>
                <input type="text" inputmode="decimal" enterkeyhint="done" autocomplete="off" autocorrect="off" spellcheck="false" data-numeric="true" id="spacing_v" value="150" />
            </div>
            <div class="inline-note" id="spacing_note">Spacing inputs are active.</div>

            <h3 class="section-title">Bend Geometry</h3>
            <div class="input-group">
                <label for="bend_factor">Bend Radius x OD</label>
                <input type="text" inputmode="decimal" enterkeyhint="done" autocomplete="off" autocorrect="off" spellcheck="false" data-numeric="true" id="bend_factor" value="15" />
            </div>

            <div class="stat-block">
                <div class="stat-row"><span>Formation Width</span><span class="stat-val" id="out_width">0 mm</span></div>
                <div class="stat-row"><span>Formation Depth</span><span class="stat-val" id="out_depth">0 mm</span></div>
                <div class="stat-row"><span>Burial Depth Input</span><span class="stat-val" id="out_burial">0 mm</span></div>
                <div class="stat-row"><span>Indicative Trench Width</span><span class="stat-val" id="out_trench_width">0 mm</span></div>
                <div class="stat-row"><span>Indicative Trench Depth</span><span class="stat-val" id="out_trench_depth">0 mm</span></div>
                <div class="stat-row"><span>Applied Bend Radius</span><span class="stat-val" id="out_mbr" style="color: var(--accent-2);">0 mm</span></div>
                <div class="stat-row"><span>Rows</span><span class="stat-val" id="out_rows">0</span></div>
                <div class="stat-row"><span>Clear Gap Horizontal</span><span class="stat-val" id="out_gap_h">0 mm</span></div>
                <div class="stat-row"><span>Clear Gap Vertical</span><span class="stat-val" id="out_gap_v">0 mm</span></div>
                <div class="stat-row"><span>Approx Group CTC Horizontal</span><span class="stat-val" id="out_ctc_h">0 mm</span></div>
                <div class="stat-row"><span>Approx Group CTC Vertical</span><span class="stat-val" id="out_ctc_v">0 mm</span></div>
                <div class="stat-row"><span>Review Status</span><span class="stat-val" id="out_note" style="color: var(--ok);">OK</span></div>
            </div>

            <div class="button-row">
                <button class="btn" id="export_btn" type="button">Export JSON</button>
                <button class="btn btn-alt" id="copy_btn" type="button">Copy Snapshot</button>
                <button class="btn" id="drawing_view_btn" type="button">Drawing View</button>
            </div>

            <div class="conflict-box" id="conflict_box" aria-live="polite" hidden>
                <strong>Input conflicts</strong>
                <ul id="conflict_list"></ul>
            </div>

            <div class="review-box" id="review_box" aria-live="polite" hidden>
                <strong>Review points</strong>
                <ul id="review_list"></ul>
            </div>

            <div class="assumption-box">
                <strong>Standing assumptions</strong>
                <ul>
                    <li>Within group cable spacing is assumed touching unless separately modelled.</li>
                    <li>Mixed service visual uses one worst case OD for all shown services and is schematic only.</li>
                    <li>Bend visual shows a single cable body sweep only and does not model full multi cable sweep, trench profile, duct entry, pull path or installation forces.</li>
                    <li>Burial depth is recorded as an indicative input only.</li>
                    <li>4 core and 5 core multicore formations are drawn as a single cable OD. Within cable core arrangement is not modelled.</li>
                </ul>
            </div>

            <div class="snapshot-box" id="snapshot_box"></div>

            <div class="guidance-box">
                <strong>Open cable knowledge basis</strong><br>
                This interface is intended to expose geometry assumptions clearly and separate them from catalogue driven product selection.
                <ul>
                    <li>British MV classes retained here are 6.35/11 kV and 19/33 kV.</li>
                    <li>Transmission class retained here is 64/110 kV IEC system.</li>
                    <li>Sector conductors are called out because they affect OD and terminations.</li>
                    <li>Stored ODs and bend data must still be verified before any formal design issue.</li>
                </ul>
            </div>
        </div>

        <div class="panel panel-right">
            <div class="canvas-container">
                <h3 style="align-self:flex-start; color: var(--accent);">Worst Case Formation Cross Section</h3>
                <p class="subtle-note" style="align-self:flex-start;">
                    Cable group box only. Envelope width is the horizontal size of the cable group shown. Envelope depth is the vertical size of the cable group shown.
                </p>
                <div class="legend">
                    <span class="legend-item"><span class="legend-swatch" style="background:#666; border-color:#00ffff;"></span>LV Power AC</span>
                    <span class="legend-item"><span class="legend-swatch" style="background:#b87333; border-color:#ff5555;"></span>MV AC</span>
                    <span class="legend-item"><span class="legend-swatch" style="background:#ffd700; border-color:#ff8800;"></span>HV AC</span>
                    <span class="legend-item"><span class="legend-swatch" style="background:#777; border-color: var(--accent-2);"></span>DC</span>
                </div>
                <canvas id="formation_canvas" width="900" height="420" aria-label="Formation cross section visual"></canvas>
            </div>

            <div class="canvas-container">
                <h3 style="align-self:flex-start; color: #8fd3ff;">Indicative Trench Cross Section</h3>
                <p class="subtle-note" style="align-self:flex-start;">
                    Indicative trench size only. Trench width shown is worst case formation envelope width only. Trench depth shown is burial depth input to the top of duct or cable plus cable formation depth. No bedding, side clearance, cover boards, duct OD, shoring or civil design is modelled.
                </p>
                <canvas id="trench_canvas" width="900" height="500" aria-label="Indicative trench cross section visual"></canvas>
            </div>

            <div class="canvas-container">
                <h3 style="align-self:flex-start; color: var(--accent-2);">Single Cable Bend Sweep</h3>
                <p class="subtle-note" style="align-self:flex-start;">
                    Single cable body sweep only. Not multi cable sweep, trench profile, duct entry or civil detail.
                </p>
                <canvas id="bend_canvas" width="900" height="380" aria-label="Single cable bend sweep visual"></canvas>
            </div>
        </div>
    </div>

    <script src="data-core.js"></script>
    <script src="data-lv.js"></script>
    <script src="data-mv-hv.js"></script>
    <script src="data-solar.js"></script>
    <script src="app.js"></script>
<script src="drawing-view-exit.js"></script>
</body>
</html>

Testcode — V01 Spider Drill Page

A web page in GlobalGrid2050 that shows cat (`showCat`) and block (`showBlock`) and opens family (`openFamily`). Published at https://globalgrid2050.com/testcode/202609141522/v01-spider-drill/. It shows cat (`showCat`), shows block (`showBlock`) and opens family (`openFamily`).

renderglobalgrid2050 / testcode/202609141522/v01-spider-drill/index.html · lines 1–69 of 69 · version 2026-09-14 15:22 · Entry point · pattern showCat (shared by 6 files)

What it does
It draws its content. Defines card, clear, 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/v01-spider-drill/.
What it achieves
Defines `card`, `clear`, `showCat` and 2 more.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · testcode/202609141522/v01-spider-drill · page
Uses
GlobalGrid2050 — Testcode (script src)
Used by
none found
Produces
card, clear, showCat, showBlock, openFamily
Defines here
card, clear, 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/v01-spider-drill/index.html:1-69 · blob bc1a2892987e6802b3596bd91eea74f6b00aa9ef · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom · domain stage: experimental · users: EPC_contractor · canonical: production_core
<!doctype html>
<html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>GLOBALGRID2050 · v01 spider drill</title>
<script>window.BUILT='2026-09-14 15:22'</script>
<script src="../core.js"></script>
<style>
.stage{display:grid;grid-template-columns:1fr minmax(220px,1.2fr) 1fr;gap:10px;align-items:start}
.col{display:flex;flex-direction:column;gap:6px}
.col h3{margin:0 0 2px;font-size:11px;letter-spacing:.08em;text-transform:uppercase}
.card{background:#12151c;border:1px solid #2a3140;border-left:4px solid var(--c,#385464);border-radius:8px;padding:7px 9px;cursor:pointer;font-size:12px}
.card:hover{border-color:#00e5ff}
.card small{display:block;color:#8b93a7}
.focus{border:2px solid #00e5ff;border-left:6px solid var(--c,#00e5ff);padding:12px;cursor:default}
.focus .t{font-size:16px;color:#eef2fb}
.arrow{font-size:11px;color:var(--a)}
@media(max-width:700px){.stage{grid-template-columns:1fr}.focus{order:-1}}
</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="stage"><div class="col" id="left"></div><div class="col" id="centre"></div><div class="col" id="right"></div></div>
<div class="u-panel" id="panel" hidden></div>
<script>
const L = $('#left'), C = $('#centre'), R = $('#right'), P = $('#panel');
const card = (label, sub, colour, arrow, onClick) => el('div', { class: 'card', style: `--c:${colour}`, on: { click: onClick } }, arrow ? el('div', { class: 'arrow', style: `--a:${REL[arrow]}` }, arrow) : null, label, sub ? el('small', {}, sub) : null);
function clear() { L.innerHTML = C.innerHTML = R.innerHTML = ''; P.hidden = true; }
window.goHome = function () {
  clear();
  C.append(el('div', { class: 'card focus' }, el('div', { class: 't' }, 'GLOBALGRID2050'), el('small', {}, countsLine())));
  const cats = [...U.cats, { id: '_unnamed', title: 'Not yet named', colour: '#566079' }];
  const half = Math.ceil(cats.length / 2);
  cats.forEach((c, i) => {
    const n = c.id === '_unnamed' ? U.unnamed.length : U.blocks.filter(b => b.category === c.id).length;
    (i < half ? L : R).append(card(c.title, `${n} ${c.id === '_unnamed' ? 'groups' : 'blocks'}`, c.colour, 'contains', () => { trailPush('cat', c.id, c.title); goTo('cat', c.id); }));
  });
};
window.goTo = function (kind, id) {
  if (kind === 'cat') return showCat(id);
  if (kind === 'block') return showBlock(id);
  if (kind === 'family') return openFamily(id);
};
function showCat(id) {
  clear();
  const list = id === '_unnamed' ? U.unnamed.map(g => ({ symbol: g, title: `Group ${g}`, category: '_unnamed' })) : U.blocks.filter(b => b.category === id);
  C.append(el('div', { class: 'card focus', style: `--c:${catColour(id)}` }, el('div', { class: 't' }, id === '_unnamed' ? 'Not yet named' : catTitle(id)), el('small', {}, `${list.length} ${id === '_unnamed' ? 'groups' : 'blocks'} · tap one to open it`)));
  pageList(L, list.filter((_, i) => i % 2 === 0), b => card(`${b.symbol} · ${b.title}`, `${blockFamilies(b.symbol).length} families`, catColour(b.category), 'contains', () => showBlock(b.symbol)), 60, 'blocks');
  pageList(R, list.filter((_, i) => i % 2 === 1), b => card(`${b.symbol} · ${b.title}`, `${blockFamilies(b.symbol).length} families`, catColour(b.category), 'contains', () => showBlock(b.symbol)), 60, 'blocks');
}
function showBlock(sym) {
  clear(); trailPush('block', sym, blockLabel(sym));
  const b = U.bySym.get(sym) || {}; const fams = blockFamilies(sym);
  L.append(el('h3', { style: `color:${REL['depends on']}` }, 'depends on →'));
  blockDeps(sym).forEach(s => L.append(card(blockLabel(s), `${blockFamilies(s).length} families`, catColour((U.bySym.get(s) || {}).category), 'depends on', () => showBlock(s))));
  R.append(el('h3', { style: `color:${REL['used by']}` }, '← used by'));
  blockUsers(sym).slice(0, 60).forEach(s => R.append(card(blockLabel(s), `${blockFamilies(s).length} families`, catColour((U.bySym.get(s) || {}).category), 'used by', () => showBlock(s))));
  const f = el('div', { class: 'card focus', style: `--c:${catColour(b.category)}` }, el('div', { class: 't' }, blockLabel(sym)), el('small', {}, `${b.description || ''} ${fams.length} function families.`),
    b.symbol ? 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 ↗')))) : null);
  C.append(f, el('h3', { style: `color:${REL.contains};margin-top:8px` }, `contains ${fams.length} families`));
  pageList(C, fams, n => card(`#${n}`, 'tap to open its numbered lines', catColour(b.category), null, () => openFamily(n)), 60, 'families');
  // label the first families with their names once their bucket is loaded
  const cards = [...C.querySelectorAll('.card:not(.focus)')];
  // names for the first 30 only: each name costs a record bucket (200-850 KB), and a phone should not fetch dozens
  fams.slice(0, 30).forEach((n, i) => family(n).then(r => { if (r && cards[i]) cards[i].firstChild.textContent = `#${n} ${famName(r)}`; }).catch(() => {}));
}
async function openFamily(n) {
  P.hidden = false; P.scrollIntoView({ behavior: 'smooth', block: 'start' });
  await showFamilyPanel(n, P, openFamily, showBlock);
}
loadUniverse().then(() => { $('#count').textContent = countsLine(); legend($('#legend')); mountSearch($('#search'), openFamily); renderTrail(); goHome(); openAddress(); footer('v01-spider-drill'); }).catch(e => fail('#count', e));
</script>

Code Map — V01 Dependency Drill Page

A web page in the testcode folder of GlobalGrid2050 that shows cat (`showCat`) and block (`showBlock`) and opens family (`openFamily`). Published at https://globalgrid2050.com/testcode/202609141754/code-map/v01-dependency-drill/.

renderglobalgrid2050 / testcode/202609141754/code-map/v01-dependency-drill/index.html · lines 1–70 of 70 · version 2026-09-14 17:54 · Entry point · pattern showCat (shared by 6 files)

What it does
It draws its content. Defines card, clear, showCat, showBlock, openFamily. Side effects: changes the web page (DOM).
Why it exists in the grid workflow
Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
Inputs & outputs
Out: web page.
Downstream impact
Used directly by 1 file: Testcode — Code Map Page (globalgrid2050, https://globalgrid2050.com/testcode/202609141754/code-map/). Reached from 1 other entry point, including Testcode — Code Navigation Page (globalgrid2050, https://globalgrid2050.com/testcode/202609141754/code-navigation/). It is itself an entry point, published at https://globalgrid2050.com/testcode/202609141754/code-map/v01-dependency-drill/.
What it achieves
It shows cat (`showCat`), shows block (`showBlock`) and opens family (`openFamily`). Defines `card`, `clear`, `showCat` and 2 more.
Why it matters
Loaded by the Code Map page at https://globalgrid2050.com/testcode/202609141754/code-map/.
Application
globalgrid2050 · testcode/202609141754/code-map/v01-dependency-drill · page
Uses
Corporate (script src), Testcode — Code Map (script src)
Used by
linked from Testcode — Code Map Page (link)
Produces
card, clear, showCat, showBlock, openFamily
Defines here
card, clear, showCat, showBlock, openFamily
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609141754/code-map/v01-dependency-drill/index.html:1-70 · blob f15ff3f39c7f1094dec064de596917e00d3af525 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom · domain stage: experimental · users: EPC_contractor · canonical: production_core
<!doctype html>
<html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>GlobalGrid2050 · v01 dependency drill</title>
<script>window.BUILT='2026-09-14 17:54'</script>
<script src="../../corporate.js"></script>
<script src="../core.js"></script>
<style>
.stage{display:grid;grid-template-columns:1fr minmax(220px,1.2fr) 1fr;gap:10px;align-items:start}
.col{display:flex;flex-direction:column;gap:6px}
.col h3{margin:0 0 2px;font-size:11px;letter-spacing:.08em;text-transform:uppercase}
.card{background:#12151c;border:1px solid #2a3140;border-left:4px solid var(--c,#385464);border-radius:8px;padding:7px 9px;cursor:pointer;font-size:12px}
.card:hover{border-color:#00e5ff}
.card small{display:block;color:#8b93a7}
.focus{border:2px solid #00e5ff;border-left:6px solid var(--c,#00e5ff);padding:12px;cursor:default}
.focus .t{font-size:16px;color:#eef2fb}
.arrow{font-size:11px;color:var(--a)}
@media(max-width:700px){.stage{grid-template-columns:1fr}.focus{order:-1}}
</style>
<h1>GLOBALGRID2050</h1><div class="u-count" id="count">Loading the code map…</div>
<div id="search"></div><div id="trail"></div><div id="legend"></div>
<div class="stage"><div class="col" id="left"></div><div class="col" id="centre"></div><div class="col" id="right"></div></div>
<div class="u-panel" id="panel" hidden></div>
<script>
const L = $('#left'), C = $('#centre'), R = $('#right'), P = $('#panel');
const card = (label, sub, colour, arrow, onClick) => el('div', { class: 'card', style: `--c:${colour}`, on: { click: onClick } }, arrow ? el('div', { class: 'arrow', style: `--a:${REL[arrow]}` }, sayType(arrow)) : null, label, sub ? el('small', {}, sub) : null);
function clear() { L.innerHTML = C.innerHTML = R.innerHTML = ''; P.hidden = true; }
window.goHome = function () {
  clear();
  C.append(el('div', { class: 'card focus' }, el('div', { class: 't' }, 'GLOBALGRID2050'), el('small', {}, countsLine())));
  const cats = [...U.cats, { id: '_unnamed', title: 'Not yet named', colour: '#566079' }];
  const half = Math.ceil(cats.length / 2);
  cats.forEach((c, i) => {
    const n = c.id === '_unnamed' ? U.unnamed.length : U.blocks.filter(b => b.category === c.id).length;
    (i < half ? L : R).append(card(catName(c), `${n} ${c.id === '_unnamed' ? 'groups' : 'blocks'}`, c.colour, 'contains', () => { trailPush('cat', c.id, catName(c)); goTo('cat', c.id); }));
  });
};
window.goTo = function (kind, id) {
  if (kind === 'cat') return showCat(id);
  if (kind === 'block') return showBlock(id);
  if (kind === 'family') return openFamily(id);
};
function showCat(id) {
  clear();
  const list = id === '_unnamed' ? U.unnamed.map(g => ({ symbol: g, title: `Group ${g}`, category: '_unnamed' })) : U.blocks.filter(b => b.category === id);
  C.append(el('div', { class: 'card focus', style: `--c:${catColour(id)}` }, el('div', { class: 't' }, id === '_unnamed' ? 'Not yet named' : catTitle(id)), el('small', {}, `${list.length} ${id === '_unnamed' ? 'groups' : 'blocks'} · tap one to open it`)));
  pageList(L, list.filter((_, i) => i % 2 === 0), b => card(`${b.symbol} · ${blockTitle(b)}`, `${blockFamilies(b.symbol).length} families`, catColour(b.category), 'contains', () => showBlock(b.symbol)), 60, 'blocks');
  pageList(R, list.filter((_, i) => i % 2 === 1), b => card(`${b.symbol} · ${blockTitle(b)}`, `${blockFamilies(b.symbol).length} families`, catColour(b.category), 'contains', () => showBlock(b.symbol)), 60, 'blocks');
}
function showBlock(sym) {
  clear(); trailPush('block', sym, blockLabel(sym));
  const b = U.bySym.get(sym) || {}; const fams = blockFamilies(sym);
  L.append(el('h3', { style: `color:${REL['depends on']}` }, 'depends on →'));
  blockDeps(sym).forEach(s => L.append(card(blockLabel(s), `${blockFamilies(s).length} families`, catColour((U.bySym.get(s) || {}).category), 'depends on', () => showBlock(s))));
  R.append(el('h3', { style: `color:${REL['used by']}` }, '← used by'));
  blockUsers(sym).slice(0, 60).forEach(s => R.append(card(blockLabel(s), `${blockFamilies(s).length} families`, catColour((U.bySym.get(s) || {}).category), 'used by', () => showBlock(s))));
  const f = el('div', { class: 'card focus', style: `--c:${catColour(b.category)}` }, el('div', { class: 't' }, blockLabel(sym)), el('small', {}, `${blockDesc(b)} ${fams.length} function families.`),
    b.symbol ? el('div', { class: 'u-links' }, el('a', { class: 'u-chip', href: blockPage(sym), target: '_blank', rel: 'noopener' }, 'Block page ↗'), ...((b.live || []).slice(-1).map(u => el('a', { class: 'u-chip live', href: pageLink(u), target: '_blank', rel: 'noopener' }, 'Live file ↗')))) : null);
  C.append(f, el('h3', { style: `color:${REL.contains};margin-top:8px` }, `contains ${fams.length} families`));
  pageList(C, fams, n => card(`#${n}`, 'tap to open its numbered lines', catColour(b.category), null, () => openFamily(n)), 60, 'families');
  // label the first families with their names once their bucket is loaded
  const cards = [...C.querySelectorAll('.card:not(.focus)')];
  // names for the first 30 only: each name costs a record bucket (200-850 KB), and a phone should not fetch dozens
  fams.slice(0, 30).forEach((n, i) => family(n).then(r => { if (r && cards[i]) cards[i].firstChild.textContent = `#${n} ${famName(r)}`; }).catch(() => {}));
}
async function openFamily(n) {
  P.hidden = false; P.scrollIntoView({ behavior: 'smooth', block: 'start' });
  await showFamilyPanel(n, P, openFamily, showBlock);
}
loadUniverse().then(() => { $('#count').textContent = countsLine(); legend($('#legend')); mountSearch($('#search'), openFamily); renderTrail(); goHome(); openAddress(); footer('v01-dependency-drill'); }).catch(e => fail('#count', e));
</script>