Skip to content

Grape waits until you stop writing before it underlines words - #418

Merged
Joost-8 merged 5 commits into
mainfrom
fix-word-check-rest
Dec 4, 2026
Merged

Joost-8 merged 5 commits into
mainfrom
fix-word-check-rest

Conversation

@Joost-8

@Joost-8 Joost-8 commented Dec 4, 2026

Copy link
Copy Markdown
Owner

Not verified on device. Joost's report was not reproduced on the iPad; the cause was read from the code (the check ran 1 s after the pen lifted), and the fix is pinned by tests.

What changed and why

Grape underlined misspelt or misread words 1 second after the Pencil lifted, so a pause inside a word got it underlined half written. The page in view is now checked only after the Pencil has been up 3 seconds, and every stroke starts that wait again. If the Pencil lands while a check is still working out its underlines, it shows nothing new and checks again at the next pause. Reported in Joost's "FineNotes bugs and improvements" notebook.

Proof

  • tests/view/ink-view-file.test.ts › "checks words 3 s after the last lift, and writing on restarts the wait": drives penActivity; nothing is read at 1 s, a stroke at 2 s restarts the wait, the read comes 3 s after the last lift. Fails with the old penQuiet check put back (checked).
  • tests/view/word-check-timer.test.ts (new pure module WordCheckTimer), tests/view/write-hold.test.ts (CHECK_QUIET_MS, checkQuietIn).
  • The reviewer agent found that a check interrupted mid-way could leave underlines that no longer answered a tap; fixed (the old entry stays when nothing new was shown; an entry already shown is kept and marked stale).
  • npm run gates passes. ink-view.ts stays under its cap (10199/10200): the timer moved into its own module.
  • Nothing a user sees changed shape; review page with the timeline: see the hand-in message.

Test on the device

  1. With word checking on, write "recieve" slowly, pausing about 2 s after "recie": no underline appears during the pause.
  2. Stop writing: about 3 s later "recieve" is underlined as a spelling, and a tap on it opens its card.
  3. Write a sentence at normal speed: nothing is underlined until you stop for about 3 s.

Not verified

  • On the iPad: whether 3 s feels right (one constant, CHECK_QUIET_MS in write-hold.ts).
  • Only the Pencil restarts the wait; a finger scroll or palm does not.

🤖 Generated with Claude Code

Joost-8 and others added 5 commits December 4, 2026 02:26
The page in view was read for misspelt and misread words 1 s after the
pen lifted, so a pause inside a word underlined it half written. It now
waits CHECK_QUIET_MS (3 s) from the last lift, a pen landing clears the
wait, and a check the pen interrupted shows nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eps taps working

WordCheckTimer (pure, tested) holds the one waiting check, so ink-view
stays within its cap. A check the pen interrupts before showing leaves the
old entry and underlines alone; one interrupted after showing keeps its
entry, marked stale, so taps still answer and the next rest checks again.
A wiring test drives penActivity: nothing at 1 s, restarted by a stroke,
read 3 s after the last lift.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… test builds the field

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Joost-8
Joost-8 marked this pull request as ready for review December 4, 2026 03:41
@Joost-8
Joost-8 merged commit ba49e7d into main Dec 4, 2026
1 check passed
@Joost-8
Joost-8 deleted the fix-word-check-rest branch December 4, 2026 03:41
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