From fc9f1ec143d976ecf3c9898694e6692f1b76636c Mon Sep 17 00:00:00 2001 From: byGalax Date: Sat, 16 May 2026 01:12:50 +0200 Subject: [PATCH] fix(desktop): Settings sidebar redirected to /chats instead of scrolling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit App uses HashRouter, so an changes the routing hash and the router can't find a match — it falls back to /chats. Replace anchors with buttons that scroll the target section via scrollIntoView and update the active highlight optimistically. --- apps/desktop/src/pages/SettingsPage.tsx | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/apps/desktop/src/pages/SettingsPage.tsx b/apps/desktop/src/pages/SettingsPage.tsx index 966a766..c9e0fb1 100644 --- a/apps/desktop/src/pages/SettingsPage.tsx +++ b/apps/desktop/src/pages/SettingsPage.tsx @@ -159,11 +159,23 @@ export function SettingsPage() { {sections.map(({ id, label, Icon }) => { const active = activeId === id; return ( - ` — the app uses + // HashRouter where the URL hash IS the route. Anchor links + // would navigate away from /settings instead of scrolling. + // We scroll the section into view programmatically and + // optimistically set activeId so the click feels instant. + ); })}