2.4 KiB
2.4 KiB
feature:conversations
Screen
ConversationListScreen -- the drawer content showing all conversations. Sealed interface: ConversationsRoute : NavKey with routes Conversations and ArchivedConversations (both @Serializable data objects).
Pagination
- Cursor-based via
ConversationRepository.loadNextPage(cursor, tags) nextCursor: String?in UI state; null = no more pagesloadMore()called when LazyColumn nears the end- Pull-to-refresh via
refresh()which resets to first page
Date Grouping
DateGroupHeaderrenders section labels: Today, Yesterday, Previous 7 Days, Previous 30 Days, month-year- Conversations are flattened into a sealed
ConversationListItem(DateHeader | ConvoItem)
Search
ConversationSearchBarwith 500ms debounce (via coroutine delay)onSearchQueryChanged()cancels previous search job, waits 500ms, callsSearchRepository.search()- When search is active, normal pagination is disabled (
hasMore = false) - Clear search restores normal conversation list
Tags
TagFilterBardisplaysFilterChipper tag (multi-select toggle)TagPickerfor assigning tags to a conversation- Tags observed via
TagRepository.observeTags()(Room-backed Flow);SAVED_TAGandcount == 0tags are filtered out in the ViewModel toggleTag()/clearTagFilter()reload conversations with new filter
CRUD Actions (via ConversationActions component)
| Action | API | Notes |
|---|---|---|
| Rename | POST /api/convos/update |
Inline rename, max 100 chars |
| Archive | POST /api/convos/archive |
{ conversationId, isArchived: true } |
| Delete | DELETE /api/convos |
Confirmation dialog required |
| Duplicate | POST /api/convos/duplicate |
Navigates to new conversation |
| Fork | POST /api/convos/fork |
From message context menu in chat, not here |
| Share | POST /api/share |
Only if sharedLinksEnabled in server config |
Export / Import
ConversationExportersupportsExportFormat.JSONandExportFormat.MARKDOWN- Export is client-side: fetches messages, serializes locally, emits
ExportReadyevent ExportFormatPickercomponent for format selectionConversationImporterparses JSON (LibreChat/ChatGPT format) viaPOST /api/convos/import- File I/O uses SAF (Storage Access Framework)
Events
ConversationListEvent sealed interface for one-shot UI events: ShareLinkCopied, NavigateToConversation, ShowError, ExportReady, ImportSuccess