From 288df3a3996e09b402508cb7473645890329a6bf Mon Sep 17 00:00:00 2001 From: Sojan Jose Date: Thu, 12 Jun 2025 02:05:34 -0400 Subject: [PATCH 01/34] fix: Flaky Instagram unsend message test (#11712) - Use direct message object reference instead of re-querying through inbox - Add message.reload after unsend operation to get updated state - Remove unnecessary inbox reload that could cause timing issues - Remove redundant assertions for better test atomicity Co-authored-by: Muhsin Keloth --- spec/jobs/webhooks/instagram_events_job_spec.rb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/spec/jobs/webhooks/instagram_events_job_spec.rb b/spec/jobs/webhooks/instagram_events_job_spec.rb index 23e7f9e5a..dfd9f1aed 100644 --- a/spec/jobs/webhooks/instagram_events_job_spec.rb +++ b/spec/jobs/webhooks/instagram_events_job_spec.rb @@ -234,16 +234,15 @@ describe Webhooks::InstagramEventsJob do account_id: instagram_inbox.account_id ) - instagram_inbox.reload - expect(instagram_inbox.messages.count).to be 1 instagram_webhook.perform_now(message_events[:unsend][:entry]) - expect(instagram_inbox.messages.last.content).to eq 'This message was deleted' - expect(instagram_inbox.messages.last.deleted).to be true - expect(instagram_inbox.messages.last.attachments.count).to be 0 - expect(instagram_inbox.messages.last.reload.deleted).to be true + message.reload + + expect(message.content).to eq 'This message was deleted' + expect(message.deleted).to be true + expect(message.attachments.count).to be 0 end it 'creates incoming message with attachments in the instagram direct inbox' do From f28bb70d67eb09161e9c1f06796fe0a4c30f8e9d Mon Sep 17 00:00:00 2001 From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Date: Thu, 12 Jun 2025 14:38:45 +0530 Subject: [PATCH 02/34] fix: Prevent count flicker on loading more conversations (#11706) --- app/javascript/dashboard/components/ChatList.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/javascript/dashboard/components/ChatList.vue b/app/javascript/dashboard/components/ChatList.vue index de895c76e..b14a62f08 100644 --- a/app/javascript/dashboard/components/ChatList.vue +++ b/app/javascript/dashboard/components/ChatList.vue @@ -109,6 +109,7 @@ const advancedFilterTypes = ref( attributeName: t(`FILTER.ATTRIBUTES.${filter.attributeI18nKey}`), })) ); +const isInitialLoad = ref(false); const currentUser = useMapGetter('getCurrentUser'); const chatLists = useMapGetter('getFilteredConversations'); @@ -376,6 +377,7 @@ function setFiltersFromUISettings() { function emitConversationLoaded() { emit('conversationLoad'); + isInitialLoad.value = false; // [VITE] removing this since the library has changed // nextTick(() => { // // Addressing a known issue in the virtual list library where dynamically added items @@ -420,6 +422,7 @@ function onApplyFilter(payload) { foldersQuery.value = filterQueryGenerator(payload); store.dispatch('conversationPage/reset'); store.dispatch('emptyAllConversations'); + isInitialLoad.value = true; fetchFilteredConversations(payload); } @@ -574,6 +577,7 @@ function resetAndFetchData() { store.dispatch('conversationPage/reset'); store.dispatch('emptyAllConversations'); store.dispatch('clearConversationFilters'); + isInitialLoad.value = true; if (hasActiveFolders.value) { const payload = activeFolder.value.query; fetchSavedFilteredConversations(payload); @@ -854,7 +858,7 @@ watch(conversationFilters, (newVal, oldVal) => { :active-status="activeStatus" :is-on-expanded-layout="isOnExpandedLayout" :conversation-stats="conversationStats" - :is-list-loading="chatListLoading" + :is-list-loading="isInitialLoad" @add-folders="onClickOpenAddFoldersModal" @delete-folders="onClickOpenDeleteFoldersModal" @filters-modal="onToggleAdvanceFiltersModal" From 6baca4059723cae330ad3621d07bbee8cc7fac59 Mon Sep 17 00:00:00 2001 From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Date: Thu, 12 Jun 2025 17:01:41 +0530 Subject: [PATCH 03/34] chore: Display divider only when multiple portals are available (#11709) --- app/views/public/api/v1/portals/_header.html.erb | 14 +++++++------- app/views/public/api/v1/portals/_hero.html.erb | 2 +- .../public/api/v1/portals/_mobile_menu.html.erb | 7 +++++-- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/app/views/public/api/v1/portals/_header.html.erb b/app/views/public/api/v1/portals/_header.html.erb index 694cd240f..ae1162e05 100644 --- a/app/views/public/api/v1/portals/_header.html.erb +++ b/app/views/public/api/v1/portals/_header.html.erb @@ -1,18 +1,18 @@