From d85f64bbbdecb14ad691d4ee098757602825f3f8 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 1 Jun 2026 13:57:09 +0000 Subject: [PATCH] fix(site/src/pages/AgentsPage): use biome ignore for useExhaustiveDependencies The useEffect that resets parent mutation state when a new server is opened intentionally elides onOpen from its dependency list to avoid firing on every parent rerender. The previous comment used eslint-style syntax which biome ignores, so the rule still flagged the hook in pre-commit. --- .../pages/AgentsPage/AgentSettingsUserMCPServersPageView.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/site/src/pages/AgentsPage/AgentSettingsUserMCPServersPageView.tsx b/site/src/pages/AgentsPage/AgentSettingsUserMCPServersPageView.tsx index 0f3d52cd96..fb60978f71 100644 --- a/site/src/pages/AgentsPage/AgentSettingsUserMCPServersPageView.tsx +++ b/site/src/pages/AgentsPage/AgentSettingsUserMCPServersPageView.tsx @@ -306,13 +306,11 @@ const ConfigureHeadersDialog: FC = ({ // When a new server is opened, reset the parent mutation state so a // previous server's error banner does not bleed into this session. const openServerId = server?.id ?? null; + // biome-ignore lint/correctness/useExhaustiveDependencies: only fire when the open server identity changes, not on every render of the onOpen callback reference useEffect(() => { if (openServerId !== null) { onOpen?.(); } - // We only want to fire when the open server identity changes, - // not on every render of the onOpen callback reference. - // eslint-disable-next-line react-hooks/exhaustive-deps }, [openServerId]); const hasAnyExisting = requiredKeys.some( (k) => headerHasValues?.[k] === true,