You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Undo of a server Discard all brings the AI's change back over Live typing #1733
Found while fixing #1727. Undoing the Changes list's Discard all brings the AI's change back over a word the writer typed in Live since, at any timing. The draft then proposes replacing the writer's word, and no "couldn't come back" line shows. Nothing is lost: Live keeps the typed word until the writer applies.
Steps (mock stack, one chat in Draft mode that replaced "old gate" with "crumbling gate"):
Open the chat's Changes list and press Discard all.
Open the document beside the chat (Live), select "old" and type "grey".
Wait 12 s, then press the row's Undo discard of Gate.
Result: the draft shows "grey" struck and "crumbling" added. Pressing Undo at once does the same.
Expected (as #1727 settles it for a room Discard): the line "1 change couldn't come back: the text changed after it was discarded." and the draft keeps the writer's word.
Cause: Discard all is a server Discard. Its Undo (createDrizzleUndoDiscard → reopen in apps/server/server/domains/collab/adapters/drizzle-reopen-drafts.ts) reopens the closed draft as it was, with its old base. The next Live pull merges Live's new text into it with contentMerge, where the draft's side wins a conflict, so the AI's word stays as a proposal over the writer's. Nothing on this path asks whether the discarded text was edited since. The room Discard's Undo (the chat strip, the editor) asks that with touchedSince, so the two Undos of the same kind of action disagree.
Needs a decision: should restoring a whole discarded draft leave out a change whose Live text was edited since, and count it in leftOut the way a room Discard's Undo does? If yes, the check belongs in reopen, against the Live text the draft's base last saw.
Activity
Give a restore that left everything out its own state, so Trash and t…
Remove PR screenshots for #1733 (linked at their commits)
Restore checks the base it reopens with, matches the room's touched s…
Add PR screenshots for #1733 round 2
Remove PR screenshots for #1733 round 2 (linked at their commits)
A restore of a Discard leaves out a draft whose Live text was edited …
haowjy commentedon Nov 16, 2026
Fixed by #1735, merged into the integration branch
feat/document-commands-never-refuse; reachesmainwith #1555.