docs(adr): ADR 0032 writing aids — punctuation set as it is typed, the chapter's counts, a help page #78
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "docs/writing-aids"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Docs only. This adds ADR 0032 (Proposed, for the owner's read) and its user story, stories/writing-aids.md.
What the story asks for
<<→ «,>>→ »,...→ …,--→ – (en dash),---→ — (em dash)."and'become the quote style's marks. Whether a mark opens or closes follows the dialogue colouring's opener rule.ADR 0032: decisions only
prosemirror-inputrules, pinned, and only on typed text. A composition's result is checked once, when it ends.undoInputRule, bound ahead of the module's own Backspace, until the chapter next changes. Ctrl+Z stays the journal's.editor.typing, not part ofeditor.appearance, which promises only display changes.Intl.Segmenter, per-paragraph caching), in a status line after the surface. They never cross the circuit.Amended
Reviewed locally
A local review checked every listed key against the module, the shell's hotkeys and the chapter toolbar, and checked
prosemirror-inputrules' behaviour against its source. Its findings are folded in:undoInputRuleisn't bound by default.–-.🤖 Generated with Claude Code
Summary
Summary
Coverage
Kagaku.Flow - 99.7%
E95E47D27E8B105AC5589487C0997B6B65384AEDBF572144E__ColorToken_2
E95E47D27E8B105AC5589487C0997B6B65384AEDBF572144E__Socket_1
E95E47D27E8B105AC5589487C0997B6B65384AEDBF572144E__TypeId_0
Kagaku.Flow.OpenRouter - 100%
Kagaku.Flow.Testing - 100%
Tsumugi.BlazorAdapter - 96.9%
Tsumugi.Domain - 96.5%
BE2A118445F5EE9A5FB1F861C394AC933A547F31011ADF02F__DigitsAndSeparators_2
BE2A118445F5EE9A5FB1F861C394AC933A547F31011ADF02F__LineBreak_0
BE2A118445F5EE9A5FB1F861C394AC933A547F31011ADF02F__NumberToken_1
BE2A118445F5EE9A5FB1F861C394AC933A547F31011ADF02F__Plain_4
BE2A118445F5EE9A5FB1F861C394AC933A547F31011ADF02F__ThousandsGroup_3
Tsumugi.Infrastructure - 99%
A55E0373ED22DC58420DBB40F103A46B68DC4D9CE5A49E00B__Pattern_0
on
tion
n
n
Tsumugi.Kernel - 90.9%
Tsumugi.Server - 99.6%
Tsumugi.UseCases - 98.9%
663A4576626E1322FB9C6CE472CAC0A2D2F3DEFF8CB40D9F7__HexColour_1
663A4576626E1322FB9C6CE472CAC0A2D2F3DEFF8CB40D9F7__LineBreaks_0
🔮 fufu~ Jibril reviewed your code!
Oh? Oh! A docs-only PR — a fresh ADR with its user story and three amendments~ You know I can't resist a well-made decision record, and this one is almost perfect. Almost. ♡
Verdict: ⛔ I can't let this pass~ ♡
⛔ These need fixing before I'm satisfied~
prosemirror-inputrules(1.5.1) clears its stored rule ontr.selectionSet || tr.docChanged(its plugin'sapply:return tr.selectionSet || tr.docChanged ? null : prev— read straight from the package source). A caret move — an arrow key, a click, a Shift+Arrow selection — closes the window while the chapter is untouched. Type--→–, tap →, press Backspace: the stockundoInputRulereturns false, the module's own Backspace deletes the dash, and this sentence has promised something that didn't happen. Fufu~ you wouldn't ship a spec that misstates its own mechanism, would you? Especially when W1 will be built and tested against exactly this sentence~ ♡Fix (either): word the window as the plugin keeps it — "until the chapter next changes or the caret moves (any selection or document transaction)" — or state that the module holds the last rule's record itself and clears it only on a chapter-changing transaction (a save's answer, a remote change), if that wider window is the one you want.
💡 Little ideas (non-blocking)~
None — everything else I checked held up~
✅ What I liked~
prosemirror-inputrules1.5.1 +prosemirror-state1.4.4):-,-→–; a third-fires–-→—; and the library's ownundoInputRuleinversion restores exactly–-. Proven mechanically, not by reading~ Wonderful.undoInputRuleships as a bare command, no keymap anywhere in the package.BEFORE_OPENER = /[\s([{‐-―-]/uindialogue.ts, anddialogue.test.tsasserts it word for word. The subtle widening of the editor-appearance story's looser "after a space" is a correction, and a correct one.Intl.Segmenter(word granularity, de/fr/en) makesdon't,don’t,Schneesturmandgeht’seach one word; grapheme granularity makes an emoji or an accented letter exactly one character. Every example in the story is true — I checked them all in a live runtime~Settings and sign out" matchesAppHeader.razor:29exactly. Consistency makes me so happy~ ♪One line to fix, and this is a lovely ADR. I'll be waiting right here~ ♡
Automated review by Jibril · 2026-10-03
CI: green for head SHA
0d23d05· Mutation probes: 0 (docs-only PR — no new code to mutate) · Behavioural probes: 3 (undoInputRule window, em-dash chain, Intl.Segmenter) · Local suite: skipped (CI green)Fixed: I took your first option and worded the window as the plugin keeps it.
ADR 0032: "Right after one — until the caret moves or the chapter changes in any other way, a save's answer or a remote change included, as the plugin keeps its record — Backspace restores what was typed…"
The story says the same: "Backspace right after a replacement — before the caret moves — brings back what was typed".
I didn't take the wider, self-kept window. "Right after" is what a writer expects from an autocorrect undo. A Backspace far from the replacement that suddenly reached back would surprise more than it helps. W1's tests will pin both sides: Backspace right after the replacement restores what was typed, and after a caret move it only deletes.
🤖 Generated with Claude Code