From d69408533db3162bf2f58bfb687dc930e38e506c Mon Sep 17 00:00:00 2001 From: Ayla Croft Date: Wed, 7 Oct 2026 23:15:14 -0400 Subject: [PATCH 1/2] fix(dashboard): no stray "null" beside Learning in the add sheet With one language read, the bulk add controls passed a null child to replaceChildren, which wrote it out as the text "null". Co-Authored-By: Claude Opus 5.5 Signed-off-by: Ayla Croft (cherry picked from commit 716044690bbe86b1d3a1754f3fdefc63948f3d32) --- extension/bulk/sheet.js | 3 ++- test/dom/dashboard.test.mjs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/extension/bulk/sheet.js b/extension/bulk/sheet.js index f4d414a..ced509a 100644 --- a/extension/bulk/sheet.js +++ b/extension/bulk/sheet.js @@ -351,7 +351,8 @@ : null; controls.replaceChildren( el("span", { class: "bulk-control" }, el("span", { class: "field-label" }, t("bulk_learning")), learn), - meanings ? el("label", { class: "bulk-control" }, el("span", { class: "field-label" }, t("bulk_meanings_in")), meanings) : null, + // Only with more than one language read: replaceChildren would write a null as "null". + ...(meanings ? [el("label", { class: "bulk-control" }, el("span", { class: "field-label" }, t("bulk_meanings_in")), meanings)] : []), ); } diff --git a/test/dom/dashboard.test.mjs b/test/dom/dashboard.test.mjs index df70702..7bd6e2d 100644 --- a/test/dom/dashboard.test.mjs +++ b/test/dom/dashboard.test.mjs @@ -1329,6 +1329,7 @@ describe("bulk add (slice 13)", () => { test("200 lines of 'native = meaning': all ready, saved in one batch with no lookup, then a summary with Undo", async () => { const d = await openDashboard({ hash: "#add", sync: EN }); await learn(d, "Spanish"); + assert.equal(d.text(".bulk-controls"), "LearningSpanish", "one language read: no meanings picker, and no stray text"); const lines = Array.from({ length: 200 }, (_, i) => `palabra${i} = word${i}`).join("\n"); await paste(d, lines); assert.equal(d.text(".bulk-counts").startsWith("200 words"), true); From 72fa251b8ae4f83e0423e12d499c74f850a7d10f Mon Sep 17 00:00:00 2001 From: Ayla Croft Date: Wed, 7 Oct 2026 23:44:43 -0400 Subject: [PATCH 2/2] docs(changelog): note the add sheet fix Co-Authored-By: Claude Opus 5.5 Signed-off-by: Ayla Croft --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c6d80c..22fd278 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ Conventional Commits by release-please. ## Unreleased +- The dashboard's Add words sheet no longer shows a stray "null" beside "Learning" when you + read one language. + ## [1.0.1](https://github.com/ScriptKittyOS/kotiko/compare/v1.0.0...v1.0.1) (2026-10-08) The first version in the stores. It fixes the package so the Chrome Web Store accepts it;