Skip to content

feat(conversation): add tdc conversation mark-read - #147

Merged
scottlovegrove merged 3 commits into
scottl/read-state-runnerfrom
scottl/conversation-mark-read
Dec 4, 2026
Merged

scottlovegrove merged 3 commits into
scottl/read-state-runnerfrom
scottl/conversation-mark-read

Conversation

@scottlovegrove

@scottlovegrove scottlovegrove commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

Conversations had no way to be marked read from the CLI: nothing called conversations.markRead, and conversation done archives without marking read. This adds tdc conversation mark-read, built on the read-state runner from the PR below, so it behaves like tdc thread mark-read:

  • one or more refs, or --stdin (one per line, # lines skipped)
  • a single conversation runs straight away; several need --yes, and without it each is previewed with Use --yes to confirm.
  • --dry-run previews; --json prints a { id, isRead } row per conversation
  • conversations that are already read are reported as such and left alone; the workspace's unread list is fetched once per run

Each conversation is marked read through its lastObjIndex. Messages name a titled conversation as Title (id) and an untitled one by its id (Conversation 42 marked read.), since the line already says "Conversation".

tdc conversation reply's warning when marking the reply read fails now points at tdc conversation mark-read id:<id>, as the thread one does. SKILL_CONTENT, the regenerated SKILL.md and docs/SPEC.md cover the command.

Checked against the real API with --dry-run only: an unread conversation came back as "would mark read", so the unread lookup matches prod. Nothing was actually marked read.

@scottlovegrove
scottlovegrove added this pull request to stack #146 December 4, 2026 14:38
@scottlovegrove scottlovegrove self-assigned this Dec 4, 2026

@doistbot doistbot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adds tdc conversation mark-read, built on the shared read-state runner so it behaves like thread mark-read (single/bulk refs, --stdin, --dry-run, --json rows, already-read handling), updates the reply-failure hint to match the thread equivalent, and covers the command in SKILL_CONTENT, SKILL.md, and docs/SPEC.md. No inline issues were flagged.

I also included a few optional follow-up notes in the details below.

Optional follow-up notes (3)
  • P3 README.md:148: The README's usage list enumerates the other conversation subcommands (done, undone, reply, etc.) but now omits tdc conversation mark-read, so the quick reference is missing a command people will look for there. Add a line alongside tdc conversation done <ref> --yes.
  • P3 src/commands/conversation/mark-read.ts:8: This MarkReadStatus type and the plan below (scope, isUnchanged, status, apply) are a near-verbatim copy of markThreadRead in src/commands/thread/read.ts. The only real difference is how the objIndex is computed. Since both now target the shared runner, consider moving the read plan and status type into src/lib/read-state.ts (e.g. a helper that takes a latestObjIndex(item) accessor on the entity) so a future mark-read change only has to be made in one place.
  • P3 src/commands/conversation/index.ts:201: This new guard (print help when no refs and no --stdin) has no test. thread mark-read covers the same path in thread.test.ts:2917; add the conversation equivalent so a regression here (falling through to the runner's INVALID_REF or consuming piped stdin without --stdin) is caught. Assert stdout contains Usage: tdc conversation mark-read and that client.conversations.markRead was not called.

Share Feedback • Review Logs • Trace

@scottlovegrove
scottlovegrove force-pushed the scottl/conversation-mark-read branch from ed71c5e to 141d352 Compare December 4, 2026 14:44
Conversations had no way to be marked read from the CLI. `tdc
conversation mark-read` works like `tdc thread mark-read` on the shared
read-state runner: one or more refs (or --stdin), --yes for a bulk run,
--dry-run, a { id, isRead } row per conversation with --json, and
conversations that are already read left alone. It marks each one read
through its lastObjIndex.

`tdc conversation reply`'s warning when marking the reply read fails
now points at the new command.
@scottlovegrove
scottlovegrove force-pushed the scottl/conversation-mark-read branch from 141d352 to 4e078db Compare December 4, 2026 14:49
@scottlovegrove
scottlovegrove requested review from a team and frankieyan and removed request for a team December 4, 2026 14:55
@scottlovegrove scottlovegrove added the 👀 Show PR requires passing checks before merge and independent human review before or after merge. label Dec 4, 2026
@scottlovegrove
scottlovegrove merged commit bda7dcf into main Dec 4, 2026
9 checks passed
@scottlovegrove
scottlovegrove deleted the scottl/conversation-mark-read branch December 4, 2026 15:04
doist-release-bot Bot added a commit that referenced this pull request Dec 4, 2026
## [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))
@doist-release-bot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 6.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released 👀 Show PR requires passing checks before merge and independent human review before or after merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants