Compare commits

...

2 Commits

3 changed files with 47 additions and 1 deletions

View File

@ -1 +1 @@
v20260101-10-run-checks-shift-multiselect-last-row-checkbox-fix v20260101-11-run-checks-select-all-indeterminate-clear-selection

View File

@ -279,6 +279,38 @@
var btnMark = document.getElementById('btn_mark_reviewed'); var btnMark = document.getElementById('btn_mark_reviewed');
var btnUnmark = document.getElementById('btn_unmark_reviewed'); var btnUnmark = document.getElementById('btn_unmark_reviewed');
var statusEl = document.getElementById('rc_status'); var statusEl = document.getElementById('rc_status');
// Header checkbox behavior:
// - When indeterminate (partial selection), clicking/pressing Space clears all selections.
// - Otherwise behaves as a normal "select all / select none".
function clearAllSelections() {
var cbs = table.querySelectorAll('tbody .rc_row_cb');
cbs.forEach(function (cb) { cb.checked = false; });
if (selectAll) {
selectAll.indeterminate = false;
selectAll.checked = false;
}
updateButtons();
}
if (selectAll) {
selectAll.addEventListener('click', function (e) {
if (selectAll.indeterminate) {
e.preventDefault();
e.stopPropagation();
clearAllSelections();
}
});
selectAll.addEventListener('keydown', function (e) {
// Space toggles checkbox via keyboard
if ((e.key === ' ' || e.key === 'Spacebar' || e.code === 'Space') && selectAll.indeterminate) {
e.preventDefault();
e.stopPropagation();
clearAllSelections();
}
});
}
var currentJobId = null; var currentJobId = null;
var currentRunId = null; var currentRunId = null;
@ -382,6 +414,12 @@ function statusClass(status) {
if (selectAll) { if (selectAll) {
selectAll.addEventListener('change', function () { selectAll.addEventListener('change', function () {
// Safety net: in case the checkbox becomes checked while it was indeterminate,
// treat it as "clear all" (expected UX).
if (selectAll.indeterminate && selectAll.checked) {
clearAllSelections();
return;
}
var cbs = table.querySelectorAll('tbody .rc_row_cb'); var cbs = table.querySelectorAll('tbody .rc_row_cb');
cbs.forEach(function (cb) { cb.checked = selectAll.checked; }); cbs.forEach(function (cb) { cb.checked = selectAll.checked; });
updateButtons(); updateButtons();

View File

@ -176,6 +176,14 @@
- Ensured checkbox state and row highlight state stay fully in sync for all rows in a shift multi-selection. - Ensured checkbox state and row highlight state stay fully in sync for all rows in a shift multi-selection.
- Corrected selection logic so every row within the calculated range is consistently selected and marked. - Corrected selection logic so every row within the calculated range is consistently selected and marked.
---
## v20260101-11-run-checks-select-all-indeterminate-clear-selection
- Fixed the Run Checks header “select all” checkbox behavior: when the checkbox is in an indeterminate (partial selection) state, clicking it now clears all selected rows instead of selecting all rows.
- Prevented unintended full selection when toggling from an indeterminate state.
- Ensured consistent behavior between mouse click and keyboard (Space) interaction on the header checkbox.
================================================================================================================================================ ================================================================================================================================================
## v0.1.14 ## v0.1.14