Remove dead code: unused core exports + deprecated dagre layout#487
Open
caius72 wants to merge 1 commit into
Open
Remove dead code: unused core exports + deprecated dagre layout#487caius72 wants to merge 1 commit into
caius72 wants to merge 1 commit into
Conversation
Prune exported API surface that nothing in the repo (skills, dashboard) consumes, plus the deprecated dagre layout path the dashboard no longer uses: - embedding-search.ts (SemanticSearchEngine/cosineSimilarity) — speculative, never instantiated; only a stale store.ts comment referenced it - analyzer/language-lesson.ts (buildLanguageLessonPrompt and friends) — zero callers; the languageLesson schema field is filled by agent prompts, not this code, and is kept - change-classifier.ts (classifyUpdate) — only the barrel re-exported it - dashboard layout.worker.ts and applyDagreLayout() — both @deprecated/ unreferenced and the sole users of @dagrejs/dagre, which is dropped generateStarterIgnoreFile / ignore-generator.ts is kept — it is live, called by skills/understand/generate-ignore.mjs. ELK, d3-force and graphology-louvain are also retained; each still drives a live view. Build (core + dashboard), lint, and all tests pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes code with no callers anywhere in the repo (skills, dashboard, or each other). No behavior change; all builds, lint, and tests pass.
What's removed
embedding-search.ts—SemanticSearchEngine,cosineSimilaritystore.tscomment ("when embeddings are available, semantic mode will use SemanticSearchEngine"). Search uses Fuse.js viaSearchEngine.analyzer/language-lesson.ts—buildLanguageLessonPrompt,parseLanguageLessonResponse,detectLanguageConceptslanguageLessonschema field is populated by agent prompts, not these helpers — the field is untouched.change-classifier.ts—classifyUpdatecore/src/index.tsbarrel re-exported it.layout.worker.ts+applyDagreLayout()inlayout.ts@deprecated/unreferenced (structural views use ELK, knowledge graphs use d3-force). They are the only users of@dagrejs/dagre, so that dependency is dropped.Deliberately kept
generateStarterIgnoreFile/ignore-generator.ts— live, called byskills/understand/generate-ignore.mjs.Impact
12 files changed, +2 / −1008, −1 dependency (
@dagrejs/dagre).Verification
pnpm --filter @understand-anything/core build✓pnpm --filter @understand-anything/dashboard build✓ (no dagre chunk)pnpm lint✓pnpm test— 207/207 ✓Note:
packages/dashboard/public/knowledge-graph.json(the sample graph) still describes the removed functions; it's a generated artifact, best regenerated via/understandrather than hand-edited, so it's left out of this PR.