betterwithage commited on
Commit
3cf6e83
·
verified ·
1 Parent(s): d7d791a

refs: harden nav consolidation (single source of truth)

Browse files

Signed-off-by: Stephen Lutar <stephenlutar2@gmail.com>

Files changed (1) hide show
  1. pages/console.html +139 -1
pages/console.html CHANGED
@@ -15305,7 +15305,11 @@ window.warboard_init=warboard_init; window.warboard_all=warboard_all;
15305
  // a11oy-overhaul-marker:BATCH1-flagship20 (live-build verification token).
15306
  // a11oy-overhaul-marker:BATCH2A-polish (honest chips + labels + aria + lab badges).
15307
  // a11oy-overhaul-marker:BATCH2B-polish (lazy ngraph alias + 3D/table/canvas never-blank skeletons + honest friendly-err + spine-wide degrade harden).
15308
- var PINNED = ["whHero","cuas_fusion","cuas_swarm","cybSurface","cybZero","finm","finr","legExposure","red","reo","entIncident","fltTopo","oversight","constellation","energy","decision","wowdrop","wowledger","trustspace","llm"];
 
 
 
 
15309
  function sel(k){ return '.nav-item[' + 'data-view=' + JSON.stringify(k) + ']'; }
15310
  // True when the five pinned items are already the first five .nav-item nodes
15311
  // (in order) inside .side. Used to skip work and to avoid feeding our own
@@ -15499,5 +15503,139 @@ window.warboard_init=warboard_init; window.warboard_all=warboard_all;
15499
  })();
15500
  </script>
15501
  <!-- end GROUNDING-WIRE -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15502
  </body>
15503
  </html>
 
15305
  // a11oy-overhaul-marker:BATCH1-flagship20 (live-build verification token).
15306
  // a11oy-overhaul-marker:BATCH2A-polish (honest chips + labels + aria + lab badges).
15307
  // a11oy-overhaul-marker:BATCH2B-polish (lazy ngraph alias + 3D/table/canvas never-blank skeletons + honest friendly-err + spine-wide degrade harden).
15308
+ // NEUTRALIZED 2026-06-27: the production nav-consolidation block (end of <body>)
15309
+ // is now the single source of truth for the sidebar. This legacy Flagship-20
15310
+ // hoister fought it by yanking decision/llm/etc. above the group headers.
15311
+ // Empty PINNED => alreadyPinned()==true => apply() early-returns => no hoisting.
15312
+ var PINNED = [];
15313
  function sel(k){ return '.nav-item[' + 'data-view=' + JSON.stringify(k) + ']'; }
15314
  // True when the five pinned items are already the first five .nav-item nodes
15315
  // (in order) inside .side. Used to skip work and to avoid feeding our own
 
15503
  })();
15504
  </script>
15505
  <!-- end GROUNDING-WIRE -->
