From 239520f912088459b97c62e3d4ae9b5ab89e059f Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Wed, 25 Mar 2026 17:37:53 +0200 Subject: [PATCH] fix(site): disable refetchInterval in storybook QueryClient (#23585) HealthLayout sets refetchInterval: 30_000 on its health query. In storybook tests, the seeded cache data prevents the initial fetch, but interval polling still fires after 30s, hitting the Vite proxy with no backend. This caused test-storybook to hang indefinitely in environments without a running coderd. Set refetchInterval: false in the storybook QueryClient defaults alongside the existing staleTime: Infinity and retry: false. --- site/.storybook/preview.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/site/.storybook/preview.tsx b/site/.storybook/preview.tsx index 3604263060..899e05b1e5 100644 --- a/site/.storybook/preview.tsx +++ b/site/.storybook/preview.tsx @@ -66,6 +66,7 @@ const withQuery: Decorator = (Story, { parameters }) => { defaultOptions: { queries: { staleTime: Number.POSITIVE_INFINITY, + refetchInterval: false, retry: false, }, },