Skip to content

Commit 2956261

Browse files
MDA2AVclaude
andcommitted
Fix Malformed Input filter: match enum name MalformedInput (no space)
The C# enum serializes as "MalformedInput" via ToString(), not "Malformed Input". Also guard against division by zero in renderSummary when no tests match a filter. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 58a9ca6 commit 2956261

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

docs/static/probe/render.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,12 @@ window.ProbeRender = (function () {
165165
return pb - pa || a.name.localeCompare(b.name);
166166
});
167167
var maxScored = sorted[0] ? (sorted[0].summary.scored || sorted[0].summary.total) : 1;
168-
var topPassed = sorted[0] ? sorted[0].summary.passed : 1;
168+
var topPassed = sorted[0] ? (sorted[0].summary.passed || 1) : 1;
169169

170170
var html = '<div style="display:flex;flex-direction:column;gap:6px;max-width:700px;">';
171171
sorted.forEach(function (sv, i) {
172172
var s = sv.summary;
173-
var scored = s.scored || s.total;
173+
var scored = s.scored || s.total || 1;
174174
var pct = s.passed / scored;
175175
var barPct = (s.passed / topPassed) * 100;
176176
var displayPct = Math.round(pct * 100);
@@ -391,7 +391,7 @@ window.ProbeRender = (function () {
391391
{ label: 'All', categories: null },
392392
{ label: 'Compliance', categories: ['Compliance'] },
393393
{ label: 'Smuggling', categories: ['Smuggling'] },
394-
{ label: 'Malformed Input', categories: ['Malformed Input'] }
394+
{ label: 'Malformed Input', categories: ['MalformedInput'] }
395395
];
396396

397397
var labelStyle = 'font-size:12px;font-weight:700;color:#656d76;margin-right:10px;white-space:nowrap;';

0 commit comments

Comments
 (0)