From f43e582a78643cc5e9d79ff592cbdd7cc0df31ed Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 18 Sep 2025 15:08:24 -0500 Subject: [PATCH] Make react-hooks/exhaustive-deps required --- eslint.config.js | 1 + src/components/Shakespeare/ChatPane.tsx | 12 ------------ 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index a91a13c6..1e1fc7fd 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -27,6 +27,7 @@ export default tseslint.config( }, rules: { ...reactHooks.configs.recommended.rules, + "react-hooks/exhaustive-deps": "error", "react-refresh/only-export-components": [ "warn", { allowConstantExport: true }, diff --git a/src/components/Shakespeare/ChatPane.tsx b/src/components/Shakespeare/ChatPane.tsx index 8ea2ad61..5ddeaf12 100644 --- a/src/components/Shakespeare/ChatPane.tsx +++ b/src/components/Shakespeare/ChatPane.tsx @@ -295,18 +295,6 @@ export const ChatPane = forwardRef(({ } }, [projectId, scrolledProjects]); - // Also scroll on initial mount if we have a projectId - useEffect(() => { - if (projectId && !scrolledProjects.has(projectId)) { - const timer = setTimeout(() => { - scrollToBottom(); - scrolledProjects.add(projectId); - }, 100); - - return () => clearTimeout(timer); - } - }, []); // Empty dependency array = runs on mount - const handleFileSelect = (file: File) => { setAttachedFiles(prev => [...prev, file]); };