Skip to content

Conversation

@mdecourcy
Copy link
Collaborator

  • Word-based message filtering with quarantine approach (stored but hidden)
  • Whole-word matching by default, optional regex support via regex: prefix
  • Case-insensitive matching
  • Global filter with per-contact disable option
  • No notifications for filtered messages
  • Toggle in chat overflow menu to reveal filtered messages
  • Filter settings accessible via App Settings > Message Filter

draft until I load test

@github-actions github-actions bot added the enhancement New feature or request label Jan 16, 2026
@mdecourcy mdecourcy changed the title feat: message filter feat: word-based message filtering with quarantine approach (stored but hidden) Jan 16, 2026
@codecov
Copy link

codecov bot commented Jan 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (fe9c8da) to head (043cba8).

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #4241   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files          3       3           
  Lines         23      23           
  Branches       7       7           
=====================================
  Misses        23      23           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Add FilterPrefs interface for managing message filter preferences:
- filterEnabled: Boolean to enable/disable message filtering
- filterWords: Set<String> for words to filter on

Includes FilterPrefsImpl with SharedPreferences-backed storage using
existing PrefDelegate and StringSetPrefDelegate patterns.

Test coverage added for default values and preference updates.
- Add FilterSettings route to core navigation Routes.kt
- Add FilterSettingsScreen composable to SettingsNavigation.kt
- Add Message Filter ListItem to SettingsScreen for navigation
- Bump database to v32/v33 schemas with AutoMigration
- Add _showFiltered state flow with toggle function
- Add getFilteredCount() function to get filtered message count
- Update pagedMessagesForContactKey to combine contactKey with showFiltered
- Pass includeFiltered flag to packetRepository.getMessagesFromPaged
Wire up the filtered count and show/hide toggle from MessageViewModel
to the MessageListPaged component. When there are filtered messages,
a badge showing "X filtered" appears at the top with a visibility
toggle button.
- Add filtered: Boolean property to Message data class
- Pass filtered flag from PacketEntity.toMessage() to Message
- Display "Filtered" label badge in message bubble when filtered
- Apply dimmed alpha (0.5) to filtered messages for visual distinction
- Add filtered message example to MessageItem preview
Add Hilt-based integration test verifying FilterPrefs and
MessageFilterService work together correctly. Also add missing
androidTest dependencies (ext.junit, coroutines.test).
Required for test compilation after interface changes.
Prevents the "Filtered" label from running into the RSSI value.
Adds a menu item in the chat overflow menu to enable/disable message
filtering for the current contact. When disabled, messages from this
contact will not be filtered regardless of filter words.
When filtering is disabled for a specific contact:
- Include filtered messages in the query (don't hide them)
- Hide the filtered count badge and toggle button
- Remove extra top padding from message list
Previously isFiltered was added to isSilent, which only muted the
notification sound but still showed it. Now filtered messages skip
the notification call entirely.
…ts list

- Filtered messages are now marked as read when saved, so they don't
  contribute to unread counts
- Contacts list queries now exclude filtered messages, showing the
  last non-filtered message as the preview
Remove the regex toggle switch. Users now type regex:pattern directly
in the input field for regex patterns. Simpler UI, power-user friendly.
- Remove the floating overlay that covered messages
- Add "Show X filtered" / "Hide filtered" menu item in overflow menu
- Only show when filteredCount > 0 and filtering is enabled for contact
- Clean up unused imports and handlers
- Add missing filter strings to strings.xml
- Update FilterSettingsScreen.kt to use stringResource()
- Update Message.kt OverFlowMenu to use stringResource()
- Update MessageItem.kt to use stringResource()

All filter-related UI strings are now translation-ready for Crowdin.
Add tests for:
- Filtered messages excluded from regular queries
- getFilteredCount returns correct count
- Contact filtering disabled persistence
@mdecourcy mdecourcy force-pushed the feat/message-filter branch from 98d8e58 to d7f0b0b Compare January 16, 2026 17:51
… tests

- Add assertFalse import to PacketDaoTest.kt
- Add explicit Unit return type to test functions to fix runBlocking
  type inference issue
- Update schema to match rebased main changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant