From 6ef173fc510608d6e482ba1037ae77d40075f5ea Mon Sep 17 00:00:00 2001 From: Semianchuk Vitalii Date: Thu, 2 Jul 2026 11:01:12 +0100 Subject: [PATCH] fix: consolidate icon imports, fix stale refs and package name collision (#2343) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: consolidate icon imports, fix stale refs and package name collision three components were importing directly from lucide-react instead of going through the centralized @/lib/lucide-icons module like the rest of the codebase. added the missing Keyboard and BarChart2 exports to the icons module and updated the imports. also: - removed duplicate mermaid init comment in ProcessFlowModal - replaced placeholder issue #XXX with a descriptive note in git.ts - updated stale KuzuDB reference to LadybugDB in ARCHITECTURE.md - renamed gitnexus-web package.json name from "gitnexus" to "gitnexus-web" to avoid collision with the CLI package * fix: complete package rename in lockfile and cite #2054 in git.ts comment Address tri-review findings: package-lock.json name fields (top-level and packages[""]) now match the renamed gitnexus-web package, and the getCanonicalRemote doc comment cites #2054 instead of dropping the issue reference. Co-Authored-By: Claude Fable 5 * chore(autofix): apply prettier + eslint fixes via /autofix command --------- Co-authored-by: Gergő Magyar Co-authored-by: Claude Fable 5 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- ARCHITECTURE.md | 2 +- gitnexus-web/package-lock.json | 4 ++-- gitnexus-web/package.json | 2 +- gitnexus-web/src/components/HelpPanel.tsx | 11 ++++++++++- gitnexus-web/src/components/ProcessFlowModal.tsx | 3 +-- gitnexus-web/src/components/ProcessesPanel.tsx | 2 +- gitnexus-web/src/lib/lucide-icons.tsx | 2 ++ gitnexus/src/storage/git.ts | 2 +- 8 files changed, 19 insertions(+), 9 deletions(-) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index ad7fa8b0e..51568d948 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -17,7 +17,7 @@ Monorepo: **CLI/MCP** (`gitnexus/`) + **browser UI** (`gitnexus-web/`). 1. **Ingestion** — `analyze.ts` → `runFullAnalysis` (`run-analyze.ts`) → `runPipelineFromRepo` (`pipeline.ts`). DAG of 14 phases builds a `KnowledgeGraph` in memory, then loads into LadybugDB under `.gitnexus/`. Repo registered in `~/.gitnexus/registry.json` for MCP discovery. -2. **Persistence** — `repo-manager.ts` (paths, registry, KuzuDB cleanup). `lbug-adapter.ts` (graph load, queries, embedding batches). +2. **Persistence** — `repo-manager.ts` (paths, registry, LadybugDB cleanup). `lbug-adapter.ts` (graph load, queries, embedding batches). 3. **Query layer** — three interfaces to the same backend: - **MCP (stdio):** `mcp.ts` → `LocalBackend` → tools (`tools.ts`) + resources (`resources.ts`) diff --git a/gitnexus-web/package-lock.json b/gitnexus-web/package-lock.json index c6a3db902..bcda6b904 100644 --- a/gitnexus-web/package-lock.json +++ b/gitnexus-web/package-lock.json @@ -1,11 +1,11 @@ { - "name": "gitnexus", + "name": "gitnexus-web", "version": "0.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "gitnexus", + "name": "gitnexus-web", "version": "0.0.0", "dependencies": { "@langchain/anthropic": "^1.3.29", diff --git a/gitnexus-web/package.json b/gitnexus-web/package.json index 3c6d3ee5d..80e15f08d 100644 --- a/gitnexus-web/package.json +++ b/gitnexus-web/package.json @@ -1,5 +1,5 @@ { - "name": "gitnexus", + "name": "gitnexus-web", "private": true, "version": "0.0.0", "engines": { diff --git a/gitnexus-web/src/components/HelpPanel.tsx b/gitnexus-web/src/components/HelpPanel.tsx index 2df94ef87..babca11e4 100644 --- a/gitnexus-web/src/components/HelpPanel.tsx +++ b/gitnexus-web/src/components/HelpPanel.tsx @@ -1,5 +1,14 @@ import React, { useState } from 'react'; -import { X, GitBranch, Search, Filter, Zap, Keyboard, BarChart2, HelpCircle } from 'lucide-react'; +import { + X, + GitBranch, + Search, + Filter, + Zap, + Keyboard, + BarChart2, + HelpCircle, +} from '@/lib/lucide-icons'; import { useTranslation } from 'react-i18next'; interface HelpPanelProps { diff --git a/gitnexus-web/src/components/ProcessFlowModal.tsx b/gitnexus-web/src/components/ProcessFlowModal.tsx index 7dffd2b84..470c40c3f 100644 --- a/gitnexus-web/src/components/ProcessFlowModal.tsx +++ b/gitnexus-web/src/components/ProcessFlowModal.tsx @@ -6,7 +6,7 @@ import { useEffect, useRef, useCallback, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import { Copy, Focus, ZoomIn, ZoomOut } from 'lucide-react'; +import { Copy, Focus, ZoomIn, ZoomOut } from '@/lib/lucide-icons'; import mermaid from 'mermaid'; import DOMPurify from 'dompurify'; import { ProcessData, generateProcessMermaid } from '../lib/mermaid-generator'; @@ -18,7 +18,6 @@ interface ProcessFlowModalProps { isFullScreen?: boolean; } -// Initialize mermaid with cyan/purple theme matching GitNexus // Initialize mermaid with cyan/purple theme matching GitNexus mermaid.initialize({ startOnLoad: false, diff --git a/gitnexus-web/src/components/ProcessesPanel.tsx b/gitnexus-web/src/components/ProcessesPanel.tsx index 5ff9c54d4..add4c255b 100644 --- a/gitnexus-web/src/components/ProcessesPanel.tsx +++ b/gitnexus-web/src/components/ProcessesPanel.tsx @@ -18,7 +18,7 @@ import { Sparkles, Lightbulb, Layers, -} from 'lucide-react'; +} from '@/lib/lucide-icons'; import { useAppState } from '../hooks/useAppState'; import { ProcessFlowModal } from './ProcessFlowModal'; import type { ProcessData, ProcessStep } from '../lib/mermaid-generator'; diff --git a/gitnexus-web/src/lib/lucide-icons.tsx b/gitnexus-web/src/lib/lucide-icons.tsx index ab2d87524..3cc7f4f50 100644 --- a/gitnexus-web/src/lib/lucide-icons.tsx +++ b/gitnexus-web/src/lib/lucide-icons.tsx @@ -47,6 +47,7 @@ export { ArrowDown, ArrowRight, AtSign, + BarChart2, Brain, Box, Braces, @@ -71,6 +72,7 @@ export { Heart, HelpCircle, Home, + Keyboard, Key, Layers, Lightbulb, diff --git a/gitnexus/src/storage/git.ts b/gitnexus/src/storage/git.ts index aacbb74cb..53a451fb7 100644 --- a/gitnexus/src/storage/git.ts +++ b/gitnexus/src/storage/git.ts @@ -42,7 +42,7 @@ export const getCurrentCommit = (repoPath: string): string => { * Get a stable canonical identifier for the repo's `origin` remote, if any. * * Used to fingerprint two on-disk clones as the same logical repository - * (issue #XXX — silent graph drift across sibling clones). `path` alone + * (prevents silent graph drift across sibling clones — see #2054). `path` alone * is unreliable: worktrees, "clean clone for indexing" hygiene, and * multi-agent workspaces routinely have the same repo at multiple * absolute paths. The remote URL is the only on-disk signal that