diff --git a/docs/design/v3/arrows/after-demo-1440x900.png b/docs/design/v3/arrows/after-demo-1440x900.png new file mode 100644 index 0000000..0d4bddc Binary files /dev/null and b/docs/design/v3/arrows/after-demo-1440x900.png differ diff --git a/docs/design/v3/arrows/after-keys-3x.png b/docs/design/v3/arrows/after-keys-3x.png new file mode 100644 index 0000000..7ef5309 Binary files /dev/null and b/docs/design/v3/arrows/after-keys-3x.png differ diff --git a/docs/design/v3/arrows/after-months-3x.png b/docs/design/v3/arrows/after-months-3x.png new file mode 100644 index 0000000..d672e30 Binary files /dev/null and b/docs/design/v3/arrows/after-months-3x.png differ diff --git a/docs/design/v3/arrows/after-usage-1440x900.png b/docs/design/v3/arrows/after-usage-1440x900.png new file mode 100644 index 0000000..7cbde2e Binary files /dev/null and b/docs/design/v3/arrows/after-usage-1440x900.png differ diff --git a/docs/design/v3/arrows/before-demo-1440x900.png b/docs/design/v3/arrows/before-demo-1440x900.png new file mode 100644 index 0000000..72455f2 Binary files /dev/null and b/docs/design/v3/arrows/before-demo-1440x900.png differ diff --git a/docs/design/v3/arrows/before-keys-3x.png b/docs/design/v3/arrows/before-keys-3x.png new file mode 100644 index 0000000..d335c51 Binary files /dev/null and b/docs/design/v3/arrows/before-keys-3x.png differ diff --git a/docs/design/v3/arrows/before-months-3x.png b/docs/design/v3/arrows/before-months-3x.png new file mode 100644 index 0000000..91f1580 Binary files /dev/null and b/docs/design/v3/arrows/before-months-3x.png differ diff --git a/docs/design/v3/arrows/before-usage-1440x900.png b/docs/design/v3/arrows/before-usage-1440x900.png new file mode 100644 index 0000000..3b336f9 Binary files /dev/null and b/docs/design/v3/arrows/before-usage-1440x900.png differ diff --git a/public/index.html b/public/index.html index 6bc37e7..231ddec 100644 --- a/public/index.html +++ b/public/index.html @@ -42,7 +42,7 @@

Connecting to the office…

The last 24 hours

-

← → scrub · Shift an hour · [ ] previous or next action · Esc now

+

Left arrow Right arrow scrub · Shift an hour · [ ] previous or next action · Esc now

