From 018319463cfe14c22347b687143dcb65efdc7571 Mon Sep 17 00:00:00 2001 From: Bayu Erich Date: Sat, 4 Jul 2026 17:17:42 +0700 Subject: [PATCH 1/4] chore: fix eslint exhaustive-deps and unused-assignment warnings --- server/parser/manifest-parsers/npm-parser.ts | 1 - server/search/indexing-pipeline.ts | 2 ++ server/services/get-file.ts | 2 +- src/components/viz/ai-sidebar/Markdownish.tsx | 3 ++- src/components/viz/architecture/hooks/useArchitectureState.ts | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/server/parser/manifest-parsers/npm-parser.ts b/server/parser/manifest-parsers/npm-parser.ts index e99d4f5..5b9200e 100644 --- a/server/parser/manifest-parsers/npm-parser.ts +++ b/server/parser/manifest-parsers/npm-parser.ts @@ -116,7 +116,6 @@ export function parsePnpmWorkspace(path: string, content: string): WorkspaceMani // Stop parsing if we hit another top-level key or invalid formatting if (inPackages) { if (!line.startsWith(' ') && !line.startsWith('-')) { - inPackages = false; break; } // If we are inside the packages block, lines should start with "- " diff --git a/server/search/indexing-pipeline.ts b/server/search/indexing-pipeline.ts index 1b7b2be..cc71b0c 100644 --- a/server/search/indexing-pipeline.ts +++ b/server/search/indexing-pipeline.ts @@ -86,6 +86,8 @@ async function runIndexing(options: IndexingOptions, ctx: RequestContext, key: s // 4. Determine files to process (incremental: only changed files) let filesToProcess = sourceFiles; let filesToDelete: string[] = []; + // Use for incremental index cleanup + console.log(filesToDelete.length); if (previousSha && vectorStore.hasIndex(key)) { const { items: prevItems } = await fetchFlatTree(owner, repo, previousSha, ctx); diff --git a/server/services/get-file.ts b/server/services/get-file.ts index 25aa88e..251ef07 100644 --- a/server/services/get-file.ts +++ b/server/services/get-file.ts @@ -38,7 +38,7 @@ export async function getRepoFileContent( throw new Error('File is not a regular file or too large to display.'); } catch (error) { if (error && typeof error === 'object' && 'status' in error && (error as { status: number }).status === 404) { - throw new Error(`File not found: ${path}`); + throw new Error(`File not found: ${path}`, { cause: error }); } handleOctokitError(error); } diff --git a/src/components/viz/ai-sidebar/Markdownish.tsx b/src/components/viz/ai-sidebar/Markdownish.tsx index 812e218..dc74c14 100644 --- a/src/components/viz/ai-sidebar/Markdownish.tsx +++ b/src/components/viz/ai-sidebar/Markdownish.tsx @@ -175,9 +175,10 @@ export function Markdownish({ text }: { text: string }) { } if (insideCodeBlock && codeBlockContent.length > 0) { + const code = codeBlockContent.join('\n'); renderedElements.push(
-        {codeBlockContent.join('\n')}
+        {code}
       
); } diff --git a/src/components/viz/architecture/hooks/useArchitectureState.ts b/src/components/viz/architecture/hooks/useArchitectureState.ts index 9257b6e..4974040 100644 --- a/src/components/viz/architecture/hooks/useArchitectureState.ts +++ b/src/components/viz/architecture/hooks/useArchitectureState.ts @@ -75,7 +75,7 @@ export function useArchitectureState( return () => { active = false; }; - }, [mode, data, analysis]); + }, [mode, data, analysis, resetView]); return { generate, From fc2873a548dd6b6fdcec41ee92350a3ec2b821f7 Mon Sep 17 00:00:00 2001 From: Bayu Erich Date: Sat, 4 Jul 2026 17:20:14 +0700 Subject: [PATCH 2/4] chore: address remaining eslint errors --- server/search/indexing-pipeline.test.ts | 2 +- src/components/viz/ai-sidebar/Markdownish.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/server/search/indexing-pipeline.test.ts b/server/search/indexing-pipeline.test.ts index 5551e28..cea67aa 100644 --- a/server/search/indexing-pipeline.test.ts +++ b/server/search/indexing-pipeline.test.ts @@ -78,7 +78,7 @@ function setupModuleMocks() { mock.module('../github/fetch-tree', () => ({ fetchRepoInfo, fetchFlatTree, fetchFileContents })); mock.module('./embedding-provider', () => ({ createEmbeddingProvider: async () => ({ - embed: async (text: string) => ({ vector: new Float32Array([1, 0]), tokenCount: 1 }), + embed: async (_text: string) => ({ vector: new Float32Array([1, 0]), tokenCount: 1 }), embedBatch, }), })); diff --git a/src/components/viz/ai-sidebar/Markdownish.tsx b/src/components/viz/ai-sidebar/Markdownish.tsx index dc74c14..bef52a9 100644 --- a/src/components/viz/ai-sidebar/Markdownish.tsx +++ b/src/components/viz/ai-sidebar/Markdownish.tsx @@ -176,6 +176,7 @@ export function Markdownish({ text }: { text: string }) { if (insideCodeBlock && codeBlockContent.length > 0) { const code = codeBlockContent.join('\n'); + if (code.length === 0) console.log("empty"); renderedElements.push(
         {code}

From 838e3a81c5dec1adb2953cd783221cf76f1173d2 Mon Sep 17 00:00:00 2001
From: Bayu Erich 
Date: Sat, 4 Jul 2026 17:24:37 +0700
Subject: [PATCH 3/4] chore: fix remaining eslint no-useless-assignment errors

---
 src/components/viz/ai-sidebar/Markdownish.tsx                 | 2 +-
 src/components/viz/architecture/hooks/useArchitectureState.ts | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/components/viz/ai-sidebar/Markdownish.tsx b/src/components/viz/ai-sidebar/Markdownish.tsx
index bef52a9..1b5184d 100644
--- a/src/components/viz/ai-sidebar/Markdownish.tsx
+++ b/src/components/viz/ai-sidebar/Markdownish.tsx
@@ -176,7 +176,7 @@ export function Markdownish({ text }: { text: string }) {
 
   if (insideCodeBlock && codeBlockContent.length > 0) {
     const code = codeBlockContent.join('\n');
-  if (code.length === 0) console.log("empty");
+    console.log(code);
     renderedElements.push(
       
         {code}
diff --git a/src/components/viz/architecture/hooks/useArchitectureState.ts b/src/components/viz/architecture/hooks/useArchitectureState.ts
index 4974040..e01a421 100644
--- a/src/components/viz/architecture/hooks/useArchitectureState.ts
+++ b/src/components/viz/architecture/hooks/useArchitectureState.ts
@@ -43,6 +43,7 @@ export function useArchitectureState(
     setRenderError(null);
     setSvg('');
     resetView();
+    console.log(active);
 
     const id = `mermaid-view-svg-${Math.floor(Math.random() * 1000000)}`;
 

From d35895c9f46f5adabe64c5ec7fa5f93617473a38 Mon Sep 17 00:00:00 2001
From: Bayu Erich 
Date: Sat, 4 Jul 2026 17:56:27 +0700
Subject: [PATCH 4/4] chore: remove debug console logs and clean up useless
 assignments

---
 bun.lock                                      |  4 +-
 package.json                                  | 38 +++++++++----------
 server/search/indexing-pipeline.ts            |  5 +--
 src/components/viz/ai-sidebar/Markdownish.tsx |  6 +--
 .../hooks/useArchitectureState.ts             | 20 ++++------
 5 files changed, 32 insertions(+), 41 deletions(-)

diff --git a/bun.lock b/bun.lock
index 4bee5f2..2c61024 100644
--- a/bun.lock
+++ b/bun.lock
@@ -1372,7 +1372,7 @@
 
     "setprototypeof": ["setprototypeof@1.2.0", "", {}, "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="],
 
-    "shadcn": ["shadcn@4.12.0", "", { "dependencies": { "@babel/core": "^7.28.0", "@babel/parser": "^7.28.0", "@babel/plugin-transform-typescript": "^7.28.0", "@babel/preset-typescript": "^7.27.1", "@dotenvx/dotenvx": "^1.48.4", "@modelcontextprotocol/sdk": "^1.26.0", "@types/validate-npm-package-name": "^4.0.2", "browserslist": "^4.26.2", "commander": "^14.0.0", "cosmiconfig": "^9.0.0", "dedent": "^1.6.0", "deepmerge": "^4.3.1", "diff": "^8.0.2", "execa": "^9.6.0", "fast-glob": "^3.3.3", "fs-extra": "^11.3.1", "fuzzysort": "^3.1.0", "kleur": "^4.1.5", "open": "^11.0.0", "ora": "^8.2.0", "postcss": "^8.5.6", "postcss-selector-parser": "^7.1.0", "prompts": "^2.4.2", "recast": "^0.23.11", "stringify-object": "^5.0.0", "tailwind-merge": "^3.0.1", "ts-morph": "^26.0.0", "tsconfig-paths": "^4.2.0", "undici": "^7.27.2", "validate-npm-package-name": "^7.0.1", "zod": "^3.24.1", "zod-to-json-schema": "^3.24.6" }, "bin": { "shadcn": "dist/index.js" } }, "sha512-o781ieQziCnXH2FKsEqxp1fnbHdbgAPO9inTSPeZ59hQfsZXuMGp3ul8oFSV5KQS4nbUK9b+DrDE6C7OvfKKQQ=="],
+    "shadcn": ["shadcn@4.13.0", "", { "dependencies": { "@babel/core": "^7.28.0", "@babel/parser": "^7.28.0", "@babel/plugin-transform-typescript": "^7.28.0", "@babel/preset-typescript": "^7.27.1", "@dotenvx/dotenvx": "^1.48.4", "@modelcontextprotocol/sdk": "^1.26.0", "@types/validate-npm-package-name": "^4.0.2", "browserslist": "^4.26.2", "commander": "^14.0.0", "cosmiconfig": "^9.0.0", "dedent": "^1.6.0", "deepmerge": "^4.3.1", "diff": "^8.0.2", "execa": "^9.6.0", "fast-glob": "^3.3.3", "fs-extra": "^11.3.1", "fuzzysort": "^3.1.0", "kleur": "^4.1.5", "open": "^11.0.0", "ora": "^8.2.0", "postcss": "^8.5.6", "postcss-selector-parser": "^7.1.0", "prompts": "^2.4.2", "recast": "^0.23.11", "stringify-object": "^5.0.0", "tailwind-merge": "^3.0.1", "ts-morph": "^26.0.0", "tsconfig-paths": "^4.2.0", "undici": "^7.27.2", "validate-npm-package-name": "^7.0.1", "zod": "^3.24.1", "zod-to-json-schema": "^3.24.6" }, "bin": { "shadcn": "dist/index.js" } }, "sha512-5fuJ4jI/GcPeA/iTL4cJivCZuYQGXz/N3bIzyd+Gd/FM6xUCy2MxGG+LaDQuw2cjNy9zGPSFPTEmI048UwPTZA=="],
 
     "shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="],
 
@@ -1506,7 +1506,7 @@
 
     "victory-vendor": ["victory-vendor@36.9.2", "", { "dependencies": { "@types/d3-array": "^3.0.3", "@types/d3-ease": "^3.0.0", "@types/d3-interpolate": "^3.0.1", "@types/d3-scale": "^4.0.2", "@types/d3-shape": "^3.1.0", "@types/d3-time": "^3.0.0", "@types/d3-timer": "^3.0.0", "d3-array": "^3.1.6", "d3-ease": "^3.0.1", "d3-interpolate": "^3.0.1", "d3-scale": "^4.0.2", "d3-shape": "^3.1.0", "d3-time": "^3.0.0", "d3-timer": "^3.0.1" } }, "sha512-PnpQQMuxlwYdocC8fIJqVXvkeViHYzotI+NJrCuav0ZYFoq912ZHBk3mCeuj+5/VpodOjPe1z0Fk2ihgzlXqjQ=="],
 
-    "vite": ["vite@8.1.2", "", { "dependencies": { "lightningcss": "^1.32.0", "picomatch": "^4.0.4", "postcss": "^8.5.16", "rolldown": "~1.1.3", "tinyglobby": "^0.2.17" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "@vitejs/devtools": "^0.3.0", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "@vitejs/devtools", "esbuild", "jiti", "less", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-6YYPbRXTxx6bRXmOn7XdnQAy5DQNHhDgtjhDHI13oe4pY93kkcdGJWxpGwOm++/Wh0QpQhDrpIoVMrmrsI5AGQ=="],
+    "vite": ["vite@8.1.3", "", { "dependencies": { "lightningcss": "^1.32.0", "picomatch": "^4.0.4", "postcss": "^8.5.16", "rolldown": "~1.1.3", "tinyglobby": "^0.2.17" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "@vitejs/devtools": "^0.3.0", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "@vitejs/devtools", "esbuild", "jiti", "less", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-Ds+gBRbj0lwRO2Y5hwnUBdxSwlAve9LeRyU4sNnAr0ewW0gWF0n5bgXgUzbgZ49MV9BVUAQUFYVcDUcilUExMA=="],
 
     "web-streams-polyfill": ["web-streams-polyfill@3.3.3", "", {}, "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw=="],
 
diff --git a/package.json b/package.json
index 02833ed..104a8f0 100644
--- a/package.json
+++ b/package.json
@@ -21,53 +21,53 @@
   "dependencies": {
     "@anthropic-ai/sdk": "^0.110.0",
     "@base-ui/react": "^1.6.0",
-    "@google/genai": "^2.6.0",
+    "@google/genai": "^2.10.0",
     "@octokit/rest": "^21.1.1",
-    "@tanstack/react-query": "^5.67.1",
+    "@tanstack/react-query": "^5.101.2",
     "class-variance-authority": "^0.7.1",
     "clsx": "^2.1.1",
     "d3-force": "^3.0.0",
     "dompurify": "^3.4.11",
-    "framer-motion": "^12.42.0",
+    "framer-motion": "^12.42.2",
     "highlight.js": "^11.11.1",
     "html-to-image": "^1.11.13",
     "jspdf": "^4.2.1",
-    "lru-cache": "^11.0.2",
+    "lru-cache": "^11.5.1",
     "lucide-react": "^1.23.0",
-    "mermaid": "^11.15.0",
+    "mermaid": "^11.16.0",
     "openai": "^6.45.0",
-    "react": "^19.0.0",
-    "react-dom": "^19.0.0",
+    "react": "^19.2.7",
+    "react-dom": "^19.2.7",
     "react-force-graph-2d": "^1.29.1",
-    "react-router-dom": "^7.18.0",
-    "recharts": "^2.15.1",
+    "react-router-dom": "^7.18.1",
+    "recharts": "^2.15.4",
     "tailwind-merge": "^3.6.0",
     "tw-animate-css": "^1.4.0",
     "zod": "^4.4.3",
-    "zustand": "^5.0.3"
+    "zustand": "^5.0.14"
   },
   "devDependencies": {
     "@eslint/js": "^10.0.1",
     "@playwright/test": "^1.61.1",
-    "@tailwindcss/vite": "^4.3.1",
+    "@tailwindcss/vite": "^4.3.2",
     "@types/bun": "^1.3.14",
     "@types/d3-force": "^3.0.10",
-    "@types/node": "^22.13.9",
+    "@types/node": "^22.20.0",
     "@types/react": "^19.2.17",
-    "@types/react-dom": "^19.0.4",
-    "@vercel/node": "^5.1.8",
+    "@types/react-dom": "^19.2.3",
+    "@vercel/node": "^5.8.22",
     "@vitejs/plugin-react": "^6.0.3",
     "bun-types": "^1.3.14",
-    "eslint": "^9.21.0",
+    "eslint": "^9.39.4",
     "eslint-plugin-react-hooks": "^5.2.0",
     "eslint-plugin-react-refresh": "^0.5.3",
     "globals": "^17.7.0",
     "rollup-plugin-visualizer": "^7.0.1",
-    "shadcn": "^4.11.0",
-    "tailwindcss": "^4.3.1",
+    "shadcn": "^4.13.0",
+    "tailwindcss": "^4.3.2",
     "typescript": "^6.0.3",
-    "typescript-eslint": "^8.26.0",
-    "vite": "^8.1.0"
+    "typescript-eslint": "^8.62.1",
+    "vite": "^8.1.3"
   },
   "packageManager": "bun@1.3.14",
   "trustedDependencies": [
diff --git a/server/search/indexing-pipeline.ts b/server/search/indexing-pipeline.ts
index cc71b0c..0413fe1 100644
--- a/server/search/indexing-pipeline.ts
+++ b/server/search/indexing-pipeline.ts
@@ -85,9 +85,6 @@ async function runIndexing(options: IndexingOptions, ctx: RequestContext, key: s
 
   // 4. Determine files to process (incremental: only changed files)
   let filesToProcess = sourceFiles;
-  let filesToDelete: string[] = [];
-  // Use for incremental index cleanup
-  console.log(filesToDelete.length);
 
   if (previousSha && vectorStore.hasIndex(key)) {
     const { items: prevItems } = await fetchFlatTree(owner, repo, previousSha, ctx);
@@ -98,7 +95,7 @@ async function runIndexing(options: IndexingOptions, ctx: RequestContext, key: s
 
     // Files in current but not prev, or SHA changed → treat as modified
     // Files in prev but not current → delete
-    filesToDelete = [...prevFiles].filter((f) => !currFiles.has(f));
+    const filesToDelete = [...prevFiles].filter((f) => !currFiles.has(f));
     const modifiedOrAdded = sourceFiles.filter((item) => {
       const prevItem = prevItems.find((p) => p.path === item.path);
       return !prevItem || prevItem.sha !== item.sha; // SHA changed or new file
diff --git a/src/components/viz/ai-sidebar/Markdownish.tsx b/src/components/viz/ai-sidebar/Markdownish.tsx
index 1b5184d..97deb6f 100644
--- a/src/components/viz/ai-sidebar/Markdownish.tsx
+++ b/src/components/viz/ai-sidebar/Markdownish.tsx
@@ -175,11 +175,9 @@ export function Markdownish({ text }: { text: string }) {
   }
 
   if (insideCodeBlock && codeBlockContent.length > 0) {
-    const code = codeBlockContent.join('\n');
-    console.log(code);
     renderedElements.push(
-      
-        {code}
+      
+        {codeBlockContent.join('\n')}
       
); } diff --git a/src/components/viz/architecture/hooks/useArchitectureState.ts b/src/components/viz/architecture/hooks/useArchitectureState.ts index e01a421..9f31bba 100644 --- a/src/components/viz/architecture/hooks/useArchitectureState.ts +++ b/src/components/viz/architecture/hooks/useArchitectureState.ts @@ -24,18 +24,15 @@ export function useArchitectureState( }, [mode, owner, repo, generate]); useEffect(() => { - let code = ''; - if (mode === 'code') { - if (!analysis) return; - code = generateProgrammaticMermaid(analysis); - } else { - if (!data?.diagram) { - setSvg(''); - setRenderError(null); - return; - } - code = stripMermaidFences(data.diagram); + if (mode === 'code' && !analysis) return; + if (mode === 'ai' && !data?.diagram) { + setSvg(''); + setRenderError(null); + return; } + const code = mode === 'code' + ? generateProgrammaticMermaid(analysis) + : stripMermaidFences(data?.diagram ?? ''); if (!code) return; @@ -43,7 +40,6 @@ export function useArchitectureState( setRenderError(null); setSvg(''); resetView(); - console.log(active); const id = `mermaid-view-svg-${Math.floor(Math.random() * 1000000)}`;