Skip to content

feat(inbox): add --include-self flag to capture self-authored @mentions#19

Merged
isaacrowntree merged 8 commits into
triptechtravel:mainfrom
aliir74:feat/inbox-include-self
May 27, 2026
Merged

feat(inbox): add --include-self flag to capture self-authored @mentions#19
isaacrowntree merged 8 commits into
triptechtravel:mainfrom
aliir74:feat/inbox-include-self

Conversation

@aliir74
Copy link
Copy Markdown
Contributor

@aliir74 aliir74 commented May 25, 2026

Summary

  • clickup inbox silently filters out comments where the user @mentioned themselves, which hides a deliberate "remind myself later" workflow on teammates' tasks.
  • Adds an opt-in --include-self flag that, when set, includes self-authored mentions alongside the normal incoming ones.
  • Default behavior is unchanged: without the flag, the existing filter still applies. Zero impact on existing users.

Implementation

  • Filter at pkg/cmd/inbox/inbox.go rewritten as if containsMention(...) && (opts.includeSelf || !isSelf).
  • Cache round-trip: inboxCache gets a new include_self field. 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.
  • Test coverage:
    • TestNewCmdInbox_Defaults extended to assert the new flag exists and defaults to false.
    • TestInboxCache_FlagMismatchInvalidates covers 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 packages

  • Manual: clickup inbox --json --days 7 --include-self --no-cache against a real workspace recovers self-authored @mentions that the default run omits

  • Manual: toggling --include-self between consecutive runs triggers a cache rescan as expected

  • I have assessed security implications of this change

  • I have tested this change (automating where feasible)

  • I have updated the documentation (where applicable)

aliir74 and others added 8 commits May 25, 2026 12:23
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>
Copy link
Copy Markdown
Contributor

@isaacrowntree isaacrowntree left a comment

Choose a reason for hiding this comment

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

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 — mentionsByTask is filter-dependent, so toggling must force a rescan.
  • JSON round-trip is safe: existing cache files without include_self deserialize to IncludeSelf: 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-self triggers a full cold rescan. Acknowledged in the PR description and the right trade-off.

LGTM.

@isaacrowntree isaacrowntree merged commit 3dd7534 into triptechtravel:main May 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants