Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

fix: sync profile portal branch with latest dev

Josuéd3f6fa577612
diff --cc desktop-app/ui/src/hooks/domain/__tests__/useAgentChatController.test.tsx
index 5eb002df5,638a27938..c817cbd01
--- a/desktop-app/ui/src/hooks/domain/__tests__/useAgentChatController.test.tsx
+++ b/desktop-app/ui/src/hooks/domain/__tests__/useAgentChatController.test.tsx
@@@ -42,19 -45,9 +45,25 @@@ async function settleMount()
await waitFor(() => expect(clerum.chat.getIndex).toHaveBeenCalled())
}
+// Sending now persists the optimistic turn through the filesystem-backed
+// ChatStore before subscribing. Under the full parallel Desktop suite, that
+// disk work can exceed Testing Library's one-second default timeout.
+const CHAT_STORE_IO_TIMEOUT_MS = 10_000
+
+async function waitForProgressHandler(taskId: string) {
- await waitFor(() => expect(clerum.hasProgressHandler(taskId)).toBe(true), {
- timeout: CHAT_STORE_IO_TIMEOUT_MS,
- })
++ await waitFor(
++ () => expect(clerum.hasProgressHandler(taskId)).toBe(true),
++ CHAT_STORE_IO_TIMEOUT_MS
++ )
+}
+
+function waitForWithFakeTimers<T>(assertion: () => T | Promise<T>) {
+ return vi.waitFor(assertion, { timeout: CHAT_STORE_IO_TIMEOUT_MS })
++}
++
+ /** Real ChatStore-backed effects can exceed Testing Library's 1s default on CI runners. */
-function waitFor<T>(callback: () => T | Promise<T>) {
- return rtlWaitFor(callback, { timeout: ASYNC_WAIT_TIMEOUT_MS })
++function waitFor<T>(callback: () => T | Promise<T>, timeout = ASYNC_WAIT_TIMEOUT_MS) {
++ return rtlWaitFor(callback, { timeout })
}
function deferred<T>() {