diff --git a/gitnexus-web/src/App.tsx b/gitnexus-web/src/App.tsx index 59fa83159..553a4c7cd 100644 --- a/gitnexus-web/src/App.tsx +++ b/gitnexus-web/src/App.tsx @@ -218,8 +218,8 @@ const AppContent = () => { setProgress({ phase: 'extracting', percent: 97, message: 'Processing...', detail: 'Extracting file contents' }); } }).then(async (result) => { - // Run connect and repo list in parallel (avoid waterfall) await handleServerConnect(result); + setProgress(null); setServerBaseUrl(baseUrl); fetchRepos(baseUrl) .then((repos) => setAvailableRepos(repos)) @@ -258,6 +258,7 @@ const AppContent = () => { onGitClone={handleGitClone} onServerConnect={async (result, serverUrl) => { await handleServerConnect(result); + setProgress(null); if (serverUrl) { const baseUrl = normalizeServerUrl(serverUrl); setServerBaseUrl(baseUrl); diff --git a/gitnexus-web/src/workers/ingestion.worker.ts b/gitnexus-web/src/workers/ingestion.worker.ts index 1063eff6d..240864bec 100644 --- a/gitnexus-web/src/workers/ingestion.worker.ts +++ b/gitnexus-web/src/workers/ingestion.worker.ts @@ -259,7 +259,9 @@ const workerApi = { console.log('📁 Stored', storedFileContents.size, 'files for grep/read tools'); } } catch (err) { - console.warn('LadybugDB load failed (non-fatal, continuing without it):', err); + if (import.meta.env.DEV) { + console.warn('LadybugDB load failed (non-fatal, continuing without it):', err); + } // Still build BM25 index even if LadybugDB fails buildBM25Index(fileMap); } diff --git a/gitnexus/package.json b/gitnexus/package.json index cba150460..76f6a368f 100644 --- a/gitnexus/package.json +++ b/gitnexus/package.json @@ -45,7 +45,7 @@ "test:integration": "vitest run test/integration", "test:watch": "vitest", "test:coverage": "vitest run --coverage", - "prepare": "npm run build && cd .. && husky", + "prepare": "node scripts/prepare.cjs", "postinstall": "node scripts/patch-tree-sitter-swift.cjs", "prepack": "npm run build && chmod +x dist/cli/index.js" }, diff --git a/gitnexus/scripts/prepare.cjs b/gitnexus/scripts/prepare.cjs new file mode 100644 index 000000000..73c3568d4 --- /dev/null +++ b/gitnexus/scripts/prepare.cjs @@ -0,0 +1,16 @@ +/** + * Prepare script: build TypeScript and install husky hooks. + * Uses Node child_process so it works on Windows (cmd.exe) and POSIX. + */ +const { execSync } = require('child_process'); +const path = require('path'); + +// 1. Build +execSync('npm run build', { stdio: 'inherit', cwd: __dirname + '/..' }); + +// 2. Install husky (from repo root — one level up from gitnexus/) +try { + execSync('npx husky', { stdio: 'inherit', cwd: path.resolve(__dirname, '../..') }); +} catch { + // Husky install is optional — may fail in CI or tarball installs +}