Skip to content

fix(scope): show tracked user items in default involves_me scope#61

Merged
wgordon17 merged 7 commits intogordon-code:mainfrom
wgordon17:fix/scope-filter-tracked-users
Apr 9, 2026
Merged

fix(scope): show tracked user items in default involves_me scope#61
wgordon17 merged 7 commits intogordon-code:mainfrom
wgordon17:fix/scope-filter-tracked-users

Conversation

@wgordon17
Copy link
Copy Markdown
Member

Summary

  • Fixes scope filter hiding PRs/issues from tracked bot users in default "Involves me" scope
  • The root cause was isUserInvolved() checking if the main user's login was in surfacedBy, but bot-only items had surfacedBy containing only the tracked user's login
  • Changes tier 1 from surfacedBy.includes(login) to return true when any surfacedBy entries exist, since surfacedBy is exclusively populated by involves: searches for the main user or tracked users

The scope filter's isUserInvolved() tier 1 checked whether the main
user's login was in surfacedBy, hiding items surfaced only by tracked
users. Since surfacedBy is exclusively populated by involves: searches
(main user or tracked users), any surfacedBy presence means someone
the user chose to track is involved — always relevant.

Changes tier 1 from surfacedBy.includes(login) to surfacedBy.length > 0.
Monitored repo items (no surfacedBy) still use field-based fallback.

Updates 4 tests that modeled tracked user items as community items
by using surfacedBy with a non-main-user login — an unrealistic fixture
since surfacedBy is only set for tracked user search results.
@wgordon17 wgordon17 merged commit cab3d73 into gordon-code:main Apr 9, 2026
1 check 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.

1 participant