Skip to content

fix: graph view not showing data#11

Closed
aksOps wants to merge 1 commit into
mainfrom
fix/graph-view-empty-state
Closed

fix: graph view not showing data#11
aksOps wants to merge 1 commit into
mainfrom
fix/graph-view-empty-state

Conversation

@aksOps

@aksOps aksOps commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Return 404 from /api/graph/neighborhood when entity not found (instead of silent empty 200)
  • Add res.ok check in useGraph hook so API errors aren't swallowed
  • Replace hardcoded loadGraph('DocsContext', 2) with dynamic first-entity lookup via /api/entities?limit=1
  • Show contextual empty states in GraphView: no entities indexed, entity not found, or idle

Test plan

  • go build ./... compiles
  • npm run build in ui/ produces clean output
  • With no indexed data: Graph tab shows "No entities indexed yet" message
  • With indexed data: Graph tab auto-loads first entity's neighborhood
  • Searching a non-existent entity shows "Entity not found" message

🤖 Generated with Claude Code

…aph loading logic

- Deleted the `index.html` file from the project.
- Removed unnecessary "peer" properties from various dependencies in `package-lock.json`.
- Enhanced the graph loading logic in `App.tsx` to handle different graph statuses and fetch initial entities.
- Updated `GraphView.tsx` to display appropriate messages based on the graph status.
- Modified `useGraph.ts` to include a new `GraphStatus` type and manage graph loading states more effectively.
@aksOps aksOps force-pushed the fix/graph-view-empty-state branch from 04c3b6c to a085c12 Compare March 20, 2026 18:44
@aksOps aksOps closed this Apr 22, 2026
@aksOps aksOps deleted the fix/graph-view-empty-state branch April 23, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant