BurnyCoder commited on
Commit
7ecbccd
·
verified ·
1 Parent(s): 0a20c31

live-verdict-disclosure · 570c05fe8dd2

Browse files
Files changed (1) hide show
  1. docs/explorer.js +7 -0
docs/explorer.js CHANGED
@@ -1,6 +1,7 @@
1
  // The same public renderer consumes immutable Pages data or the local live endpoint.
2
  const byId = id => document.getElementById(id);
3
  let study;
 
4
  const pct = n => n == null ? "—" : (100*n).toFixed(1)+"%";
5
  function drawTrend(groups) {
6
  const chart = byId("trend");
@@ -58,6 +59,10 @@ function exampleCard(title, lines, error) {
58
  }
59
  function showMatched(grids) {
60
  const section=byId("matched-section"), target=byId("matched-tables");
 
 
 
 
61
  target.replaceChildren();
62
  section.hidden=grids.length===0;
63
  for (const grid of [...grids].reverse()) {
@@ -83,6 +88,8 @@ function showMatched(grids) {
83
  }
84
  if (grid.frozen_changes?.length) {
85
  const details=document.createElement("details"), summary=document.createElement("summary");
 
 
86
  summary.textContent="Every changed frozen-judge verdict on the starting solver";
87
  const wrap=document.createElement("div"), table=document.createElement("table");
88
  wrap.className="scroll";
 
1
  // The same public renderer consumes immutable Pages data or the local live endpoint.
2
  const byId = id => document.getElementById(id);
3
  let study;
4
+ let renderedComparisons;
5
  const pct = n => n == null ? "—" : (100*n).toFixed(1)+"%";
6
  function drawTrend(groups) {
7
  const chart = byId("trend");
 
59
  }
60
  function showMatched(grids) {
61
  const section=byId("matched-section"), target=byId("matched-tables");
62
+ const revision=JSON.stringify(grids);
63
+ if (renderedComparisons===revision) return;
64
+ renderedComparisons=revision;
65
+ const openPhases=new Set(Array.from(target.querySelectorAll("details[open]"),item=>item.dataset.phase));
66
  target.replaceChildren();
67
  section.hidden=grids.length===0;
68
  for (const grid of [...grids].reverse()) {
 
88
  }
89
  if (grid.frozen_changes?.length) {
90
  const details=document.createElement("details"), summary=document.createElement("summary");
91
+ details.dataset.phase=grid.phase;
92
+ details.open=openPhases.has(grid.phase);
93
  summary.textContent="Every changed frozen-judge verdict on the starting solver";
94
  const wrap=document.createElement("div"), table=document.createElement("table");
95
  wrap.className="scroll";