feat: FTS5 full-text message search#5373
Draft
jamesarich wants to merge 1 commit into
Draft
Conversation
Leverage Room 3.0.0-alpha04's FTS5 support to enable searching message history. Uses external content table backed by Packet entity. Schema changes (migration 38→39): - Add message_text column to Packet entity - Create PacketFts virtual table with FTS5 index on message_text - Content triggers auto-sync FTS index on INSERT/UPDATE/DELETE Search stack: - PacketDao: searchMessages/searchMessagesInConversation queries - DatabaseManager: backfillSearchIndexIfNeeded on DB switch - PacketRepository: searchMessages with FTS query sanitization - MessageViewModel: debounced search (300ms, min 2 chars) - MessageSearchBar: M3 TopAppBar replacement pattern Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
❌ 5 Tests Failed:
View the top 1 failed test(s) by shortest run time
View the full list of 4 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
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.
Adds full-text search over message history using Room's FTS5 support (Room 3.0.0-alpha04).
Schema (migration 38→39)
message_textcolumn added toPacketentityPacketFtsvirtual table (@Fts5(contentEntity = Packet::class)) with auto-sync triggersSearch Stack
searchMessages()/searchMessagesInConversation()with FTS5 MATCHStateFlow<List<Message>>TopAppBarreplacement pattern — search icon in message toolbar swaps to search barM3 Design Decisions
SearchBarcomposable) since this is in-conversation "find in page"Testing