Add hide-deleted filter and revamp filter modal#109
Merged
Conversation
Re-apply the NotFoundError handling in GetMessagesRawBatch that was lost during the squash merge of PR #108: messages deleted between history scan and fetch are expected during incremental sync, so log at debug instead of warn. Add TestGetMessagesRawBatch_LogLevels to verify 404s produce debug logs while other errors produce warn logs. Co-Authored-By: Claude Opus 4.6 <[email protected]>
…leted Replace the old radio-button attachment filter modal with a checkbox-style modal supporting two independent toggles: "Only with attachments" and "Hide deleted from source". Both filters are independent (not mutually exclusive). Enter/Space toggles a checkbox; Esc applies and closes. Add HideDeletedFromSource to MessageFilter, AggregateOptions, and StatsOptions with corresponding SQL conditions in both SQLite and DuckDB query engines. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Capture log attributes (message ID) in testLogHandler and assert per-message expectations: msg_404 must produce only debug logs, msg_err must produce only warn logs. This catches regressions where a 404 is logged at both levels. Remove unused staticTokenSource and oauth2 import. Co-Authored-By: Claude Opus 4.6 <[email protected]>
- SQLite SearchFast/SearchFastCount now apply HideDeletedFromSource directly instead of losing it through MergeFilterIntoQuery - Resync drillFilter toggles when closing filter modal during drill-down - Add DuckDB test coverage for HideDeletedFromSource across aggregates, SubAggregate, search, and stats - Add SQLite SearchFast/SearchFastCount test for HideDeletedFromSource Co-Authored-By: Claude Opus 4.6 <[email protected]>
…rch logic - Resync drillFilter toggles when closing filter modal in levelDrillDown (not just levelMessageList), preventing stale SubAggregate filters - Extract executeSearchQuery to eliminate duplicated query execution between Search and SearchFast - Add filterOptionCount constant for cursor bounds - Add TestFilterToggleInDrillDown regression test Co-Authored-By: Claude Opus 4.6 <[email protected]>
Enter and Esc both apply filters and close the modal. Space and x toggle individual checkboxes. This matches the intuitive expectation that Enter confirms the current selection. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Add HideDeleted field to search.Query and carry it through MergeFilterIntoQuery, so deep FTS search (which only receives a search.Query, not a MessageFilter) also excludes deleted messages when the filter is active. - Added search.Query.HideDeleted bool - MergeFilterIntoQuery now sets HideDeleted from filter - buildSearchQueryParts (SQLite) applies the condition - DuckDB fallback Search path applies the condition - Removed duplicate condition appends from SearchFast/SearchFastCount (now flows through the merged query like all other filter fields) - Added TestSearch_HideDeleted covering Search, MergeFilterIntoQuery Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Security Review: No High/Medium Issues FoundClaude's automated security review did not identify any high or medium severity security concerns in this PR. Note: This is an automated review and should not replace human security review, especially for changes involving:
Powered by Claude 4.5 Sonnet |
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
deleted_from_source_at IS NOT NULLfrom aggregates, sub-aggregates, search results, and stats across both SQLite and DuckDB query enginesClose #27, close #99
Filter modal UX
Space/xtoggle individual checkboxesEnter/Escapply current filters and close the modal[Attachments],[Hide Deleted]Query layer changes
HideDeletedFromSource booltoMessageFilter,AggregateOptions, andStatsOptionsdeleted_from_source_at IS NULLcondition in all relevant query paths:optsToFilterConditions,buildFilterJoinsAndConditions,GetTotalStats,SearchFast,SearchFastCountbuildWhereClause,buildFilterConditions,SubAggregate,GetTotalStats,buildSearchConditionsexecuteSearchQueryshared bySearchandSearchFastto prevent driftTUI changes
attachmentFilter boolwithfiltersstruct containingattachmentsOnlyandhideDeletedFromSourcedrillFilteron modal close for both message list and sub-aggregate levelsTest plan
TestHideDeletedFromSourceAggregate— SQLite aggregate + sub-aggregate with hide-deletedTestHideDeletedFromSourceStats— SQLite stats with hide-deletedTestHideDeletedFromSourceSearchFast— SQLite SearchFast/SearchFastCount with hide-deletedTestDuckDBEngine_HideDeletedFromSource— DuckDB aggregate, sub-aggregate, search, count, and statsTestFilterToggleModal— checkbox toggle and apply behaviorTestFilterToggleInMessageList— filter apply in message list contextTestFilterToggleInDrillDown— drillFilter resync on modal close during sub-aggregateTestGetMessagesRawBatch_LogLevels— debug vs warn log levels for batch fetch errorsmake test && make lint)🤖 Generated with Claude Code