From f7132d0dbb308d702d275405bfb867e0c60d5543 Mon Sep 17 00:00:00 2001 From: Olyno Date: Fri, 24 Oct 2025 22:59:57 +0200 Subject: [PATCH] fix: unaligned settings (#1618) # Description This is a small fix to make the settings aligned with the sidebar. It closes #1375 --- ## Summary by cubic Aligned the Settings page with the sidebar. The page now sets the active section to "general-settings" on mount, so the content matches the selected sidebar on first load. --- src/pages/settings.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/pages/settings.tsx b/src/pages/settings.tsx index 90ce383..50a9f37 100644 --- a/src/pages/settings.tsx +++ b/src/pages/settings.tsx @@ -1,4 +1,4 @@ -import { useState } from "react"; +import { useEffect, useState } from "react"; import { useTheme } from "../contexts/ThemeContext"; import { ProviderSettingsGrid } from "@/components/ProviderSettings"; import ConfirmationDialog from "@/components/ConfirmationDialog"; @@ -26,6 +26,8 @@ import { NeonIntegration } from "@/components/NeonIntegration"; import { RuntimeModeSelector } from "@/components/RuntimeModeSelector"; import { NodePathSelector } from "@/components/NodePathSelector"; import { ToolsMcpSettings } from "@/components/settings/ToolsMcpSettings"; +import { useSetAtom } from "jotai"; +import { activeSettingsSectionAtom } from "@/atoms/viewAtoms"; export default function SettingsPage() { const [isResetDialogOpen, setIsResetDialogOpen] = useState(false); @@ -33,6 +35,11 @@ export default function SettingsPage() { const appVersion = useAppVersion(); const { settings, updateSettings } = useSettings(); const router = useRouter(); + const setActiveSettingsSection = useSetAtom(activeSettingsSectionAtom); + + useEffect(() => { + setActiveSettingsSection("general-settings"); + }, [setActiveSettingsSection]); const handleResetEverything = async () => { setIsResetting(true);