From 1202bd86634a57927997d2454eb64f84ce027003 Mon Sep 17 00:00:00 2001 From: cliffhall Date: Sat, 22 Aug 2026 23:52:21 -0400 Subject: [PATCH] fix(web): list refreshInitialConfig in both persist callbacks' deps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both `useCallback`s that wrap a persist call in `refreshingPersist` captured `refreshInitialConfig` without listing it. `useInitialConfig`'s `refresh` is not referentially stable — it is a `useCallback` over `load`, whose deps are `[base, authToken, doFetch]` — so once any of those changes, the pagination save and the server removal keep invoking the obsolete closure and the secret-storage footer can go stale. `react-hooks/exhaustive-deps` reported both, but the rule is warn-level and `lint` does not fail on warnings, so `npm run ci` stayed green. These two were the only warnings in the entire web client. Closes #1950 (review round 25) Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01JTHVxSu8AUgHRLvo1ntZ8H Signed-off-by: cliffhall --- clients/web/src/App.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clients/web/src/App.tsx b/clients/web/src/App.tsx index 2a9f1eab..e943a701 100644 --- a/clients/web/src/App.tsx +++ b/clients/web/src/App.tsx @@ -3651,6 +3651,7 @@ function App() { activeServerId, inspectorClient, updateServerSettings, + refreshInitialConfig, connected, loadToolsPage, loadPromptsPage, @@ -3921,6 +3922,7 @@ function App() { fetchRequestLogState, stderrLogState, removeServer, + refreshInitialConfig, ]); // Submit handler for the Add / Edit / Clone modal. Add and Clone both go