Repository navigation
fix(msg): mark deleted conversation messages instead of showing them as live - #151
Merged
Merged
Conversation
…as live Bump @todoist/comms-sdk to 6.3.1, which keeps the message's deleted flag. msg view and conversation view now show a (deleted) badge and a note, and JSON output has content: null and deleted: true. The comment and message paths share deletedBadge, renderEntryBody and clearDeletedContent.
gnapse
force-pushed
the
fix/deleted-messages
branch
from
December 4, 2026 17:10
66af6ed to
985fdd5
Compare
doistbot
reviewed
Dec 4, 2026
doistbot
left a comment
Member
There was a problem hiding this comment.
This update unifies deleted conversation message handling with comments across text and JSON output using shared helpers in src/lib/output.ts.
Few things worth tightening:
- Load
renderMarkdownlazily insiderenderEntryBodyrather than via a static import insrc/lib/output.tsto keep the startup-latency gate intact for commands that don't render markdown.
I also included a few optional follow-up notes in the details below.
Optional follow-up notes (2)
src/lib/output.ts:39:
renderEntryBodyis a new shared helper insrc/lib/, but theoutput.tsentry inCODEBASE.mdonly listsformatJson/formatError/colors/pluralize/closedThreadBadge/pinnedBadge. AddrenderEntryBody(anddeletedBadge/clearDeletedContent, which are also missing) to that catalog line so the file's helper list stays accurate.src/lib/output.ts:104: Adding
deletedto the essential message fields puts a new field in the--json/--ndjsoncontract formsg viewandconversation view(previously dropped from non---fulloutput). The repo's command-surface check treats additive--jsonfields as afeat:change, and CONTRIBUTING reserves minor versions for new features, but this PR is titledfix(msg): …— so semantic-release will ship the new field as a patch and leave it out of the feature notes. Retitle tofeat(msg): …if the field is meant to be surfaced in the release.
Contributor
Author
|
On the two optional notes:
|
scottlovegrove
approved these changes
Dec 4, 2026
doist-release-bot Bot
added a commit
that referenced
this pull request
Dec 4, 2026
## [6.1.1](v6.1.0...v6.1.1) (2026-12-04) ### Bug Fixes * **msg:** mark deleted conversation messages instead of showing them as live ([#151](#151)) ([84056f3](84056f3))
Contributor
|
🎉 This PR is included in version 6.1.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
What
Deleted conversation messages now show as deleted, like deleted comments since #143.
(deleted)after the header, and "This message was deleted." in place of-.--json/--ndjson/--full:content: nullanddeleted: true.Why
The API keeps a deleted message in place with
content: "-"anddeleted: true. SDK 6.3.0 strippeddeleted, so the CLI showed-as a live message. todoist/comms-sdk-typescript#172 (released in 6.3.1) keeps the flag. This PR bumps to 6.3.1 and uses it.How
Comments and messages share three helpers in
src/lib/output.ts:deletedBadge,renderEntryBody,clearDeletedContent.comment viewandthread viewnow userenderEntryBodytoo. Their output is unchanged.Evidence
msg.test.tsandconversation.test.tsfail with the view changes reverted (2 failed), pass with them.msg viewshows(deleted)and the note.conversation view --jsonaround it givescontent: null, deleted: true, and no"-"content in 25 messages.npm run verifypassed.Not verified: Node 24/26 (CI covers it).