feat(client): direct message UI on Android (beta blocker 4/5)#597
Merged
Conversation
Add a direct-message conversation list to the Android client. The home screen gains an envelope action that opens a list of DMs showing each conversation's avatar, title, last-message preview, and unread badge. Tapping a conversation opens it through the existing text channel screen (a DM is just a channel, so its messages flow through the message API by channel id). New pieces: - DmConversation/DmParticipant/LastMessagePreview models matching the flattened GET /api/dm response (SnakeCase JSON, unknown channel fields ignored) - DmApi (getDms + markAsRead) + DmModule @BINDS, following the MessageApi pattern - DmRepository with pure, unit-tested helpers for conversation title and avatar resolution (1:1 vs group) and unread clearing - DmListScreen + DmListViewModel; opening a DM marks it read - "dms" nav route + envelope entry point in the home top bar Co-Authored-By: Claude Opus 4.8 <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
Android beta blocker 4/5: direct messages are now reachable from the Android client.
The home screen gains an envelope action (
Emailicon, core material-icons set) that opens a conversation list showing each DM's avatar, title, last-message preview, and unread badge. Tapping a conversation opens it through the existingTextChannelScreen— a DM is a channel, so its messages already flow through the message API by channel id.What's new
DmConversation/DmParticipant/LastMessagePreviewmatching the flattenedGET /api/dmresponse.KaikuJsonuses the SnakeCase naming strategy +ignoreUnknownKeys, so the unmodelled channel fields (guild_id,position, …) parse away cleanly.DmApi(getDms+markAsRead) andDmModule@Binds, following the existingMessageApi/ChatModulepattern.DmRepository(@Singleton) holding the conversation list, with pure, unit-tested companion helpers:conversationTitle— other participant for 1:1, group name (or joined names) for group DMsconversationAvatarUrl— other participant's avatar for 1:1, group icon otherwiseclearUnreadDmListScreen+DmListViewModel— loads on open, retry on error, empty state; opening a DM marks it read (optimistic local clear + server call).composable("dms")route; entry point threaded asonNavigateToDmsthroughHomeScreen(defaulted param, so no other caller breaks).Title/avatar resolution
,Tests
DmConversationTestcovers all title/avatar branches (1:1, group named, group unnamed, self-only fallback) and unread clearing — 9 cases.Notes / known limitations (acceptable for beta)
MessageItemavatar convention.🤖 Generated with Claude Code