diff --git a/app/javascript/dashboard/routes/dashboard/conversation/ConversationView.vue b/app/javascript/dashboard/routes/dashboard/conversation/ConversationView.vue index 48b7ec89f..6b321c55d 100644 --- a/app/javascript/dashboard/routes/dashboard/conversation/ConversationView.vue +++ b/app/javascript/dashboard/routes/dashboard/conversation/ConversationView.vue @@ -87,6 +87,17 @@ export default { this.fetchConversationIfUnavailable(); }, }, + + created() { + // Clear selected state early if no conversation is selected + // This prevents child components from accessing stale data + // and resolves timing issues during navigation + // with conversation view and other screens + if (!this.conversationId) { + this.$store.dispatch('clearSelectedState'); + } + }, + mounted() { this.$store.dispatch('agents/get'); this.initialize();