6.3 KiB
6.3 KiB
Android Changelog
2026-03-08
Step 1 - Build and app wiring
- Added Android project plugin configuration for Hilt and Kotlin serialization.
- Added dependency repositories and explicit app module include in settings.
- Added app dependencies for Retrofit/OkHttp, DataStore, coroutines, Hilt, and unit testing.
- Enabled INTERNET permission and registered MessengerApplication in manifest.
- Added MessengerApplication with HiltAndroidApp.
Step 2 - Network/data core + DI
- Fixed DTO/Auth API serialization annotations and endpoint declarations for
/api/v1/auth/login,/api/v1/auth/refresh,/api/v1/auth/me. - Implemented DataStore-based token persistence with a corrected
getTokens()read path. - Added auth network stack: bearer interceptor, 401 authenticator with refresh flow and retry guard.
- Added clean-layer contracts and implementations:
domain/common,domain/auth,data/auth/repository. - Wired dependencies with Hilt modules for DataStore, OkHttp/Retrofit, and repository bindings.
Step 3 - Minimal auth UI and navigation
- Replaced Phase 0 placeholder UI with Compose auth flow (
AuthViewModel+ login screen). - Added loading/error states for login and startup session restore.
- Added navigation graph:
AuthGraph (login)to placeholderChatsscreen after successful auth. - Implemented automatic session restore on app start using stored tokens.
Step 4 - Unit tests
- Added
DataStoreTokenRepositoryTestfor token save/read and clear behavior. - Added
NetworkAuthRepositoryTestfor login success path and 401 ->InvalidCredentialserror mapping.
Step 5 - Chat Room models and persistence core
- Added domain chat model (
ChatItem) for chat list rendering concerns. - Added Room entities:
chats,users_shortwith sort-friendly indices. - Added
ChatDaowithobserveChats(),upsertChats(), and transactionalclearAndReplaceChats(). - Added
MessengerDatabaseand Hilt database wiring (DatabaseModule).
Step 6 - Chat API and repository sync
- Added chat REST API client for
/api/v1/chatsand/api/v1/chats/{chat_id}. - Added chat DTOs and remote/local mappers (
ChatReadDto -> ChatEntity/UserShortEntity -> ChatItem). - Implemented
NetworkChatRepositorywith cache-first flow strategy (Room first, then server sync). - Added chat domain contracts/use-cases (
ChatRepository, observe/refresh use-cases). - Wired chat API/repository via Hilt modules.
Step 7 - Realtime manager and chat list updates
- Added a unified realtime manager abstraction and WebSocket implementation for
/api/v1/realtime/ws?token=.... - Implemented auto-reconnect with exponential backoff and max cap.
- Added realtime event parser for
receive_message,message_updated,message_deleted,chat_updated,chat_deleted,user_online,user_offline. - Added use-case level realtime event handling that updates Room and triggers repository refreshes when needed.
- Wired realtime manager into DI.
Step 8 - Chat list UI and navigation
- Added Chat List screen with tabs (
All/Archived), local search filter, pull-to-refresh, and state handling (loading/empty/error). - Added chat row rendering for unread badge, mention badge (
@), pinned/muted marks, and message preview by media type. - Added private chat presence display (
online/last seen recentlyfallback). - Connected Chat List to ViewModel/use-cases with no business logic inside composables.
- Added chat click navigation to placeholder
ChatScreen(chatId).
Step 9 - Tests and checklist updates
- Added unit test for chat cache-first sync strategy (
NetworkChatRepositoryTest). - Added unit test for realtime event parsing (
RealtimeEventParserTest). - Added DAO test (
ChatDaoTest) using in-memory Room + Robolectric. - Updated Android checklist status in
docs/android-checklist.md.
Step 10 - Build stabilization fixes
- Switched Android API base URL to
https://chat.daemonlord.ru/. - Added cleartext traffic flag in manifest for local/dev compatibility.
- Fixed Hilt dependency cycle by separating refresh
AuthApiServicewith a dedicated qualifier. - Added
CoroutineDispatcherDI provider and qualifier for repositories. - Fixed Material3 experimental API opt-in and removed deprecated
StateFlow.distinctUntilChanged()usage.
Step 11 - Sprint A / 1) Message Room + models
- Added message domain model (
MessageItem) for chat screen rendering. - Added Room entities
messagesandmessage_attachmentswith chat-history indexes. - Added
MessageDaowith observe/pagination/upsert/delete APIs. - Updated
MessengerDatabaseschema to include message tables and DAO. - Added Hilt DI provider for
MessageDao.
Step 12 - Sprint A / 2) Message API + repository
- Added message REST API client for history/send/edit/delete endpoints.
- Added message DTOs and mappers (
MessageReadDto -> MessageEntity -> MessageItem). - Added
MessageRepositorycontracts/use-cases for observe/sync/pagination/send/edit/delete. - Implemented
NetworkMessageRepositorywith cache-first observation and optimistic text send. - Wired message API and repository into Hilt modules.
Step 13 - Sprint A / 3) Message realtime integration
- Extended realtime event model/parser with message-focused events (
message_delivered,message_read,typing_start,typing_stop) and richer message payload mapping. - Updated unified realtime handler to write
receive_message,message_updated,message_deletedintomessagesRoom state. - Added delivery/read status updates in Room for message status events.
- Kept chat list sync updates in the same manager/use-case pipeline for consistency.
Step 14 - Sprint A / 4) Message UI core
- Replaced chat placeholder with a real message screen route + ViewModel.
- Added message list rendering with Telegram-like bubble alignment and status hints.
- Added input composer with send flow, reply/edit modes, and inline action cancellation.
- Added long-press actions (
reply,edit,delete) for baseline message operations. - Added manual "load older" pagination trigger and chat back navigation integration.
Step 15 - Sprint A / 5) Message tests and docs
- Added unit tests for
NetworkMessageRepositorysync/send flows. - Added DAO test for message scoped replace behavior in Room.
- Expanded realtime parser tests with rich
receive_messagemapping coverage. - Updated
docs/android-checklist.mdfor completed message-core items.