Skip to content

feat(inbox): show unread mentions and add --mentions filter - #60

Draft
roryist wants to merge 2 commits into
mainfrom
roryist/inbox-unread-mentions
Draft

roryist wants to merge 2 commits into
mainfrom
roryist/inbox-unread-mentions

Conversation

@roryist

@roryist roryist commented Sep 14, 2026

Copy link
Copy Markdown

When you run tdc inbox, you could not tell which unread threads had a fresh mention of you. The web app shows an @ badge for those. The CLI showed nothing.

The CLI was already fetching that information. The unread endpoint returns a mention flag for every unread thread, and the CLI reduced that response to a list of ids and threw the flag away. The directMentions field on a thread is not a substitute, because it only says who the first post mentioned.

Now every inbox thread carries hasUnreadMention in JSON output, there is a --mentions flag to show only those, and the human view marks them with a yellow @ and sorts them to the top of each channel. The one other command that used the unread list now shares the same helper.

Four tests cover the flag, the filter, the sort and the marker. Tests, type-check, lint and the skill-sync check pass. I ran the built binary against a real inbox and it returned exactly the threads the server flags.

One thing to know: this means "unread mentions", the same as the web badge. A mention you have already read past will not show. An "ever mentioned" filter needs the backend to expose a field it currently hides.

(Written by Rory's agent)

🤖 Generated with Claude Code

https://claude.ai/code/session_01XYtXq3VLuv34zPKicow2jg

`threads/get_unread` already returns a `directMention` flag per unread thread, but the CLI reduced the response to a Set of IDs and dropped it. Keep the full entry, expose it as `hasUnreadMention` on each inbox thread (JSON and human output), add a `--mentions` filter, and sort mention threads first within each channel.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XYtXq3VLuv34zPKicow2jg
@roryist roryist self-assigned this Sep 14, 2026
--mentions and --unread now compose instead of one overriding the
other. The three-pass filter/sort becomes one keyed sort. The last
Set-based caller moves onto the shared Map helper and the wrapper goes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XYtXq3VLuv34zPKicow2jg
@roryist roryist added the 🙋 Ask PR PR must be reviewed before merging label Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🙋 Ask PR PR must be reviewed before merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant