Add per-account feed filter preferences#13
Open
blindndangerous wants to merge 9 commits intomasonasons:masterfrom
Open
Add per-account feed filter preferences#13blindndangerous wants to merge 9 commits intomasonasons:masterfrom
blindndangerous wants to merge 9 commits intomasonasons:masterfrom
Conversation
- Add models/feed_filter.py: pure-Python whitelist filter logic (load/save visible types, filter_feed, is_event_visible) - Add tests/test_feed_filters.py: 51 tests covering all edge cases, corrupt data, roundtrips, and account isolation - GUI/main.py: apply filter in _render_feed_list, cache to _visible_feed, fix get_selected_feed_event index mismatch - GUI/options.py: restructure with wx.Notebook (General + Feed Filters tabs), 19 grouped checkboxes, Select/Deselect All, Enter activates OK, Apply no longer shows confirmation dialog - build.py: add models.feed_filter hidden import, --collect-all wx Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- models/feed_filter.py: add load/save_muted_repos and MUTED_REPOS_KEY; update filter_feed to apply muted repo blacklist before type whitelist - tests/test_feed_filters.py: 31 new tests covering load/save/corrupt data, filter interaction, roundtrips, and account isolation (93 total) - GUI/main.py: pass muted_repos to filter_feed in _render_feed_list - GUI/options.py: add Muted Repositories section to Feed Filters tab with ListBox, owner/repo text entry, Add/Remove buttons and validation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
EVT_TEXT_ENTER requires the TE_PROCESS_ENTER style flag on the TextCtrl. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- models/feed_filter.py: add load/save_user_filters and USER_FILTERS_KEY; update filter_feed with user override layer (muted repo > user rule > global type filter) - tests/test_feed_filters.py: 34 new tests covering load/save/corrupt data, all three filter layers interacting, roundtrips, and account isolation (127 total) - GUI/main.py: pass user_filters to filter_feed in _render_feed_list - GUI/options.py: add User Filters section to Feed Filters tab with ListBox, Add/Edit/Remove buttons; add UserFilterDialog sub-dialog with grouped type checkboxes and mute-entirely shortcut Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Config.__setitem__ wraps any stored dict value in a Config (MutableMapping) subclass. load_user_filters was checking isinstance(raw, dict) which always failed for stored user filters, causing it to return None on every load. Fix: use isinstance(raw, Mapping) from collections.abc to accept both plain dicts and Config-wrapped mappings. Add regression test using a FakeConfig that mimics the same MutableMapping-not-dict pattern. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- UserFilterDialog: remove read-only on username field so it can be edited - Normalize usernames and repo names to lowercase on add/save - Disable Edit and Remove buttons for user filters until an item is selected - Disable Remove button for muted repos until an item is selected - Add descriptive label above muted repo entry field to clarify its purpose - Re-disable Edit/Remove after deleting an entry Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Usernames and repo names are stored lowercase, but GitHub API returns actor logins and repo names in their original case. filter_feed was doing case-sensitive lookups so user filters and muted repos never matched. Fix: lowercase e.actor.login and e.repo.name before lookup. Add 3 regression tests covering mixed-case actor and repo scenarios. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previously all 19 types were checked for new users, so adding a user without changing anything had no effect on the feed. Changed default to all-unchecked so adding a user immediately hides all their events unless specific types are explicitly selected. Added clarifying hint text to the dialog. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Event types with sub-actions (PullRequestEvent, IssuesEvent, etc.) now filter at the individual action level using "Type:action" keys instead of a single checkbox per type. Merged PRs use a synthetic "merged" key distinct from "closed". PullRequestReviewEvent uses review.state (approved/changes_requested/commented) rather than the always-"submitted" payload action. CreateEvent/DeleteEvent use ref_type (branch/tag/repository). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
Ctrl+,) so each GitHub account can independently control which events appear in their activity feedowner/repostrings (blacklist)PullRequestEvent:mergedseparate fromPullRequestEvent:closed)mergedaction distinct fromclosedPullRequestReviewEventfilters by review state (approved/changes_requested/commented), not the always-submittedpayload actionCreateEvent/DeleteEventfilter by ref type (branch/tag/repository)account{N}/config.json; new accounts default to showing everythingTest plan
tests/test_feed_filters.py— all pass (pytest tests/test_feed_filters.py)Ctrl+,) → confirm two tabs: General and Feed FiltersPullRequestEvent > Merged→ Apply → merged PRs disappear from feed; reopen Options → still uncheckedfeed_visible_event_types,feed_muted_repos,feed_user_filterskeys🤖 Generated with Claude Code
Co-Authored-By: Claude Sonnet 4.6 <claude[bot]@users.noreply.github.com>
Human Testing Verification: blindndangerous