From 0b04931699ce7d068c6273942fafb8a3cea21341 Mon Sep 17 00:00:00 2001 From: MechaCat02 Date: Tue, 8 Sep 2026 21:06:39 +0200 Subject: [PATCH] fix: a NUL byte was hiding two source files from grep, git and diff TaskHost.tsx used a literal NUL as the delimiter in its drag-and-drop payload, and tools/dict/build.mjs used one to join headword and part of speech. Both work at runtime. Both also make the file *binary* to every text tool: git shows "Bin 12259 bytes" instead of a diff, and grep prints nothing at all for a match. That is not hypothetical. Searching TaskHost.tsx for " --- app/src/ui/tabs/GrammarTab.tsx | 1 + app/src/ui/tabs/VocabTab.tsx | 4 +++ app/src/ui/tutor/TaskHost.tsx | Bin 12259 -> 12642 bytes app/src/ui/tutor/WordRail.tsx | 1 + package.json | 4 +-- test/source-hygiene.test.ts | 50 +++++++++++++++++++++++++++++++++ tools/dict/build.mjs | Bin 14445 -> 14594 bytes 7 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 test/source-hygiene.test.ts diff --git a/app/src/ui/tabs/GrammarTab.tsx b/app/src/ui/tabs/GrammarTab.tsx index e4b4bd9..bffc09c 100644 --- a/app/src/ui/tabs/GrammarTab.tsx +++ b/app/src/ui/tabs/GrammarTab.tsx @@ -152,6 +152,7 @@ function ConjugationTrainer() { className="ko" value={value} placeholder="…" + aria-label={`Conjugate ${question.dict} — ${mode === "past" ? "past 반말" : "반말"}`} onChange={(e) => { composer.onExternalInput(); setValue(e.target.value); diff --git a/app/src/ui/tabs/VocabTab.tsx b/app/src/ui/tabs/VocabTab.tsx index 01837cb..820aa5c 100644 --- a/app/src/ui/tabs/VocabTab.tsx +++ b/app/src/ui/tabs/VocabTab.tsx @@ -108,6 +108,7 @@ export function VocabTab() { type="search" value={query} placeholder="Search 한글 or English…" + aria-label="Search your words in 한글 or English" onChange={(e) => setQuery(e.target.value)} />