Skip to content

Spellcheck option C: the build flags misspellings, the editor underlines them on every slide in every browser - #16

Merged
grunion-ai merged 1 commit into
mainfrom
feat/spell-option-c
Sep 8, 2026
Merged

Spellcheck option C: the build flags misspellings, the editor underlines them on every slide in every browser#16
grunion-ai merged 1 commit into
mainfrom
feat/spell-option-c

Conversation

@grunion-ai

Copy link
Copy Markdown
Owner

What changed

Spellcheck option C: the build checks every word once, the deck carries the refused list, the editor underlines those words on every slide in every browser.

  • lib/spell.mjs: textsOf (slide rows, html runs, master rows), checkable (skips tokens a dictionary cannot judge: under three letters, all caps, inner capitals, digits), flags(deck, correct) (sorted, lowercase, unique; honours spell.ignore), loadChecker(lang) (nspell + dictionary-en, en only, null when not installed).
  • create takes {spell} and writes /*SPELL*/[…]/*/SPELL*/ into the file next to the log and the versions. The CLI loads the checker, prints the flagged words, and says plainly when the dictionary is not installed. --from re-checks after the human's edits land.
  • Template: ::highlight(spell) red wavy underline through the CSS Highlight API, painted after every live canvas draw and on input in the row being edited; none while presenting, on paper, or in the ⤓ PDF. The ✓ toggle clears and repaints. The browser's own spellcheck attribute stays as the second layer.
  • Model: a deck may say spell: {ignore: ["decklet"]}. Documented in SKILL.md next to lang.
  • Dependencies: nspell and dictionary-en as optional devDependencies (peerDependenciesMeta optional), the same shape as Playwright. The deck itself still ships nothing but the words.

Why

Kyle never saw the spellcheck button do anything: option A hands the work to the browser, and Chrome marks only the focused row after a keystroke, Safari marks only typed words, and the Claude desktop pane has spellcheck off. A word list in the file paints the same everywhere.

Verification

  • New gate test/spell.test.mjs: tokeniser rules, create writes the block (and [] without a checker), the real dictionary agrees on the seeded typos and rejects de, and a live Chromium proof: three flagged words on slide 1 (master row, text row, html run), one on slide 2, the toggle clears and repaints, typing a flagged word underlines it live, presenting paints none.
  • deck.html and library.html rebuilt through the CLI with the dictionary; their gates load the same checker.
  • Eyeballed in the desktop pane on the spellcheck test deck: renewls, reveiw, colour, decklet underlined on an unfocused slide, which option A never managed there.
  • Full suite on the branch: node --test test/**/*.test.mjs → 170 pass, 0 fail, 0 skipped (Playwright live tests included).

Follow-up owned by Kyle: adriany task 1943 covers the versions button; the same deck is the place to try this.

🤖 Generated with Claude Code

…ck carries the list, the editor underlines them on every slide in every browser

lib/spell.mjs tokenises what a reader sees (slide rows, html runs, master rows), skips what a dictionary cannot judge (short, all caps, inner capitals, digits), honours spell.ignore, and loads nspell + dictionary-en when installed (optional devDependency, like Playwright). create writes /*SPELL*/[…]/*/SPELL*/ beside the log; the CLI prints the flagged words or says the dictionary is missing. The template paints them through the CSS Highlight API after every live draw and on input in the edited row; never while presenting, on paper or in the ⤓ PDF; the ✓ toggle clears and repaints; the browser's own checker stays as the second layer. Gate: test/spell.test.mjs; the deck.html and library.html gates build with the same checker.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@grunion-ai
grunion-ai merged commit 4fbb358 into main Sep 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant