Repository navigation
fix: mark the thread or conversation read when replying - #144
Conversation
Comms never moves the poster's own read position when they post, so a reply to an unread thread or conversation left it unread: threads until a separate `tdc thread mark-read`, conversations until opened in the app, since the CLI has no way to mark one read. `tdc thread reply` and `tdc conversation reply` now mark the target read through the reply they posted: a thread by the new comment's objIndex (--close and --reopen included), a conversation by the new message's ID. Anything posted after the reply stays unread. --no-mark-read turns it off. When the reply posts but marking it read fails, the command still succeeds and warns on stderr, so a script does not post it again.
doistbot
left a comment
There was a problem hiding this comment.
Both tdc thread reply and tdc conversation reply now mark the target read through the reply they just posted (using the new comment's objIndex or the new message's ID), with a --no-mark-read opt-out, and the marking is skipped on --dry-run and when the post fails. No inline issues were flagged — the implementation reuses the existing spinner, permissions, and warning-on-failure patterns, keeps docs, skill content, and the spinner map in sync, and the new tests cover the default behavior, opt-out, dry run, post failure, and the non-fatal warning path.
I also left one optional follow-up note in the details below.
Optional follow-up note (1)
src/commands/thread/reply.ts:182: The
--dry-runpreview only names the explicit--close/--reopenaction (post comment to thread and close it) and the notify defaults, so it doesn't show the new default mark-read side effect a real run performs.tdc thread reply <ref> "x" --dry-runcurrently reads as if only the comment is posted. Consider appendingand mark it read(and the conversation equivalent insrc/commands/conversation/reply.ts) to the dry-run label/fields whenoptions.markRead !== false, so the preview matches the documented default: https://handbook.doist.com/doc/github-repository-guidelines-iJNZ0D2vLN
## [6.1.0](v6.0.1...v6.1.0) (2026-12-04) ### Features * **conversation:** add tdc conversation mark-read ([#147](#147)) ([bda7dcf](bda7dcf)) * **conversation:** add tdc conversation mark-unread ([#148](#148)) ([c9c02e8](c9c02e8)) ### Bug Fixes * mark the thread or conversation read when replying ([#144](#144)) ([e061f51](e061f51))
|
🎉 This PR is included in version 6.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
The CLI counterpart of todoist/comms-mcp#133 (todoist/comms-mcp#132).
When you post in Comms, the backend skips you when it marks the thread or conversation unread, but it never clears unread you already had. So replying with
tdc thread replyleft the thread unread until a separatetdc thread mark-read, and replying withtdc conversation replyleft the conversation unread with no way to clear it from the CLI at all, since nothing here callsconversations.markRead.Both reply commands now mark the target read through the reply they just posted: a thread with
threads.markRead({ id, objIndex })using the new comment'sobjIndex(--closeand--reopenincluded), a conversation withconversations.markRead({ id, messageId })using the new message's ID. The backend treats a position below the latest one as moving the unread marker forward, so anything posted after the reply stays unread. A reply that fails to post, and a--dry-run, mark nothing; the dry-run preview has aMark read: yes(orno) line saying what a real run would do.--no-mark-readon both commands turns it off. It is named after the existingtdc thread mark-readverb rather than the MCP'smarkAsReadparameter. If the reply posts but marking it read fails, the command still prints the posted reply and exits 0, with aWarning:line on stderr (and, for threads, thetdc thread mark-readcommand to run), following the unarchive warning inthread create. Failing the command would read to a script as a failed post and invite a second one.--jsonoutput is unchanged.SKILL_CONTENT,skills/comms-cli/SKILL.md,docs/SPEC.mdand the spinner map cover the new flag and SDK call. Not tried against the real Comms API; covered by tests against the mocked client.