@@ -341,8 +341,10 @@ class ChatViewModel(
341341
342342 override fun onCleared() {
343343 super.onCleared()
344− // Flush any pending debounced draft so it survives navigation. Use a synchronous
345− // commit instead of runBlocking so the main thread isn't held hostage by disk I/O.
344+ // Flush any pending debounced draft so it survives navigation. Uses an
345+ // asynchronous apply() (not a synchronous commit) so the main thread isn't
346+ // blocked on disk I/O — Android's SharedPreferences framework guarantees
347+ // pending apply() writes are flushed before the process exits.
346348 val pending = _draft.value
347349 if (pending.isNotEmpty()) {
348350 container.draftStore.flushDraft(sessionId, pending)