15506
+
15507
+
15508
+ <!-- =====================================================================
15509
+ PRODUCTION NAV CONSOLIDATION (2026-06-27, founder sign-off)
15510
+ Single deterministic control point. Many earlier scripts inject extra
15511
+ nav groups/items into .side at load (Investor WOW, Organ Substrate,
15512
+ Counter-UAS, Sovereignty, Formula Atlas, vertical packs, etc.). Rather
15513
+ than patch ~28 injectors, this ONE block runs LAST and rebuilds the
15514
+ sidebar to a tight, decision-grade menu: 5 groups / 18 items.
15515
+
15516
+ Every removed view stays registered in window.VIEWS and remains reachable
15517
+ via deep-link (/console#<viewkey>) — only the visible menu is slimmed.
15518
+ No backend, API, formula, or honesty label is touched. Reversible: delete
15519
+ this block to restore the full menu. warhacker/warboard archived.
15520
+ ===================================================================== -->
15521
+ <script>
15522
+ (function(){
15523
+ "use strict";
15524
+ // Ordered spec: [groupLabel, [ [viewKey, icon, label], ... ] ]
15525
+ var SPEC = [
15526
+ ["Operate", [
15527
+ ["command","\u25ce","Command Center"],
15528
+ ["ask","\u2726","Ask & Act"],
15529
+ ["demo","\u229e","Run a Demo"],
15530
+ ["mesh","\u22b9","Live System Map"]
15531
+ ]],
15532
+ ["Govern", [
15533
+ ["lambda","\u25d4","Trust Score"],
15534
+ ["decision","\u25c8","Governed Decision"],
15535
+ ["gates","\u22a0","Safety Gates"],
15536
+ ["govern","\u2713","Readiness & Compliance"]
15537
+ ]],
15538
+ ["Prove", [
15539
+ ["chain","\u26d3","Receipt Chain"],
15540
+ ["replay","\u25f7","Reasoning Replay"],
15541
+ ["arena","\u229c","Eval Arena"],
15542
+ ["frontier","\u25c8","Frontier Pipeline"]
15543
+ ]],
15544
+ ["Knowledge", [
15545
+ ["knowledge","\u2b21","Knowledge Ontology"],
15546
+ ["kbformulas","\u2211","Formulas"],
15547
+ ["honest","\u2298","What We Claim"]
15548
+ ]],
15549
+ ["Models & Tools", [
15550
+ ["llm","\u2687","Model Router"],
15551
+ ["alloy","\u2697","Open-Weight Alloy"],
15552
+ ["mcp","\u2699","Agent Tools"]
15553
+ ]]
15554
+ ];
15555
+
15556
+ function buildNav(){
15557
+ var side = document.querySelector('.side');
15558
+ if(!side) return false;
15559
+ var brand = side.querySelector('.brand');
15560
+ var foot = side.querySelector('.side-foot');
15561
+ if(!brand) return false;
15562
+
15563
+ // Remove every existing nav-group and nav-item (whatever injected them).
15564
+ Array.prototype.slice.call(side.querySelectorAll('.nav-group, .nav-item'))
15565
+ .forEach(function(el){ el.parentNode && el.parentNode.removeChild(el); });
15566
+
15567
+ // Rebuild from SPEC, inserting after brand (and before side-foot).
15568
+ var frag = document.createDocumentFragment();
15569
+ SPEC.forEach(function(grp){
15570
+ var g = document.createElement('div');
15571
+ g.className = 'nav-group';
15572
+ g.textContent = grp[0];
15573
+ frag.appendChild(g);
15574
+ grp[1].forEach(function(it){
15575
+ var d = document.createElement('div');
15576
+ d.className = 'nav-item';
15577
+ d.setAttribute('data-view', it[0]);
15578
+ (function(v){ d.onclick = function(){ if(window.go) window.go(v); }; })(it[0]);
15579
+ d.innerHTML = '<span class="ico">'+it[1]+'</span>'+it[2];
15580
+ frag.appendChild(d);
15581
+ });
15582
+ });
15583
+
15584
+ if(foot && foot.parentNode === side){ side.insertBefore(frag, foot); }
15585
+ else if(brand.nextSibling){ side.insertBefore(frag, brand.nextSibling); }
15586
+ else { side.appendChild(frag); }
15587
+
15588
+ // Reflect the currently-active view in the menu (if present).
15589
+ try{
15590
+ var cur = (location.hash||'#command').slice(1).split('/')[0];
15591
+ var act = side.querySelector('.nav-item[data-view="'+cur+'"]');
15592
+ if(act) act.classList.add('active');
15593
+ else { var c = side.querySelector('.nav-item[data-view="command"]'); if(c) c.classList.add('active'); }
15594
+ }catch(e){}
15595
+ return true;
15596
+ }
15597
+
15598
+ // Run after ALL injectors. They fire on DOMContentLoaded / setTimeout(0);
15599
+ // we run on load + a short delay, then a couple of re-applies to win any
15600
+ // late async injection, and a MutationObserver as a belt-and-suspenders guard.
15601
+ function apply(){ try{ buildNav(); }catch(e){} }
15602
+ function schedule(){
15603
+ apply();
15604
+ setTimeout(apply, 60);
15605
+ setTimeout(apply, 250);
15606
+ setTimeout(apply, 800);
15607
+ setTimeout(function(){
15608
+ apply();
15609
+ // Final guard: if anything injects a stray nav node later, prune once more.
15610
+ var side = document.querySelector('.side');
15611
+ if(side && window.MutationObserver){
15612
+ var t=null, busy=false;
15613
+ var mo = new MutationObserver(function(muts){
15614
+ if(busy) return; // ignore our own rebuild mutations
15615
+ var navTouched = muts.some(function(m){
15616
+ return Array.prototype.slice.call(m.addedNodes||[]).some(function(n){
15617
+ return n.nodeType===1 && n.classList &&
15618
+ (n.classList.contains('nav-item')||n.classList.contains('nav-group'));
15619
+ });
15620
+ });
15621
+ // ANY nav insertion (even allowlisted, since it can land out of order)
15622
+ // triggers a full deterministic rebuild.
15623
+ if(navTouched){
15624
+ clearTimeout(t);
15625
+ t=setTimeout(function(){ busy=true; apply(); busy=false; }, 60);
15626
+ }
15627
+ });
15628
+ mo.observe(side, {childList:true, subtree:false});
15629
+ // stop observing after 8s — by then all injectors have run
15630
+ setTimeout(function(){ try{ mo.disconnect(); apply(); }catch(e){} }, 8000);
15631
+ }
15632
+ }, 1500);
15633
+ }
15634
+ if(document.readyState==='loading') window.addEventListener('DOMContentLoaded', schedule);
15635
+ else schedule();
15636
+ window.addEventListener('load', function(){ setTimeout(apply, 120); });
15637
+ })();
15638
+ </script>
15639
+
15640
  </body>
15641
  </html>