perf: optimize startup, database, and ui rendering (#405)

* perf: optimize startup, database, and ui rendering

* fix(#405): address code review feedback

* test: wait for async prefs initialization to prevent coroutine leaks

* test: stub mockViewModel.streamingState in ChatScreenTest to prevent ClassCastException on Android
This commit is contained in:
M57
2026-06-27 01:38:44 +03:00
committed by GitHub
parent c0ebc8ec64
commit 8f14aca647
14 changed files with 435 additions and 169 deletions
@@ -54,6 +54,7 @@ class ChatScreenTest {
)
val mockViewModel = mockk<ChatViewModel>(relaxed = true)
every { mockViewModel.uiState } returns MutableStateFlow(uiState).asStateFlow()
every { mockViewModel.streamingState } returns MutableStateFlow(StreamingState()).asStateFlow()
composeTestRule.setContent {
ChatScreen(