Show "shown of total" in control board project headers while rows are hidden (#1503)
A project header now reads "fleet (13 of 38)" while Hide offline or Hide seen hides at least one row, and "fleet (38)" when nothing is hidden. The note under the table still says which filter hid how many. Numbers only, so nothing new needs escaping. Static test pins the expression and the removal of the raw-length header. Sonnet review: APPROVED, no findings. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
@@ -2012,3 +2012,16 @@ change, one static test (control-board 65/65, registry 69/69). Sonnet
|
||||
review: APPROVED, one FYI (the default-on test would still pass without the
|
||||
persistence guard), fixed by tightening the regex. Verified in Chrome against
|
||||
Jason's real marks. Next: Jason keeps using it.
|
||||
|
||||
## 2026-09-12 — Control board step 3, fourth refinement (#1503)
|
||||
|
||||
Before: the project header showed the full count ("fleet (38)") above a
|
||||
table that only showed 13 rows; the only explanation was the note at the
|
||||
bottom.
|
||||
|
||||
After: the header reads "fleet (13 of 38)" while Hide offline or Hide seen
|
||||
hides at least one row, and "fleet (38)" when nothing is hidden. The note
|
||||
under the table is unchanged. Page-only change, one static test
|
||||
(control-board 66/66, packages/mosaic 69/69). Sonnet review:
|
||||
APPROVED, no findings. Verified in Chrome: "1 of 4", "3 of 4", "4", "13 of 38",
|
||||
console clean. Next: Jason keeps using it.
|
||||
|
||||
@@ -217,3 +217,4 @@ are never rewritten or removed; corrections are new entries.
|
||||
- 2026-09-12 — jarvis (Claude Code, coordinator) — Control board step 3, first refinement (#1503): Jason reported killed pi sessions still "waiting" and most waiting rows being completion reports. Liveness now requires a tmux pane running pi; "Seen" marks (seen.json, POST /api/seen, Seen/Unsee on the page) drop read rows out of "Waiting on you" until the agent writes again. Tests 63/63 (30 new by sonnet helper), registry 69/69; sonnet review APPROVED (README command fixed). Receipt docs/plans/reviews/2026-09-12_control-board-step3-seen-marks.md.
|
||||
- 2026-09-12 — jarvis (Claude Code, coordinator) — Control board step 3, second refinement (#1503): Jason asked for a way to recall Seen rows; added a collapsed "Seen (N)" section with Unsee per row. Page-only change plus one static test (64/64); sonnet review APPROVED; live check in Chrome against Jason's two real marks.
|
||||
- 2026-09-12 — jarvis (Claude Code, coordinator) — Control board step 3, third refinement (#1503): Jason suggested a per-project "Hide seen" checkbox beside "Hide offline"; added, on by default, with a combined hidden-count note. Page-only change plus one static test (65/65); sonnet review APPROVED (one test-rigor FYI fixed); live check in Chrome.
|
||||
- 2026-09-12 — jarvis (Claude Code, coordinator) — Control board step 3, fourth refinement (#1503): Jason asked for "N of N" in the project header; now "shown of total" while a checkbox hides rows, plain total otherwise. Page-only change plus one static test (66/66); sonnet review APPROVED (no findings); live check in Chrome at all four edges.
|
||||
|
||||
@@ -144,3 +144,9 @@ closed across refreshes.
|
||||
"Hide offline" so seen rows stop cluttering the fleet table now that the
|
||||
Seen section exists. Each project header has both boxes, on by default,
|
||||
and the note under the table reads "N offline hidden · N seen hidden".
|
||||
|
||||
**2026-09-12 — Header count "N of N".** Jason pointed out that "fleet (38)"
|
||||
sat above a table showing 13 rows. The header now reads "fleet (13 of 38)"
|
||||
while a checkbox hides something and falls back to "fleet (38)" when nothing
|
||||
is hidden. The note under the table stays: the header says how many, the
|
||||
note says why. One static test.
|
||||
|
||||
@@ -98,7 +98,9 @@ no longer matches, and the row falls back into "Waiting on you" on its own.
|
||||
Marked rows are listed under a collapsed "Seen (N)" section on the page,
|
||||
each with an "Unsee" button, so nothing marked is ever out of reach. Each
|
||||
project table has "Hide offline" and "Hide seen" checkboxes (both on by
|
||||
default) with a note saying how many rows each one hides.
|
||||
default) with a note saying how many rows each one hides. While a box hides
|
||||
something the project header reads "N of N" (shown of total); otherwise it
|
||||
shows the plain total.
|
||||
If `seen.json` exists but is not valid JSON (or not an object of string
|
||||
values), the scan refuses rather than silently dropping every mark.
|
||||
|
||||
|
||||
@@ -295,9 +295,10 @@
|
||||
if (offlineHidden > 0) noteParts.push(offlineHidden + " offline hidden");
|
||||
if (seenHidden > 0) noteParts.push(seenHidden + " seen hidden");
|
||||
var note = noteParts.length > 0 ? '<p class="offline-note">' + noteParts.join(" \u00b7 ") + "</p>" : "";
|
||||
var headCount = visible.length < group.length ? visible.length + " of " + group.length : String(group.length);
|
||||
return (
|
||||
'<div class="project-group">' +
|
||||
'<div class="project-group-head"><h3>' + esc(project) + ' <span>(' + group.length + ")</span></h3>" +
|
||||
'<div class="project-group-head"><h3>' + esc(project) + ' <span>(' + headCount + ")</span></h3>" +
|
||||
'<div class="group-toggles">' +
|
||||
'<label><input type="checkbox" class="hide-offline-toggle" data-project="' + esc(project) + '" ' + (hideOffline ? "checked" : "") + "> Hide offline</label>" +
|
||||
'<label><input type="checkbox" class="hide-seen-toggle" data-project="' + esc(project) + '" ' + (hideSeen ? "checked" : "") + "> Hide seen</label>" +
|
||||
|
||||
@@ -558,3 +558,17 @@ test("page.html: each project has a Hide seen checkbox (default on) beside Hide
|
||||
assert.match(body, /" seen hidden"/, "the note reports how many seen rows are hidden");
|
||||
assert.match(html, /closest\("\.hide-offline-toggle, \.hide-seen-toggle"\)/, "one change handler serves both checkboxes");
|
||||
});
|
||||
|
||||
test("page.html: a project header reads \"N of N\" only while a checkbox hides rows", () => {
|
||||
const html = readFileSync(join(pkgRoot, "src", "page.html"), "utf8");
|
||||
const m = html.match(/function renderProjects\(data\) \{[\s\S]*?\n \}/);
|
||||
assert.ok(m, "renderProjects() must exist in page.html");
|
||||
const body = m[0];
|
||||
assert.match(
|
||||
body,
|
||||
/var headCount = visible\.length < group\.length \? visible\.length \+ " of " \+ group\.length : String\(group\.length\)/,
|
||||
"shown-of-total only when something is hidden; the plain total otherwise",
|
||||
);
|
||||
assert.match(body, /<span>\(' \+ headCount \+ "\)<\/span>/, "the header uses headCount, not the raw group length");
|
||||
assert.doesNotMatch(body, /<span>\(' \+ group\.length/, "the raw group length must no longer be rendered in the header");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user