From 6af8c27c97469c87c5648037f36206bc8e2ed022 Mon Sep 17 00:00:00 2001 From: Anchel135 Date: Mon, 2 Mar 2026 14:53:12 +0200 Subject: [PATCH 1/2] Update version to 0.3.0 and refactor components for improved functionality and performance --- app/components/chat.tsx | 2 +- app/components/dataPanel.tsx | 1 - app/components/graphView.tsx | 10 ++++++++-- app/components/model.ts | 4 ++++ app/globals.css | 9 --------- app/page.tsx | 18 +++++++++--------- package-lock.json | 4 ++-- package.json | 2 +- 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index ff99e169..a01da514 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -97,7 +97,7 @@ export function Chat({ messages, setMessages, query, setQuery, selectedPath, set if (!canvas) return setSelectedPath(prev => { if (prev) { - if (isPathResponse && paths.some((path) => [...path.nodes, ...path.links].every((e: any) => [...prev.nodes, ...prev.links].some((e: any) => e.id === e.id)))) { + if (isPathResponse && paths.some((path) => [...path.nodes, ...path.links].every((e: any) => [...prev.nodes, ...prev.links].some((el: any) => el.id === e.id)))) { graph.getElements().forEach(link => { const { id } = link diff --git a/app/components/dataPanel.tsx b/app/components/dataPanel.tsx index b1d84e38..4a50434f 100644 --- a/app/components/dataPanel.tsx +++ b/app/components/dataPanel.tsx @@ -18,7 +18,6 @@ const excludedProperties = [ "expand", "collapsed", "isPath", - "isPathSelected", "visible", "index", "curve", diff --git a/app/components/graphView.tsx b/app/components/graphView.tsx index aefda794..9ea3a2fe 100644 --- a/app/components/graphView.tsx +++ b/app/components/graphView.tsx @@ -164,7 +164,10 @@ export default function GraphView({ }, [zoomedNodes, cooldownTicks, canvasRef]) const nodeCanvasObject = useCallback((node: GraphNode, ctx: CanvasRenderingContext2D) => { - if (!node.x || !node.y) return + if (node.x === undefined || node.y === undefined) { + node.x = 0; + node.y = 0; + } const isHovered = !!hoverElement && !('source' in hoverElement) && hoverElement.id === node.id const isSelected = selectedObjects.some(obj => obj.id === node.id) || selectedObj?.id === node.id @@ -231,7 +234,10 @@ export default function GraphView({ }, [selectedObj, selectedObjects, isPathResponse, hoverElement]) const nodePointerAreaPaint = useCallback((node: GraphNode, color: string, ctx: CanvasRenderingContext2D) => { - if (!node.x || !node.y) return + if (node.x === undefined || node.y === undefined) { + node.x = 0; + node.y = 0; + } ctx.fillStyle = color; ctx.beginPath(); diff --git a/app/components/model.ts b/app/components/model.ts index 61626443..7253fa26 100644 --- a/app/components/model.ts +++ b/app/components/model.ts @@ -210,6 +210,8 @@ export class Graph { } this.nodesMap.set(edgeData.src_node, source) + this.elements.nodes.push(source) + newElements.nodes.push(source) } if (!target) { @@ -227,6 +229,8 @@ export class Graph { } } this.nodesMap.set(edgeData.dest_node, target) + this.elements.nodes.push(target) + newElements.nodes.push(target) } let label = this.labelsMap.get(edgeData.relation) diff --git a/app/globals.css b/app/globals.css index 26324540..1a377faf 100644 --- a/app/globals.css +++ b/app/globals.css @@ -127,13 +127,4 @@ ::-webkit-scrollbar-thumb:hover { background-color: #a8bbbf; -} - -@layer base { - * { - @apply border-border; - } - body { - @apply bg-background text-foreground; - } } \ No newline at end of file diff --git a/app/page.tsx b/app/page.tsx index f8f465c5..3a5c91de 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -368,7 +368,7 @@ export default function Home() {
- + FalkorDB

@@ -376,15 +376,15 @@ export default function Home() {

    - +

    Main Website

    - +

    Github

    - +

    Discord

    @@ -534,7 +534,7 @@ export default function Home() {
- + FalkorDB