From f9f074b67d11548d0c0b23560d73443a68d8c5b1 Mon Sep 17 00:00:00 2001 From: Abhigyan Patwari Date: Sat, 4 Apr 2026 07:53:16 +0530 Subject: [PATCH] fix(web): update URL with ?project= on initial connect too The previous commit only updated the URL in switchRepo, not in handleServerConnect. This meant F5 after the initial connection would not preserve which repo was open. Co-Authored-By: Claude Opus 4.6 (1M context) --- gitnexus-web/src/App.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gitnexus-web/src/App.tsx b/gitnexus-web/src/App.tsx index 3c626949c..e15711c7b 100644 --- a/gitnexus-web/src/App.tsx +++ b/gitnexus-web/src/App.tsx @@ -61,6 +61,11 @@ const AppContent = () => { setProjectName(projectName); setCurrentRepo(projectName); + // Update URL so F5 / bookmarks preserve which repo is open + const url = new URL(window.location.href); + url.searchParams.set('project', projectName); + window.history.replaceState(null, '', url.toString()); + // Build KnowledgeGraph from server data for visualization const graph = createKnowledgeGraph(); for (const node of result.nodes) {