diff --git a/app/src/main/java/com/m57/hermescontrol/ui/chat/ChatViewModel.kt b/app/src/main/java/com/m57/hermescontrol/ui/chat/ChatViewModel.kt index 46732d7d..5b896d26 100644 --- a/app/src/main/java/com/m57/hermescontrol/ui/chat/ChatViewModel.kt +++ b/app/src/main/java/com/m57/hermescontrol/ui/chat/ChatViewModel.kt @@ -325,15 +325,17 @@ class ChatViewModel( (resultMap?.get("session_id") as? String) ?: _uiState.value.currentSessionId + // B8 (Jun 20 2026, kanban t_session_resume): do NOT reload + // cached messages here — switchSession() already did so before + // the WS round-trip. Calling loadCachedMessages() here would + // overwrite any message the user sent between switchSession() and + // the server ack, making the chat appear to go blank. _uiState.update { it.copy( isLoading = false, currentSessionId = sessionId, ) } - if (sessionId != null) { - loadCachedMessages(sessionId) - } addSystemMessage("Session resumed") }