Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
test(desktop): await background chat reconciliation
Alfredo Lopez888527fbf248
diff --git a/desktop-app/ui/src/hooks/domain/__tests__/chatSelectionAcrossRouteChange.test.tsx b/desktop-app/ui/src/hooks/domain/__tests__/chatSelectionAcrossRouteChange.test.tsxindex e8933e49e..39cae0035 100644--- a/desktop-app/ui/src/hooks/domain/__tests__/chatSelectionAcrossRouteChange.test.tsx+++ b/desktop-app/ui/src/hooks/domain/__tests__/chatSelectionAcrossRouteChange.test.tsx@@ -177,12 +177,16 @@ describe('selecting a chat session across a route change', () => {await waitFor(() => expect(result.current.chatMessagesLoading).toBe(false))expect(result.current.activeChatId).toBe('c-old')- expect(clerum.rpc.loadSessionMessages).toHaveBeenCalledWith(- 'agent-x',- 'agent-x',- 'c-old',- undefined,- { limit: 40 }+ // Cached messages can hide the spinner before background reconciliation+ // reaches the RPC. Wait for that observable call independently.+ await waitFor(() =>+ expect(clerum.rpc.loadSessionMessages).toHaveBeenCalledWith(+ 'agent-x',+ 'agent-x',+ 'c-old',+ undefined,+ { limit: 40 }+ ))})