From c2d927a4b70b43e88cee733f98a55bbfbf861b28 Mon Sep 17 00:00:00 2001 From: Aydar Mukhametzyanov Date: Thu, 12 Feb 2026 15:04:28 +0100 Subject: [PATCH] [platform UI][se] IJPL-227258 Reset freezer on list invalidation ..., so the new upcoming results would be sorted appropriately. + added a short throttling in case of all the essential providers are finished. That helps to avoid blinking when essential providers don't have results, but non-essential Text and Actions generate same results in consequent search requests. GitOrigin-RevId: cc27304a979d93285e098007c0c28aeee4ed6121 --- platform/searchEverywhere/frontend/src/ui/SeResultListModel.kt | 1 + platform/searchEverywhere/frontend/src/vm/SeTabVm.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/searchEverywhere/frontend/src/ui/SeResultListModel.kt b/platform/searchEverywhere/frontend/src/ui/SeResultListModel.kt index 45faa402c830..df42df6272c4 100644 --- a/platform/searchEverywhere/frontend/src/ui/SeResultListModel.kt +++ b/platform/searchEverywhere/frontend/src/ui/SeResultListModel.kt @@ -46,6 +46,7 @@ class SeResultListModel(private val searchStatePublisher: SeSearchStatePublisher SeLog.log(SeLog.THROTTLING) { "Will invalidate result list model" } _isValidState.value = false isValidAndHasOnlySemantic = false + freezer.reset() } fun removeLoadingItem() { diff --git a/platform/searchEverywhere/frontend/src/vm/SeTabVm.kt b/platform/searchEverywhere/frontend/src/vm/SeTabVm.kt index e2713c464e96..9e59de4bedd0 100644 --- a/platform/searchEverywhere/frontend/src/vm/SeTabVm.kt +++ b/platform/searchEverywhere/frontend/src/vm/SeTabVm.kt @@ -363,7 +363,7 @@ private fun Flow.throttleUntilEssentialsArrive(essentialProviderI } } - return@throttledWithAccumulation if (essentialProvidersCounts.isEmpty()) 0 + return@throttledWithAccumulation if (essentialProvidersCounts.isEmpty()) ESSENTIALS_THROTTLE_DELAY else if (essentialProvidersCounts.values.all { it >= ESSENTIALS_ENOUGH_COUNT }) 0 else if (essentialProvidersCounts.values.all { it > 0 }) ESSENTIALS_THROTTLE_DELAY else null