GitNexus/gitnexus-web/src/hooks
Abhigyan Patwari a6c66f9777 fix(web): scope all backend calls to the active repo, not always the first
The root cause of four related issues: `repoRef.current` was never set during
initial server connection — only `switchRepo()` set it. Every backend call
(queries, search, grep, readFile) passed `undefined` as the repo parameter,
so the server's `resolveRepo()` fell back to `repos[0]`.

Changes:
- Expose `setCurrentRepo` from useAppState and call it in `handleServerConnect`
- Use `result.repoInfo.name` (canonical server name) instead of path parsing
- Parse `?project=` URL param during auto-connect, pass it to `connectToServer`
- Update URL with `?project=` on repo switch so F5/bookmarks work
- Pass `projectName` as `repo` in CodeReferencesPanel's `readFile` calls

Closes #139, closes #634, closes #635, closes #636

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 07:13:59 +05:30
..
app-state feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
useAppState.tsx fix(web): scope all backend calls to the active repo, not always the first 2026-04-04 07:13:59 +05:30
useBackend.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
useSettings.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
useSigma.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00