From e185e2ce0a8862c12cbcfc42a971f7f54db4b38e Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Wed, 3 Jun 2026 09:36:03 -0400 Subject: [PATCH] fix: read project scope from router params; align sidebar header icons - useSelectMention now reads the active project from React Router's search params instead of window.location, which can drift out of sync because new-chat params are written to the URL via raw history.pushState; the Model Selector and @ command now reliably keep the project on switch - Move the Chats section header out of the virtualized list so it renders in the same context as the Projects header and isn't shifted by the list scrollbar - Inset header action icons (pr-2) so Projects/Chats header icons line up with the project-row and conversation-row trailing actions - Extract getRouteChatProjectId into utils for the submit path --- .../Conversations/Conversations.tsx | 42 +++++-------------- .../Conversations/ProjectsSection.tsx | 2 +- client/src/hooks/Chat/useChatFunctions.ts | 11 +---- client/src/hooks/Input/useSelectMention.ts | 30 ++++++++++--- client/src/utils/convos.ts | 12 ++++++ 5 files changed, 49 insertions(+), 48 deletions(-) diff --git a/client/src/components/Conversations/Conversations.tsx b/client/src/components/Conversations/Conversations.tsx index ec49a5b155..067df01bfb 100644 --- a/client/src/components/Conversations/Conversations.tsx +++ b/client/src/components/Conversations/Conversations.tsx @@ -102,7 +102,7 @@ const ChatsHeader: FC = memo(({ isExpanded, onToggle }) => { }, [conversation?.conversationId, newConversation, queryClient]); return ( -
+