From 60cf698a4397a52306c3f4e5956f98f55ccc3335 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 2 Jun 2026 16:36:40 +0000 Subject: [PATCH] fix: restore missing settings variable in ChatView The settings variable was accidentally removed during settings optimization, causing a ReferenceError at runtime in the onProviderModelSelect callback. This restores the variable to fix the react-scan-harness page. Co-authored-by: Julius Marminge --- apps/web/src/components/ChatView.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index 7fc7669fe6..d089d9d020 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -792,12 +792,11 @@ export default function ChatView(props: ChatViewProps) { const activeThreadLastVisitedAt = useUiStateStore((store) => routeKind === "server" ? store.threadLastVisitedAtById[routeThreadKey] : undefined, ); - const settings = useSettings(); + const timestampFormat = useSettings((settings) => settings.timestampFormat); + const autoOpenPlanSidebar = useSettings((settings) => settings.autoOpenPlanSidebar); const setStickyComposerModelSelection = useComposerDraftStore( (store) => store.setStickyModelSelection, ); - const timestampFormat = settings.timestampFormat; - const autoOpenPlanSidebar = settings.autoOpenPlanSidebar; const navigate = useNavigate(); const rawSearch = useSearch({ strict: false, @@ -833,6 +832,7 @@ export default function ChatView(props: ChatViewProps) { const setLogicalProjectDraftThreadId = useComposerDraftStore( (store) => store.setLogicalProjectDraftThreadId, ); + const settings = useSettings(); const draftThread = useComposerDraftStore((store) => routeKind === "server" ? store.getDraftSessionByRef(routeThreadRef) @@ -3870,7 +3870,6 @@ export default function ChatView(props: ChatViewProps) { activeThreadModelSelection={activeThread?.modelSelection} activeThreadActivities={activeThread?.activities} resolvedTheme={resolvedTheme} - settings={settings} keybindings={keybindings} terminalOpen={Boolean(terminalUiState.terminalOpen)} gitCwd={gitCwd}