Commit graph

2 commits

Author SHA1 Message Date
clssck
4e58da3583 style(lightrag_webui): fix indentation, color palette, and component optimization
- Fix inconsistent indentation in App.tsx (66 → 68 chars)
- Refactor GraphControl reducer logic: cache selection/theme in refs to prevent expensive re-renders on every hover/selection change; extract nodeReducer and edgeReducer to useCallback with stable dependencies
- Improve GraphViewer performance: extract FocusSync and GraphSearchWithSelection components to prevent re-renders from unrelated store updates
- Remove unused imports (X icon, ZapIcon, i18n)
- Remove unused function parameter (storageConfig)
- Standardize dark theme colors: improve contrast and visual hierarchy (hsl values); update scrollbar colors for better visibility
- Normalize quote style: double quotes → single quotes in className attributes
- Fix form element styling: improve dark mode button hover states (gray-800/900 → gray-700/800, red-900 → red-800)
- Optimize dropdown menu colors: dark mode backgrounds (gray-900/gray-800)
- Relocate HIDDEN_COLUMNS constant to module level in TableExplorer
- Optimize RowDetailModal: move entries computation to useMemo for perf
- Fix useLightragGraph dependency array: add missing minDegree and includeOrphans dependencies
2025-11-30 20:15:27 +01:00
clssck
43af31f888 feat: add db_degree visibility and orphan connection UI
Graph Connectivity Awareness:
- Add db_degree property to all KG implementations (NetworkX, Postgres, Neo4j, Mongo, Memgraph)
- Show database degree vs visual degree in node panel with amber badge
- Add visual indicator (amber border) for nodes with hidden connections
- Add "Load X hidden connection(s)" button to expand hidden neighbors
- Add configurable "Expand Depth" setting (1-5) in graph settings
- Use global maxNodes setting for node expansion consistency

Orphan Connection UI:
- Add OrphanConnectionDialog component for manual orphan entity connection
- Add OrphanConnectionControl button in graph sidebar
- Expose /graph/orphans/connect API endpoint for frontend use

Backend Improvements:
- Add get_orphan_entities() and connect_orphan_entities() to base storage
- Add orphan connection configuration parameters
- Improve entity extraction with relationship density requirements

Frontend:
- Add graphExpandDepth and graphIncludeOrphans to settings store
- Add min_degree and include_orphans graph filtering parameters
- Update translations (en.json, zh.json)
2025-11-29 21:08:07 +01:00