[Beta]: In the Content Completion example, the first undo after emptying a bold word restores one letter, and a click that changes nothing adds an undo step
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 53/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- react, typescript
調査の方向性
Start by reading packages/plitejs/src/history/history-merge-policy.ts around line 311 and shouldMergeBatch around line 353, then inspect packages/plitejs/src/history/history-plugin.ts around shouldSaveCommit at line 582. Reproduce both cases in the Content Completion example and trace how its edits reach history. Done means deleting a bold word takes one undo step and repeated clicks that make no change add no undo steps.
索引モデルが issue の本文から書いたものです。
説明
Testing lane
- Repository:
udecode/plate - Branch:
next - Release channel: Beta
- Exact commit/package version:
NOT_ENOUGH_INFO
Summary
On /examples/plite/content-completion, two edits leave extra undo steps on Beta:
- Deleting a bold word letter by letter until its line is empty makes two undo steps, so the first ⌘Z brings back only the first letter.
- A click on
Remove the text node of line 2that changes nothing still adds an undo step, so ⌘Z has to go through those empty steps first.
natamox judged both bugs, low priority, on 2026-10-22.
Reproduction
Repro 1: /examples/plite/content-completion, Chromium
- Open https://beta.platejs.org/examples/plite/content-completion.
- Click the end of the first bold line,
bold. - Press Backspace 4 times. The line is empty.
- Press ⌘Z.
- Press ⌘Z again.
- For comparison, click the end of the second bold line, press Backspace 3 times to leave
b, and press ⌘Z.
Step 4 brings back only b, and step 5 brings back bold. The test script's readout counts 2 undo steps after the four Backspaces of step 3. In step 6 one ⌘Z brings back bold. Emptying Lead in the quote block behaves the same way: the first ⌘Z brings back only L. The run recorded that a plain text line comes back with one ⌘Z.
Repro 2: /examples/plite/content-completion, Chromium
- Open https://beta.platejs.org/examples/plite/content-completion.
- Click
Remove the text node of line 2. Line 2,Remove my text node, becomes an empty line, and the line stays. - Click the same button 2 more times. The page does not change.
- Click the end of
Titleto put the caret back in the editor. After a button click the editor has no focus, and ⌘Z does nothing until it has. - Press ⌘Z three times.
The first two ⌘Z change nothing on the page. The third brings back Remove my text node. The readout's undo count goes from 1 to 3 during step 3.
Expected
- Repro 1: one run of Backspaces is one undo step, so one ⌘Z brings back the whole word. The same page does this when one letter is left (step 6) and for a plain text line.
- Repro 2: a click that changes nothing adds no undo step, so the first ⌘Z brings back
Remove my text node. slatejs.org has no matching example. This is the tester's (natamox's) expectation, given when natamox judged it a bug.
Actual
- Repro 1: the first ⌘Z brings back one letter, and a second ⌘Z is needed for the rest of the word.
- Repro 2: each click that changes nothing adds an undo step, and each of those steps takes a ⌘Z that changes nothing on the page.
Environment
- Exact
nextcommit/Beta package version:NOT_ENOUGH_INFO. The recordings' step panel names the build as Beta, next7f2eacb6eb, deployed 2026-10-22. - On 2026-10-24 an agent replayed both repros on the live Beta in headless Chromium 149, and both still fail.
- Both repros: headless Chromium 149.0.7827.55 on macOS, driven by Playwright with real key presses and clicks. An agent found both in a manual pass in its own Chromium 152.0.7977.167 browser, then recorded them at natamox's request, on 2026-10-22 (PT).
- Nobody has tried Firefox or Safari.
Caveat
- From a reading of the code on
next, not checked with a debugger:- Repro 1: when the last letter goes, content completion also removes the bold mark from the now empty text. In mixed content, such as the quote block, it removes the empty text instead. That commit then carries a property or structure change, so
packages/plitejs/src/history/history-merge-policy.ts:311classes it asdocument.shouldMergeBatch(:353) merges only text with text and properties with properties, so the commit becomes a step of its own. - Repro 2: the button removes the empty text, and content completion inserts an empty text back, so the commit's changes are not empty.
shouldSaveCommitinpackages/plitejs/src/history/history-plugin.ts:582saves every commit whosechanges.emptyis false.
- Repro 1: when the last letter goes, content completion also removes the bold mark from the now empty text. In mixed content, such as the quote block, it removes the empty text instead. That commit then carries a property or structure change, so
- After each ⌘Z in Repro 2, the readout's
Caretline readsnonewhile the page still shows the caret at the end ofTitle. The run noted that undoing a step made while the editor had no selection leaves the model selection empty, and that typing still lands in the right place. It is not part of this issue.
Evidence
- Repro 1: headless Chromium recording, 30 seconds, with an English step panel beside the page and a readout box drawn by the test script. The box shows the caret, the undo and redo counts and the keys just pressed. At 0:02 the click lands at the end of the first
bold. From 0:05 to 0:06 four Backspaces empty the line, and the readout showsUndo steps: 2. At 0:08 ⌘Z brings back onlyb. At 0:11 the second ⌘Z brings backbold. At 0:13 the click lands at the end of the secondbold, and by 0:15 three Backspaces leavebwithUndo steps: 1. At 0:18 one ⌘Z brings backbold. From 0:21 the panel shows the result. - Repro 2: headless Chromium recording, 29 seconds, in the same layout. At 0:02 the first click empties line 2, and the readout shows
Undo steps: 1. At 0:05 two more clicks leave the page as it is, and the count goes to 3. At 0:08 the click puts the caret at the end ofTitle. ⌘Z at 0:11 and at 0:13 changes nothing on the page while the count drops to 2 and then 1. ⌘Z at 0:16 brings backRemove my text node. From 0:19 the panel shows the result.
Repro 1 — headless Chromium, /examples/plite/content-completion
https://github.com/user-attachments/assets/1174dbe6-41c0-44d3-8fbc-9454a33c3ae2
Repro 2 — headless Chromium, /examples/plite/content-completion
https://github.com/user-attachments/assets/8f00de75-bbdd-4785-bf0c-ec1188daa726
- 主要言語
- TypeScript
- スター
- 16.6k
- フォーク
- 993
- 平均マージ
- 20時間 21分
- マージ済み PR(30日)
- 60
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
udecode/plate のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
[Beta]: After Enter saves an edited link URL, the link toolbar stays hidden while the caret is in the link対応中かも @zbeyens が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
udecode/plate#5314 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
[Beta]: The docs Demo example page starts with an empty editor対応中かも @natamox が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
udecode/plate#5308 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
Parallel reticle_verify opens per-flow leases without the source lease's ignoreHTTPSErrors対応中かも @as992949791 が今日担当しました。 オープンgood first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
reticlehq/reticle#2033 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
area:quality p3-medium ready-for-agent type:docs
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
fderuiter/deruiter.dev#3589 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
manfredsteyer/angular-oauth2-oidc#1514 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
marmelab/react-admin#11431 ·
メンテナーはふだん 1 日以内に返信