Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit f2eb3019e1467e612c717a818e267a5f12617519
parent 832221dd9fb59d5d56cb56d9a12e89950821d179
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Thu,  5 Nov 2026 23:59:22 -0500

umtool: the streak readout fits a long run name

"Counting calories" ran out of the readout as "COUNTING ..."; a name now takes
a size down to fit its width (seen on the real slice, 6 Nov).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
Mumtool/report-to-video/chrome-measure-extras.mjs | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/umtool/report-to-video/chrome-measure-extras.mjs b/umtool/report-to-video/chrome-measure-extras.mjs @@ -598,7 +598,9 @@ export function streakHtml(schedule, render, opts = {}) { if (st.live) { const r = runs[st.live.i]; live = `<div class="bar live" data-k="s${j}.lv" style="left:${left(st.live.i)}px;width:${widthAt(st.live.i, st.live.days)}px;--c:${esc(r.color)}"></div>`; - readout = `<div class="nm" style="color:${esc(r.color)}">${esc(r.name)}</div><div class="dy">Day ${st.live.days}</div>${r.detail ? `<div class="dt">${esc(r.detail)}</div>` : ""}`; + // A long name ("Counting calories") a size down to fit the readout's width. + const ns = Math.max(18, Math.min(32, Math.floor(166 / (0.5 * Math.max(1, [...r.name].length))))); + readout = `<div class="nm" style="color:${esc(r.color)};font-size:${px(ns)}px">${esc(r.name)}</div><div class="dy">Day ${st.live.days}</div>${r.detail ? `<div class="dt">${esc(r.detail)}</div>` : ""}`; } else { const last = [...runs.keys()].filter((i) => runs[i].endT !== null && runs[i].endT <= st.at + 1e-6).pop(); const r = last !== undefined ? runs[last] : null;