diff --git a/public/lib/words.js b/public/lib/words.js index 6ae794e..7d0866b 100644 --- a/public/lib/words.js +++ b/public/lib/words.js @@ -140,8 +140,6 @@ export function ciSummary(c) { // can underline each name without building markup. Three forms, longest first; the page shows // the first that fits in three lines (fitHeadline). -// Each state as a glyph too, so the colour of a ring is never the only way to tell. -export const GLYPH = { WORKING: "●", REVIEW: "◎", DISCUSS: "⋯", IDLE: "○", PAUSED: "‖", SILENT: "◌" }; export const STATE_WORDS = STATE_WORD; // "Vega", "Vega and Rigel", "Vega, Rigel and Lyra", as parts. @@ -277,12 +275,13 @@ function silentSentence(down, agents, nowS, timeZone) { return [...out, "."]; } -// The words beside a star, and on its card: { glyph, state: "Working", words: "working on an -// issue", repo } where repo is a public repo's name or "". +// The words beside a star, and on its card: { state: "Working", words: "working on an issue", +// repo } where repo is a public repo's name or "". The state's shape is an SVG symbol (#s-WORKING +// and the rest in index.html), not a character: the fonts have none of those (setkernel-live#80). export function stateWords(info) { const st = STATE_WORD[info?.state] ? info.state : "IDLE"; const words = doing({ ...info, repo: undefined }); - return { glyph: GLYPH[st], state: STATE_WORD[st], words, repo: isActive(info) && info.repo ? info.repo : "" }; + return { state: STATE_WORD[st], words, repo: isActive(info) && info.repo ? info.repo : "" }; } // Whose work a review was about, when the page can tell: an approval or change request in a diff --git a/public/style.css b/public/style.css index 94d5671..08847c2 100644 --- a/public/style.css +++ b/public/style.css @@ -1,9 +1,14 @@ /* live.setkernel.com, v3 "Day" (setkernel-live#48; the design is docs/design/v3/day). Manrope and IBM Plex Mono, self-hosted (SIL OFL, licences in /fonts). The mono is for clock - times only, so the axis digits share one width. */ -@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/manrope-latin-400-normal.woff2") format("woff2"); } -@font-face { font-family: "Manrope"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/manrope-latin-600-normal.woff2") format("woff2"); } -@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); } + times only, so the axis digits share one width. Each face's unicode-range is what its file has + (its cmap, read by test/glyphs.test.mjs), so a character none of them has, such as an arrow, + is an SVG and never falls back to a system font (setkernel-live#80). */ +@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/manrope-latin-400-normal.woff2") format("woff2"); + unicode-range: U+0020-007E, U+00A0-00FF, U+0102, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2026, U+2039-203A, U+2044, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; } +@font-face { font-family: "Manrope"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/manrope-latin-600-normal.woff2") format("woff2"); + unicode-range: U+0020-007E, U+00A0-00FF, U+0102, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2026, U+2039-203A, U+2044, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; } +@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); + unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2026, U+2032-2033, U+2039-203A, U+2044, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; } /* One type scale, one spacing scale. Every font size and every gap below is a step of these two, the SVG text classes too. The wall is not a second scale: it is the page drawn once on a fixed @@ -62,6 +67,9 @@ a:focus-visible, summary:focus-visible { outline: 2px solid var(--focus); outlin .legend .sw-3 { width: 80px; } .keys { margin: 0 0 0 auto; font-size: var(--f1); line-height: var(--l1); color: var(--ink-3); white-space: nowrap; } .keys kbd { font: var(--f1) var(--mono); border: 1px solid var(--rule-2); border-radius: 3px; padding: 0 var(--s1); color: var(--ink-2); } +/* an arrow drawn, not typed: the fonts' Latin subsets have no left or right arrow. Sized by the + text around it, in its colour; the words for it are beside it (#keys) or it is decoration (/usage). */ +.arrow { width: 1em; height: 1em; vertical-align: -0.15em; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; } .mood-waiting .foot, .mood-waiting .keys { display: none; } .table { margin-top: var(--s5); font-size: var(--f2); line-height: var(--l2); } .table summary { cursor: pointer; font-weight: 600; color: var(--ink-2); } diff --git a/public/usage/page.js b/public/usage/page.js index 268b9fa..3b2896c 100644 --- a/public/usage/page.js +++ b/public/usage/page.js @@ -21,9 +21,20 @@ export function failure(status) { return `Usage didn't load (${status ? `HTTP ${status}` : "no answer"}). Reload the page to try again; if your login expired, that signs you in.`; } +// An arrow drawn, not typed: the page's fonts have no left or right arrow (setkernel-live#80). +// The month's name beside it says where the link goes. +function arrow(d) { + const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg"), path = document.createElementNS("http://www.w3.org/2000/svg", "path"); + for (const [k, v] of Object.entries({ class: "arrow", viewBox: "0 0 12 12", "aria-hidden": "true", focusable: "false" })) svg.setAttribute(k, v); + path.setAttribute("d", d); + svg.append(path); + return svg; +} + function nav(month, current) { - const link = (m, text) => (m > current ? el("span", "off", text) : Object.assign(el("a", null, text), { href: `?month=${m}` })); - $("months").replaceChildren(link(shiftMonth(month, -1), `← ${monthName(shiftMonth(month, -1))}`), el("b", null, `${monthName(month)} ${month.slice(0, 4)}`), link(shiftMonth(month, 1), `${monthName(shiftMonth(month, 1))} →`)); + const link = (m, ...kids) => { const e = m > current ? el("span", "off") : Object.assign(el("a"), { href: `?month=${m}` }); e.append(...kids); return e; }; + const prev = shiftMonth(month, -1), next = shiftMonth(month, 1); + $("months").replaceChildren(link(prev, arrow("M10.5 6H1.5M5.5 2L1.5 6l4 4"), el("span", null, monthName(prev))), el("b", null, `${monthName(month)} ${month.slice(0, 4)}`), link(next, el("span", null, monthName(next)), arrow("M1.5 6h9M6.5 2l4 4-4 4"))); } // A number: its data-* attributes are the exact values its box shows. diff --git a/public/usage/usage.css b/public/usage/usage.css index 571a119..48752ef 100644 --- a/public/usage/usage.css +++ b/public/usage/usage.css @@ -13,6 +13,8 @@ .lead { padding-bottom: var(--s3); } .months { display: flex; gap: var(--s4); align-items: baseline; font-size: var(--f2); line-height: var(--l2); color: var(--ink-2); padding-bottom: var(--s3); } .months .off { color: var(--ink-3); } +.months .arrow:first-child { margin-right: var(--s1); } +.months .arrow:last-child { margin-left: var(--s1); } a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; } .status { margin: 0 0 var(--s4); color: var(--ink-2); } .sum { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); margin: 0 0 var(--s4); padding: 0; list-style: none; } diff --git a/test/glyphs.test.mjs b/test/glyphs.test.mjs new file mode 100644 index 0000000..658b17d --- /dev/null +++ b/test/glyphs.test.mjs @@ -0,0 +1,178 @@ +// Every character the page draws is one its fonts have (setkernel-live#80). The fonts are Latin +// subsets: a character outside them (an arrow, a status shape) would be drawn in whatever system +// font the visitor has. So each @font-face in style.css declares the unicode-range its file has, +// read here from the file's own cmap, and every non-ASCII character in the pages' HTML text or in +// a string in their scripts must be in that range. A string doesn't say which face draws it, so +// each is held to every face. Something the fonts lack is an SVG (.arrow in style.css). +// Run: npm test +import test from "node:test"; +import assert from "node:assert/strict"; +import { readFileSync, readdirSync } from "node:fs"; +import { brotliDecompressSync } from "node:zlib"; + +const pub = new URL("../public/", import.meta.url); +const read = (name) => readFileSync(new URL(name, pub), "utf8"); +const files = readdirSync(pub, { recursive: true }).map(String).sort(); +const hex = (cp) => `U+${cp.toString(16).toUpperCase().padStart(4, "0")}`; + +// ---- a woff2 file's cmap: the code points it has a glyph for +function base128(b, at) { + let v = 0; + for (let n = 0; n < 5; n++) { + const x = b[at.i++]; + v = v * 128 + (x & 127); + if (!(x & 128)) return v; + } + throw new Error("bad UIntBase128"); +} +function cmap(woff2) { + assert.equal(woff2.toString("latin1", 0, 4), "wOF2"); + const at = { i: 48 }; + let off = 0, table; + for (let n = woff2.readUInt16BE(12); n > 0; n--) { + const flags = woff2[at.i++], known = flags & 63, version = flags >> 6; + const tag = known === 63 ? woff2.toString("latin1", at.i, (at.i += 4)) : known; + const length = base128(woff2, at); + // glyf (10) and loca (11) are transformed unless version 3; every other table only if not 0 + const stored = (known === 10 || known === 11 ? version !== 3 : version !== 0) ? base128(woff2, at) : length; + if (tag === 0 || tag === "cmap") table = { off, stored }; + off += stored; + } + const c = brotliDecompressSync(woff2.subarray(at.i, at.i + woff2.readUInt32BE(20))).subarray(table.off, table.off + table.stored); + const subtables = Array.from({ length: c.readUInt16BE(2) }, (_, n) => c.subarray(c.readUInt32BE(8 + 8 * n))); + const s = subtables.find((t) => t.readUInt16BE(0) === 12) ?? subtables.find((t) => t.readUInt16BE(0) === 4); + const cps = new Set(); + if (s.readUInt16BE(0) === 12) { + for (let g = 0; g < s.readUInt32BE(12); g++) { + const [first, last, glyph] = [16, 20, 24].map((o) => s.readUInt32BE(o + 12 * g)); + for (let cp = first; cp <= last; cp++) if (glyph + cp - first) cps.add(cp); + } + return cps; + } + const segs = s.readUInt16BE(6) / 2, ends = 14, starts = 16 + 2 * segs, deltas = starts + 2 * segs, offsets = deltas + 2 * segs; + for (let g = 0; g < segs; g++) { + const [first, last, delta, ro] = [starts, ends, deltas, offsets].map((o) => s.readUInt16BE(o + 2 * g)); + for (let cp = first; cp <= last && cp !== 0xffff; cp++) { + let glyph = ro ? s.readUInt16BE(offsets + 2 * g + ro + 2 * (cp - first)) : cp; + if (glyph) glyph = (glyph + delta) & 0xffff; + if (glyph) cps.add(cp); + } + } + return cps; +} + +// ---- the faces in style.css, each with what it declares and what its file has +function range(text) { + const cps = new Set(); + for (const part of text.split(",")) { + const m = part.trim().match(/^U\+([0-9A-F?]{1,6})(?:-([0-9A-F]{1,6}))?$/i); + assert.ok(m, `unicode-range part "${part.trim()}"`); + const first = parseInt(m[1].replace(/\?/g, "0"), 16), last = parseInt(m[2] ?? m[1].replace(/\?/g, "F"), 16); + for (let cp = first; cp <= last; cp++) cps.add(cp); + } + return cps; +} +const faces = [...read("style.css").matchAll(/@font-face\s*{([^}]*)}/g)].map(([, f]) => { + const url = f.match(/url\("?\/([^")]+)"?\)/)[1]; + const declared = f.match(/unicode-range:\s*([^;]+)/)?.[1]; + return { name: `${f.match(/font-family:\s*"([^"]+)"/)[1]} ${f.match(/font-weight:\s*(\d+)/)[1]}`, url, declared: declared && range(declared), has: cmap(readFileSync(new URL(url, pub))) }; +}); + +test("each @font-face declares the unicode-range its file has", () => { + assert.equal(faces.length, 3, "Manrope 400 and 600, IBM Plex Mono 400"); + for (const { name, url, declared, has } of faces) { + assert.ok(declared, `${name} (${url}) declares no unicode-range, so it claims every character`); + const printable = (set) => [...set].filter((cp) => cp >= 0x20).sort((a, b) => a - b).map(hex); + assert.deepEqual(printable(declared), printable(has), `${name}: the range is what ${url} has`); + } +}); + +// ---- what the pages draw: the text of each HTML page's body, and every string in its scripts +// HTML: comments, scripts, styles and tags blanked (attributes aren't drawn), lines kept +function htmlText(html) { + const blank = (m) => m.replace(/[^\n]/g, " "); + const body = html.search(/|<(script|style)\b[\s\S]*?<\/\1>|<[^>]*>/gi, blank) + .replace(/&#x([0-9a-f]+);/gi, (_, h) => String.fromCodePoint(parseInt(h, 16))) + .replace(/&#(\d+);/g, (_, d) => String.fromCodePoint(Number(d))) + .split("\n"); +} + +// JS: each string and template literal's text, escapes decoded, with the line it starts on. +// Comments and regular expressions are skipped; a template's ${...} is code, so strings inside it count. +const KEYWORDS = new Set(["return", "typeof", "case", "of", "in", "do", "else", "void", "yield", "await", "delete", "new", "instanceof", "throw"]); +const unescape = (raw) => raw.replace(/\\(u\{[0-9a-f]+\}|u[0-9a-f]{4}|x[0-9a-f]{2}|[\s\S])/gi, (_, e) => + /^[ux]/i.test(e) && e.length > 1 ? String.fromCodePoint(parseInt(e.replace(/^u\{?|^x|\}$/gi, ""), 16)) : e); +function strings(src) { + const out = [], open = []; // open: the brace depth at each unfinished ${ + let i = 0, depth = 0, prev = ""; + const lineAt = (n) => src.slice(0, n).split("\n").length; + const scan = (j, stop) => { while (j < src.length && !stop(j)) j += src[j] === "\\" ? 2 : 1; return j; }; + const template = (from) => { + const j = scan(from, (k) => src[k] === "`" || (src[k] === "$" && src[k + 1] === "{")); + out.push([unescape(src.slice(from, j)), lineAt(from)]); + if (src[j] === "`") { i = j + 1; prev = "x"; } else { open.push(depth); i = j + 2; prev = "{"; } + }; + while (i < src.length) { + const c = src[i], d = src[i + 1]; + if (c === "/" && d === "/") i = src.includes("\n", i) ? src.indexOf("\n", i) : src.length; + else if (c === "/" && d === "*") i = src.includes("*/", i + 2) ? src.indexOf("*/", i + 2) + 2 : src.length; + else if (c === '"' || c === "'") { + const j = scan(i + 1, (k) => src[k] === c); + out.push([unescape(src.slice(i + 1, j)), lineAt(i)]); + i = j + 1; prev = "x"; + } else if (c === "`") template(i + 1); + else if (c === "}" && open.length && open.at(-1) === depth) { open.pop(); template(i + 1); } + else if (c === "/" && (prev === "" || /^[(,=:[!&|?{};+\-*%<>~^]$/.test(prev) || KEYWORDS.has(prev))) { + let cls = false, j = i + 1; // a regular expression + for (; j < src.length && (cls || src[j] !== "/"); j++) { + if (src[j] === "\\") j++; + else if (src[j] === "[") cls = true; + else if (src[j] === "]") cls = false; + } + i = j + 1; prev = "x"; + while (/[a-z]/.test(src[i] ?? "")) i++; + } else if (/[\w$]/.test(c)) { + const word = src.slice(i).match(/^[\w$]+/)[0]; + i += word.length; prev = word; + } else { + if (c === "{") depth++; + if (c === "}") depth--; + if (!/\s/.test(c)) prev = c; + i++; + } + } + assert.deepEqual([open.length, depth], [0, 0], "every string, template and brace closes"); + return out; +} + +function drawn() { + const out = []; + for (const f of files) { + if (f.endsWith(".html")) htmlText(read(f)).forEach((text, n) => out.push([text, `public/${f}:${n + 1}`])); + if (f.endsWith(".js")) for (const [text, line] of strings(read(f))) out.push([text, `public/${f}:${line}`]); + } + return out; +} + +test("every character the pages draw is in each face's unicode-range, or it is an SVG", () => { + const ok = (cp) => faces.every(({ declared, has }) => has.has(cp) && (!declared || declared.has(cp))); + const bad = []; + let seen = 0; + for (const [text, where] of drawn()) { + for (const ch of text) { + const cp = ch.codePointAt(0); + if (cp < 0x80) continue; + seen++; + if (!ok(cp)) bad.push(`${where}: "${ch}" (${hex(cp)})`); + } + } + assert.deepEqual(bad, [], "not in the fonts, so a system font would draw it: draw it as an SVG (.arrow in style.css)"); + assert.ok(seen > 20, `${seen} non-ASCII characters checked, the · and … the pages use among them`); +}); + +test("the string reader keeps strings and skips comments and regular expressions", () => { + const src = "const a = \"·\" + '\\u2190'; // ●\n/* ○ */ x = /[\"/]●/g.test(b) ? `→ ${c ? \"✕\" : `‖${d}`} ◎` : a / 2 / 3;"; + assert.deepEqual(strings(src), [["·", 1], ["←", 1], ["→ ", 2], ["✕", 2], ["‖", 2], ["", 2], [" ◎", 2]]); +}); diff --git a/test/page-logic.test.mjs b/test/page-logic.test.mjs index 08aca33..b0547ee 100644 --- a/test/page-logic.test.mjs +++ b/test/page-logic.test.mjs @@ -72,8 +72,8 @@ test("SILENT on the page: the allowlist keeps the state and a trusted time only, for (const bad of [ran + 1.5, ran + 30, NOW_D + 60, NOW_D - 8 * 86_400, "14:05"]) assert.deepEqual(agents({ state: "SILENT", lastRun: bad }), { state: "SILENT" }, String(bad)); assert.deepEqual(agents({ state: "SILENT", lastRun: ran, host: "orion-dev", sk_agent_last_run_end_seconds: ran + 17 }), { state: "SILENT", lastRun: ran }, "extra fields dropped"); assert.deepEqual(agents({ state: "IDLE", lastRun: ran }), { state: "IDLE" }, "lastRun on another state dropped"); - // its words: "Not reporting", a glyph of its own, and never active - assert.deepEqual(stateWords({ state: "SILENT", lastRun: ran }), { glyph: "◌", state: "Not reporting", words: "not reporting", repo: "" }); + // its words: "Not reporting", and never active + assert.deepEqual(stateWords({ state: "SILENT", lastRun: ran }), { state: "Not reporting", words: "not reporting", repo: "" }); assert.equal(doing({ state: "SILENT" }), "not reporting"); }); @@ -122,12 +122,12 @@ test("labels, tallies and feed sentences", () => { assert.equal(doing({ state: "DISCUSS" }), "in a design discussion"); assert.equal(doing({ state: "WORKING", work: "changes", repo: "hq" }), "addressing review feedback in hq"); assert.equal(doing({ state: "IDLE", work: "issue" }), "idle"); - assert.deepEqual(stateWords({ state: "WORKING", work: "issue", repo: "setkernel-live" }), { glyph: "●", state: "Working", words: "working on an issue", repo: "setkernel-live" }); - assert.deepEqual(stateWords({ state: "REVIEW", work: "review" }), { glyph: "◎", state: "Reviewing", words: "reviewing a pull request", repo: "" }); - assert.deepEqual(stateWords({ state: "DISCUSS", work: "discussion", repo: "hq" }), { glyph: "⋯", state: "Discussing", words: "in a design discussion", repo: "hq" }); - assert.deepEqual(stateWords({ state: "IDLE", repo: "x" }), { glyph: "○", state: "Idle", words: "idle", repo: "" }); - assert.deepEqual(stateWords({ state: "PAUSED" }), { glyph: "‖", state: "Paused", words: "paused", repo: "" }); - assert.deepEqual(stateWords(undefined), { glyph: "○", state: "Idle", words: "idle", repo: "" }); + assert.deepEqual(stateWords({ state: "WORKING", work: "issue", repo: "setkernel-live" }), { state: "Working", words: "working on an issue", repo: "setkernel-live" }); + assert.deepEqual(stateWords({ state: "REVIEW", work: "review" }), { state: "Reviewing", words: "reviewing a pull request", repo: "" }); + assert.deepEqual(stateWords({ state: "DISCUSS", work: "discussion", repo: "hq" }), { state: "Discussing", words: "in a design discussion", repo: "hq" }); + assert.deepEqual(stateWords({ state: "IDLE", repo: "x" }), { state: "Idle", words: "idle", repo: "" }); + assert.deepEqual(stateWords({ state: "PAUSED" }), { state: "Paused", words: "paused", repo: "" }); + assert.deepEqual(stateWords(undefined), { state: "Idle", words: "idle", repo: "" }); assert.equal(deed({ agent: "Vega", action: "opened_pr", repo: "hq" }), "opened a pull request in hq"); assert.equal(tally({ prs: 2, reviews: 4, claude: 130, started: 3, helpers: 1 }), "2 PRs · 4 reviews · 130 Claude"); assert.equal(tally({ prs: 1, reviews: 1, started: 1 }), "1 PR · 1 review"); diff --git a/test/usage-page.test.mjs b/test/usage-page.test.mjs index 6d7b3ed..45333a3 100644 --- a/test/usage-page.test.mjs +++ b/test/usage-page.test.mjs @@ -115,7 +115,7 @@ test("the page draws the fixture month: rows, a dash for no data, today so far, assert.equal(ids.asof.textContent, "Newest hour ends 2 Nov, 12:00 AST"); assert.deepEqual([ids.status.hidden, ids.scroll.hidden, ids.sum.hidden], [true, false, false]); assert.equal(ids.sum.textContent, "Fresh tokens this month49MCache reads148MAt API prices, about$4,925Busiest seatVega"); - assert.deepEqual(ids.months.kids.map((k) => [k.tag, k.textContent, k.href]), [["a", "← October", "?month=2026-10"], ["b", "November 2026", undefined], ["span", "December →", undefined]]); + assert.deepEqual(ids.months.kids.map((k) => [k.tag, k.textContent, k.href]), [["a", "October", "?month=2026-10"], ["b", "November 2026", undefined], ["span", "December", undefined]]); const [head, body, foot] = ids.usage.kids; assert.equal(head.textContent, "DayVegaRigelLyraOrionPolarisCodexAll seats"); assert.deepEqual(body.kids.map((r) => [r.className, r.kids[0].textContent]), [["today", "2 Monso far"], ["we", "1 Sun"]]);