Repository navigation
fix(drafts): the held-draft notice names the message and says why in a sentence - #656
antra-tess wants to merge 1 commit into
Conversation
…a sentence
Before: "[drafts] scout: not sent — a plain-speech segment held as draft
d-… — an explicit send in the same round holds plain speech back."
After: "[drafts] scout: your plain-speech message starting "…" was not
sent and is instead held as draft d-… because there was an explicit send
in the same round as the plain speech."
- Each held draft is named with its opening words (draftPreview, 50
chars), so a resident can tell which of its messages the notice means;
several drafts read "drafts d-a (starting "…") and d-b (starting "…")".
- The reason is a "because" clause (DRAFT_REASON_BECAUSE), plural-aware
for no-destination and bounced. DRAFT_REASON_TEXT stays as is for the
drafts tool's listing.
- "Not sent" is still left out when a draft carries words that may
already have been posted ("is held as draft …").
- This reverses b2a21ec's "notices quote no draft words" for this one
notice; the catch-up notice and receipts still quote none.
Tests: prose-drafts asserts the new sentence for one draft, and for a free
plus an unconfirmed copy (no "not sent").
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Automated review
Recommendation: needs a maintainer's decision. The change belongs, but part of it needs a maintainer's call.
Reviewed commit 35c2713 with claude-opus-5-5, by reading the code. It did not run the code or look at the checks.
Does this change belong in the project?
It fits, with concerns. Rewording an existing drafts notice is in scope and stays where that code already lives. It does reverse the recorded rule that notices quote none of a draft's words, though, so a maintainer should decide that on purpose.
4 reasons with sources
- The change rewrites the wording of a notice the framework already sends, and keeps it in the same method and test file. Only draftsHeldNotice changes, plus a new DRAFT_REASON_BECAUSE table placed next to the existing DRAFT_REASON_TEXT. It reuses the existing draftPreview helper and adds no dependency, service or public interface. (src/framework.ts (draftsHeldNotice); test/prose-drafts.test.ts)
- It reverses a documented behavior: the changelog records that held-draft notices quote none of a draft's words. The shipped entry says "Notices name drafts and say how to resend or dismiss them, and quote none of their words; the
draftstool'sreadshows the words, and itslista preview of each." The PR now puts a 50-character preview into the held-draft notice, and it drops a test assertion that checked for this. The catch-up notice and its tests (prose-drafts.test.ts ~892-940) still follow the old rule, so different notices now behave differently, and a maintainer should accept that on purpose. (CHANGELOG.md (drafts entry, lines 1050-1053)) - Quoting words in a notice that co-residents share doesn't seem to expose anything new under the project's stated model. The project says that residents sharing one message slot already share the assistant turn the words came from, so a preview in that shared notice reveals nothing they couldn't already see. (CHANGELOG.md (lines 1054-1057))
- The PR follows the contribution conventions: a changelog fragment, updated tests and a numeric test count. It adds changelog.d/draft-notice-wording.changed.md, updates the assertions in prose-drafts and reports 267/267 passing. As the code review noted, the fragment doesn't mention that the earlier no-quoting rule is reversed for this notice. (CONTRIBUTING.md (What a PR should contain; Changelog))
Findings
No findings of medium or high severity.
1 more finding, less severe
- Low severity, documentation,
changelog.d/draft-notice-wording.changed.md:1-5. The changelog fragment does not say this notice now quotes draft words, reversing a documented rule. CHANGELOG.md (around line 1051) tells users that draft notices 'name drafts and say how to resend or dismiss them, and quote none of their words'. This change makes the held-draft notice quote each draft's opening words. The fragment does not say that this rule changed, or that the catch-up notice and the receipt still quote none. Readers of the released changelog would still believe notices never contain draft text. The fragment should state the reversal explicitly, as the PR description does.
|
@antra-tess We reviewed
Two small notes on this PR's text:
Written by Nigel-2405. — Lottie-2661 |
The held-draft notice a resident gets when its plain speech is held back now says which message it means, and why, in a full sentence.
Before
After
When several are held:
Changes
draftPreview, cut at 50 characters).DRAFT_REASON_BECAUSE, with plural forms forno-destinationandbounced.DRAFT_REASON_TEXTis unchanged, so the drafts tool's listing keeps its wording.Tests:
prose-draftsnow checks the new sentence for one held draft, and for a free draft next to an unconfirmed copy (no "not sent").prose-drafts,explicit-prose-routingandpresent-while-actingpass (267/267). A changelog fragment is included.🤖 Generated with Claude Code