Skip to content

Add Knowledge Graph visualization, builder, and tests - #1

Open
nareshAiNexus wants to merge 2 commits into
mainfrom
codex/index-codebase-and-review-readme.md
Open

Add Knowledge Graph visualization, builder, and tests#1
nareshAiNexus wants to merge 2 commits into
mainfrom
codex/index-codebase-and-review-readme.md

Conversation

@nareshAiNexus

Copy link
Copy Markdown
Owner

Motivation

  • Provide a visual map of relationships between notes based on shared key terms to help discovery and navigation.
  • Expose the graph from the UI via the sidebar and the command palette for quick access.

Description

  • Add a graph builder buildKnowledgeGraph in src/lib/knowledge-graph.ts that tokenizes note text, ranks terms, computes Jaccard similarity, and outputs nodes and weighted edges.
  • Add KnowledgeGraphDialog component in src/components/KnowledgeGraphDialog.tsx that renders an SVG force-like layout, shows link strengths and shared terms, and opens notes on node click.
  • Wire the dialog into the app by adding a sidebar button and command palette entry, and by passing onOpenKnowledgeGraph and knowledgeGraphOpen state through Sidebar and Index.
  • Include a unit test file src/test/knowledge-graph.test.ts that verifies edge creation for related notes and absence of edges for disjoint notes.

Testing

  • Added unit tests in src/test/knowledge-graph.test.ts covering related and disjoint notes using buildKnowledgeGraph and ran them with vitest via npm run test.
  • All added tests succeeded.

Codex Task

@vercel

vercel Bot commented Mar 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
crossnotes Ready Ready Preview, Comment Mar 9, 2026 5:05am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant