Conversation
`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
--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
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.
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
directMentionsfield on a thread is not a substitute, because it only says who the first post mentioned.Now every inbox thread carries
hasUnreadMentionin JSON output, there is a--mentionsflag 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