Fix UI Render

#4
by wop - opened
Files changed (1) hide show
  1. script.js +16 -2
script.js CHANGED
@@ -610,7 +610,14 @@
610
  .sort()
611
  .forEach((catName) => {
612
  const c = run.categories[catName];
613
- const v = typeof c.acc_norm === "number" ? c.acc_norm : c.acc;
 
 
 
 
 
 
 
614
  const pct = Math.max(0, Math.min(100, (v || 0) * 100));
615
  const cls = scoreClass(v);
616
  const color = cls === "good" ? "var(--score-good)" : cls === "ok" ? "var(--score-ok)" : "var(--score-bad)";
@@ -725,7 +732,14 @@
725
  .sort()
726
  .forEach((catName) => {
727
  const c = run.categories[catName];
728
- const v = typeof c.acc_norm === "number" ? c.acc_norm : c.acc;
 
 
 
 
 
 
 
729
  const pct = Math.max(0, Math.min(100, (v || 0) * 100));
730
  const cls = scoreClass(v);
731
  const color = cls === "good" ? "var(--score-good)" : cls === "ok" ? "var(--score-ok)" : "var(--score-bad)";
 
610
  .sort()
611
  .forEach((catName) => {
612
  const c = run.categories[catName];
613
+ const v =
614
+ c.hybrid_score ??
615
+ c.exact_match ??
616
+ c.soft_score_norm ??
617
+ c.acc_norm ??
618
+ c.soft_score ??
619
+ c.acc ??
620
+ null;
621
  const pct = Math.max(0, Math.min(100, (v || 0) * 100));
622
  const cls = scoreClass(v);
623
  const color = cls === "good" ? "var(--score-good)" : cls === "ok" ? "var(--score-ok)" : "var(--score-bad)";
 
732
  .sort()
733
  .forEach((catName) => {
734
  const c = run.categories[catName];
735
+ const v =
736
+ c.hybrid_score ??
737
+ c.exact_match ??
738
+ c.soft_score_norm ??
739
+ c.acc_norm ??
740
+ c.soft_score ??
741
+ c.acc ??
742
+ null;
743
  const pct = Math.max(0, Math.min(100, (v || 0) * 100));
744
  const cls = scoreClass(v);
745
  const color = cls === "good" ? "var(--score-good)" : cls === "ok" ? "var(--score-ok)" : "var(--score-bad)";