From 51db1729b1d1255930b86f50f424e10d40a71811 Mon Sep 17 00:00:00 2001 From: "Memoria (Noblistic)" Date: Mon, 2 Nov 2026 17:05:36 +0000 Subject: [PATCH] dashboard: level the download glyph with the caption, measured not reasoned The operator's intent, drawn rather than described: the bottom of the tray bar should sit on the same line as the bottom of the letters in REQUESTS. The previous commit claimed the viewBox-flush geometry achieved that. It did not. Headless Chrome, screenshotting the real header at 4x and finding the lowest inked pixel row of each: the caption's letters ended at device row 71 and the tray bar at 63 -- the icon floated 2.00 CSS px high. align-items:baseline puts the SVG's BOX on the text baseline, and the baseline sits above the box bottom, so filling the box was necessary but nowhere near sufficient. A 2px translateY on the glyph closes it; re-measured, both bottoms land on device row 63, gap 0.00. tests/js/render_align.js is that measurement, kept in the repo so the claim can be re-checked rather than trusted. It is manual and not wired into CMake -- it needs puppeteer and a Chrome binary, which are not repo dependencies -- and exits nonzero when the two bottoms differ. It fails on the pre-fix page (2.00px above, rc=1), which is the only reason to believe it. download.test.js's guard was the thing that gave false confidence here: it asserted the glyph "sits on the baseline" from the viewBox arithmetic alone, and passed while the icon floated. It now pins both halves -- the glyph fills its box AND the 2px nudge is present -- and the comment records that the earlier claim was wrong and why the test could not see it. A unit test cannot catch either of this session's two visual errors: the collapsed whitespace (zero width, not the 13px claimed) and this float. Neither is a property of the string the code builds. Both are properties of the rendered page, and only the rendered page was checked here. Suites: download 31, history 29, extremes 27, poll_spark 35, dashboard_test 241 over 8 cases, sched_test 62646 over 184, no failures. Alignment mutations caught: removing the nudge, making it 1px, re-insetting the bar in its box. Not deployed. Goes to review with the separator and export commits. Authored at: Memoria Qwen 3.8 Flash-Next 125B MoE (level not visible) via Open WebUI --- core/server/dashboard.cpp | 5 ++ tests/js/download.test.js | 24 +++++++-- tests/js/render_align.js | 109 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 133 insertions(+), 5 deletions(-) create mode 100644 tests/js/render_align.js diff --git a/core/server/dashboard.cpp b/core/server/dashboard.cpp index 5e4899f5..4b5d7187 100644 --- a/core/server/dashboard.cpp +++ b/core/server/dashboard.cpp @@ -594,6 +594,11 @@ h1 { margin:0; font-size:13.5px; font-weight:600; letter-spacing:-.005em; } display:inline-flex; align-items:center; } .pbtn:hover { color:var(--fg); } .pbtn:focus-visible { outline:1px solid var(--edge); outline-offset:3px; } +/* The glyph is nudged down 2px so the tray bar's bottom lines up with the bottom of the + * caption's letters. align-items:baseline puts the SVG's BOX on the text baseline, but the + * baseline sits above the box bottom, so the bar floated ~2px high -- measured in headless + * Chrome, not eyeballed. The viewBox-flush geometry alone does not fix this. */ +#reqjson svg { transform: translateY(2px); } .pbody { padding:14px 16px 16px; } /* The control vector's switch: a checkbox row with its explanation under it. The two need a gap diff --git a/tests/js/download.test.js b/tests/js/download.test.js index 943afdec..2ada97d1 100644 --- a/tests/js/download.test.js +++ b/tests/js/download.test.js @@ -9,6 +9,7 @@ const src = require("./page.js"); // the