feat(inbox): add --include-self flag to capture self-authored @mentions#19
Merged
isaacrowntree merged 8 commits intoMay 27, 2026
Merged
Conversation
clickup inbox filters out @mentions where the user is also the comment author. that hides a deliberate workflow: dropping `@self` on a teammate's task as a self-reminder. add an opt-in flag plus cache-invalidation so the next run sees the prior setting and forces a rescan when it changes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
isaacrowntree
left a comment
There was a problem hiding this comment.
Clean, well-scoped change. A few checks I ran:
Correctness
- Filter reduces to the old condition when
includeSelf=false:containsMention && (false || !isSelf)≡containsMention && !isSelf. ✓ - Cache invalidation on flag mismatch is correct —
mentionsByTaskis filter-dependent, so toggling must force a rescan. - JSON round-trip is safe: existing cache files without
include_selfdeserialize toIncludeSelf: false, matching default behavior. No migration needed.
Minor notes (not blockers)
- Description mentions (
r.task.Description, inbox.go:246) don't have a self-author concept and are always included regardless of the flag. Pre-existing behavior, out of scope here — flagging in case you want a follow-up. - Each toggle of
--include-selftriggers a full cold rescan. Acknowledged in the PR description and the right trade-off.
LGTM.
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.
Summary
clickup inboxsilently filters out comments where the user @mentioned themselves, which hides a deliberate "remind myself later" workflow on teammates' tasks.--include-selfflag that, when set, includes self-authored mentions alongside the normal incoming ones.Implementation
pkg/cmd/inbox/inbox.gorewritten asif containsMention(...) && (opts.includeSelf || !isSelf).inboxCachegets a newinclude_selffield. If the flag setting differs from the cached run's setting, the cache is treated as stale and a cold rescan kicks in. This avoids the case where a previous default-off run cached "no mentions" for tasks that actually have self-mentions.TestNewCmdInbox_Defaultsextended to assert the new flag exists and defaults to false.TestInboxCache_FlagMismatchInvalidatescovers the JSON round-trip of the new cache field.Test plan
go test ./pkg/cmd/inbox/...→ 70 passed (69 prior + 1 new)go test ./...→ 751 passed across 45 packagesManual:
clickup inbox --json --days 7 --include-self --no-cacheagainst a real workspace recovers self-authored @mentions that the default run omitsManual: toggling
--include-selfbetween consecutive runs triggers a cache rescan as expectedI have assessed security implications of this change
I have tested this change (automating where feasible)
I have updated the documentation (where applicable)