Skip to content

Commit 9199b6e

Browse files
AnHeuermannclaude
andcommitted
Add filterable model table to HTML report
Adds four pass/fail dropdowns (BM Export, BM Parse, MTK Sim, Ref Cmp) and a regex text input for the model name to the report table header. Rows are hidden client-side as filters change; invalid regex is highlighted in red. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent ac627e2 commit 9199b6e

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# AI stuff
22
.claude/
3+
CLAUDE.md
34

45
# VS Code
56
.vscode/*

src/report.jl

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ function generate_report(results::Vector{ModelResult}, results_root::String,
149149
a:hover { text-decoration: underline; }
150150
.filter-row th { background: #f5f5f5; }
151151
.filter-row select { font-size: 12px; padding: 1px 4px; }
152+
.filter-row input { font-size: 12px; padding: 1px 4px; width: 16em; box-sizing: border-box; }
153+
.filter-row input.invalid { outline: 2px solid #c00; }
152154
</style>
153155
</head>
154156
<body>
@@ -180,7 +182,7 @@ Total run time: $(time_str)</p>
180182
<th>Ref Cmp</th>
181183
</tr>
182184
<tr class="filter-row">
183-
<th></th>
185+
<th><input id="f-name" type="text" placeholder="regex…" oninput="applyFilters()"/></th>
184186
<th><select id="f-exp" onchange="applyFilters()"><option value="all">All</option><option value="pass">Pass</option><option value="fail">Fail</option></select></th>
185187
<th><select id="f-par" onchange="applyFilters()"><option value="all">All</option><option value="pass">Pass</option><option value="fail">Fail</option></select></th>
186188
<th><select id="f-sim" onchange="applyFilters()"><option value="all">All</option><option value="pass">Pass</option><option value="fail">Fail</option></select></th>
@@ -193,12 +195,24 @@ $rows
193195
</table>
194196
<script>
195197
function applyFilters() {
198+
var nameInput = document.getElementById('f-name');
199+
var nameVal = nameInput.value;
200+
var nameRe = null;
201+
try {
202+
nameRe = nameVal ? new RegExp(nameVal, 'i') : null;
203+
nameInput.classList.remove('invalid');
204+
} catch(e) {
205+
nameInput.classList.add('invalid');
206+
return;
207+
}
196208
var exp = document.getElementById('f-exp').value;
197209
var par = document.getElementById('f-par').value;
198210
var sim = document.getElementById('f-sim').value;
199211
var cmp = document.getElementById('f-cmp').value;
200212
document.querySelectorAll('#model-rows tr').forEach(function(row) {
201-
var show = (exp === 'all' || row.dataset.exp === exp) &&
213+
var name = row.cells[0] ? row.cells[0].textContent : '';
214+
var show = (!nameRe || nameRe.test(name)) &&
215+
(exp === 'all' || row.dataset.exp === exp) &&
202216
(par === 'all' || row.dataset.par === par) &&
203217
(sim === 'all' || row.dataset.sim === sim) &&
204218
(cmp === 'all' || row.dataset.cmp === cmp);

0 commit comments

Comments
 (0)