From fd44bbf606c2752bddf4a94809e69230ccf800c2 Mon Sep 17 00:00:00 2001 From: Chris Arderne Date: Wed, 19 Aug 2026 17:39:16 +0100 Subject: [PATCH] chore(webapp): scope memo dependency diagnostics --- .../app/components/dashboard-agent/DashboardAgentPanel.tsx | 2 +- apps/webapp/app/components/navigation/SideMenu.tsx | 4 ++++ .../route.tsx | 2 ++ apps/webapp/app/routes/resources.metric.tsx | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/webapp/app/components/dashboard-agent/DashboardAgentPanel.tsx b/apps/webapp/app/components/dashboard-agent/DashboardAgentPanel.tsx index a8e6c32643f..93a9064b4ce 100644 --- a/apps/webapp/app/components/dashboard-agent/DashboardAgentPanel.tsx +++ b/apps/webapp/app/components/dashboard-agent/DashboardAgentPanel.tsx @@ -194,7 +194,7 @@ export function DashboardAgentPanel({ toast.error("We couldn't load your previous chats. Try again in a moment."); } }), - [actionPath, organization.id, toast] + [actionPath, organization.id, toast, justRead, visibleChatId] ); // Bumped on each open so a slower earlier open can't overwrite a newer one. diff --git a/apps/webapp/app/components/navigation/SideMenu.tsx b/apps/webapp/app/components/navigation/SideMenu.tsx index cce51cf1665..640d0c6ebe3 100644 --- a/apps/webapp/app/components/navigation/SideMenu.tsx +++ b/apps/webapp/app/components/navigation/SideMenu.tsx @@ -589,6 +589,7 @@ export function SideMenu({ }, []); // Animate width + progress over COLLAPSE_ANIM_MS (toggle button, ⌘B shortcut, release-snap). + /* oxlint-disable react/react-compiler -- The animation step is local to each callback invocation. */ const animateTo = useCallback( (targetWidth: number, targetProgress: number) => { if (rafRef.current !== null) cancelAnimationFrame(rafRef.current); @@ -619,6 +620,7 @@ export function SideMenu({ }, [writeVisual] ); + /* oxlint-enable react/react-compiler */ // Collapse/expand to a resting state and remember it. const applyCollapsed = useCallback( @@ -637,6 +639,7 @@ export function SideMenu({ // Drag runs on window-level listeners so releasing anywhere finalizes it. (Pointer capture alone // was unreliable: if the browser drops it mid-drag, the release never fires and the menu strands.) + /* oxlint-disable react/react-compiler -- Drag handlers share invocation-local state and listeners. */ const onHandlePointerDown = useCallback( (e: ReactPointerEvent) => { if (e.button !== 0) return; @@ -746,6 +749,7 @@ export function SideMenu({ }, [animateTo, applyCollapsed, persistSideMenuPreferences, writeVisual] ); + /* oxlint-enable react/react-compiler */ // Keep the drag handlers' collapsed mirror in sync; tear down any in-flight animation/drag on unmount. useEffect(() => { diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.playground.$agentParam/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.playground.$agentParam/route.tsx index 4f5af42fbc4..df3464b2f81 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.playground.$agentParam/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.playground.$agentParam/route.tsx @@ -393,6 +393,7 @@ function PlaygroundChat() { const session = transport.getSession(chatId); + /* oxlint-disable react/react-compiler -- The transport and chat ID are stable for this component's lifetime. */ const handlePreload = useCallback(async () => { setPreloading(true); try { @@ -403,6 +404,7 @@ function PlaygroundChat() { setPreloading(false); } }, [transport, chatId]); + /* oxlint-enable react/react-compiler */ const handleNewConversation = useCallback(() => { // Navigate without ?conversation= so the loader returns activeConversation=null diff --git a/apps/webapp/app/routes/resources.metric.tsx b/apps/webapp/app/routes/resources.metric.tsx index 7fcc1a87205..78ecf58f1ec 100644 --- a/apps/webapp/app/routes/resources.metric.tsx +++ b/apps/webapp/app/routes/resources.metric.tsx @@ -219,6 +219,7 @@ export function MetricWidget({ }, }); + /* oxlint-disable react/react-compiler -- These ref objects are stable callback inputs. */ const submit = useCallback(() => { if (!isVisibleRef.current) { isDirtyRef.current = true; @@ -263,6 +264,7 @@ export function MetricWidget({ } }); }, [isVisibleRef]); + /* oxlint-enable react/react-compiler */ submitRef.current = submit; // Clean up on unmount