Repository navigation
Copy QA: which Discard closes a draft - #1740
Merged
haowjy merged 1 commit intoNov 17, 2026
Merged
Conversation
…ive chat leaves it open and equal to live
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog
None. Documentation only: a QA recipe is corrected; no code behavior changed.
Why
The never-refuse design says a draft that closed is copied from the closed draft, and a draft view whose draft never existed copies the live text. A browser run (prober-1555) reported that after a strip Discard,
./mf doc copy ... --draft-work w1gave the live text, not the closed draft's.Finding: no code defect, and #1721 does not conflict with the decision. #1721 only deleted the
no_draftrefusal, so a Work with no draft copies live; it did not touch the closed-draft read (readWorkDraftineffective-document-reader.tsstill prefers the open draft, then the latest closed one). The browser's Discard on a live chat sendsends: "tree": the app reverts the text in the room and the draft stays open, now equal to live (document_drafts.statusstayedactive,GET .../draftwas 404). The writer's Draft view shows the live text, so Copy gives it. That is the decision, not a break of it.The QA doc's step 3 said "Discard all" without saying which Discard closes the draft, so it read as if the browser strip did.
Examples
Copy after a Discard
MODEL_PROVIDER=mock LIVE_TEST_MODEL= pnpm dev; Work w1, a draft-mode chat,manuscript://CopySource=A still lake., mockwrite replacetoA stormy lake.../mf doc copy manuscript://CopySource --to kb://A --draft-work w1givesA stormy lake..POST /api/projects/<id>/branches/<branch>/discard {"commandId":…,"all":true}closes the draft (statusclosed). Same copy givesA stormy lake.(closed draft), also for a folder: a drafted document gives the closed text, an undrafted one gives live.manuscript://Plain) copiesPlain live..A quiet pond.(live), matching what Draft view shows.Benchmarks
None. Documentation only.
Design decisions
None. Follows
never-refuse/design.mdsection 5 andpr-b-plan.mdas written.Changes
apps/server/server/domains/context/.context/qa/copy-server.mdstep 3: names the Discard that closes a draft, and says the browser strip's Discard on a live chat leaves it open and equal to live.Compatibility and risk
None. No code changed.
Verification
pnpm checkgreen on the commit.Deferred
None.
References