Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
78816de
Update README.md
AviAvni Jul 8, 2025
3cd8513
fix tests
Naseem77 Jul 8, 2025
9377bd7
implement sharding in CI
Naseem77 Jul 8, 2025
0e4d9a2
fix nodeDetailsPanel tests
Naseem77 Jul 8, 2025
a9ef198
fix tests
Naseem77 Jul 8, 2025
c5011ff
Update nodeDetailsPanel.spec.ts
Naseem77 Jul 8, 2025
abde365
Update nodeDetailsPanel.spec.ts
Naseem77 Jul 8, 2025
11b8e91
Update nodeDetailsPanel.spec.ts
Naseem77 Jul 8, 2025
5656d2b
Update nodeDetailsPanel.spec.ts
Naseem77 Jul 8, 2025
f7a2de2
update CI
Naseem77 Jul 8, 2025
e67aeaf
Merge pull request #477 from FalkorDB/fix-tests
Naseem77 Jul 9, 2025
57b813e
Merge branch 'main' into AviAvni-patch-1
Naseem77 Jul 9, 2025
a8c7c8f
Merge pull request #476 from FalkorDB/AviAvni-patch-1
AviAvni Jul 16, 2025
4eee80f
Update page.tsx
danshalev7 Aug 3, 2025
85cf61d
Merge pull request #483 from FalkorDB/danshalev7-patch-2
gkorland Oct 14, 2025
fd86e69
Update Next.js to version 15.5.7
Naseem77 Dec 8, 2025
e490d50
fix tests
Naseem77 Dec 8, 2025
2c3424b
remove logging
Naseem77 Dec 10, 2025
7af3272
fix comments
Naseem77 Dec 10, 2025
88a71a3
Merge pull request #497 from FalkorDB/update-next-15.5.7
gkorland Dec 10, 2025
dbcbde6
Update dependencies and improve test configurations
Anchel123 Dec 10, 2025
edde606
fix build
Anchel123 Dec 10, 2025
5352150
install
Anchel123 Dec 10, 2025
628bea2
Remove redundant test for UI response matching API response in chat t…
Anchel123 Dec 15, 2025
546f56e
Refactor chat tests by removing redundant validation for consistent U…
Anchel123 Dec 15, 2025
2d29b08
Refactor graph model and integrate FalkorDB canvas for visualization
Anchel123 Dec 18, 2025
15859f7
Update Next.js dependency to version 15.5.8 in package.json and packa…
Anchel123 Dec 18, 2025
0e1d590
Merge pull request #501 from FalkorDB/bump-next-to-v15.5.8
Anchel123 Dec 18, 2025
da9522f
Refactor components to use canvasRef instead of chartRef for improved…
Anchel123 Dec 18, 2025
39e074f
Update FalkorDB canvas dependency to version 0.0.7 and enable backgro…
Anchel123 Dec 18, 2025
77d2695
Initial plan
Copilot Dec 21, 2025
95ee131
Upgrade Next.js to 15.5.9 and eslint-config-next to 15.5.9
Copilot Dec 21, 2025
8a89f17
Merge pull request #504 from FalkorDB/copilot/upgrade-nextjs-15-5-9
gkorland Dec 22, 2025
b0fb8f5
Update FalkorDB canvas dependency to version 0.0.8
Anchel123 Dec 24, 2025
3f68425
Update FalkorDB canvas dependency to version 0.0.11 and improve error…
Anchel123 Dec 30, 2025
0c2020e
Merge remote-tracking branch 'origin/main' into integrate-falkordb-ca…
Anchel123 Dec 30, 2025
d6d5880
Merge branch 'merge-main-to-staging' into integrate-falkordb-canvas-f…
Anchel123 Dec 30, 2025
f9d16ad
Refactor ForceGraph and CodeGraph components to integrate cooldown ti…
Anchel123 Dec 30, 2025
3f9b0ea
Refactor code structure for improved readability and maintainability
Anchel123 Dec 30, 2025
b49527c
Merge pull request #506 from FalkorDB/integrate-falkordb-canvas-for-v…
Anchel123 Dec 30, 2025
912f1f7
Update Node.js version to 24 in workflows and Dockerfile
Anchel123 Dec 30, 2025
fac6fde
Update @falkordb/canvas dependency to version 0.0.21 in package.json …
Anchel123 Jan 4, 2026
5fb73aa
Merge pull request #507 from FalkorDB/integrate-falkordb-canvas-for-v…
Anchel123 Jan 4, 2026
9baa03c
Update canvas locator to target FalkorDB canvas element
Anchel123 Jan 5, 2026
188ef5b
Refactor canvas animation wait logic and update tooltip locator
Anchel123 Jan 5, 2026
3b047cf
Add engine stop handler to update global graph data and wait for it i…
Anchel123 Jan 6, 2026
1c99bf0
Fix formatting in ForceGraph to ensure proper assignment of graph dat…
Anchel123 Jan 6, 2026
f1e3368
Refactor error handling in GET and POST methods to ensure consistent …
Anchel123 Jan 6, 2026
985ca72
Refactor ForceGraph to store graph data as a function in the window o…
Anchel123 Jan 6, 2026
89c4bc6
Update @falkordb/canvas dependency to version 0.0.22 in package.json …
Anchel123 Jan 7, 2026
2e2c593
Update @falkordb/canvas dependency to version 0.0.23 in package.json …
Anchel123 Jan 8, 2026
6cfa9e0
Update @falkordb/canvas dependency to version 0.0.24 in package.json …
Anchel123 Jan 12, 2026
dd0c0fd
fix getGraphNodes for testing
Naseem77 Jan 18, 2026
248f8d7
Add FalkorDB Canvas compatibility: support both data structures and f…
Naseem77 Feb 2, 2026
331ecf5
Update @falkordb/canvas dependency to version 0.0.29 in package.json …
Anchel123 Feb 2, 2026
2a85de7
Refactor ForceGraph props to make event handlers required and clean u…
Anchel123 Feb 3, 2026
550d911
Add caption property to nodes in convertToCanvasData function
Anchel123 Feb 3, 2026
72b7b9e
Refactor graph components to enhance node and link handling; update F…
Anchel123 Feb 19, 2026
e04e3e3
Refactor ForceGraph and Chat components; enhance path handling and vi…
Anchel123 Feb 19, 2026
0ae499b
Update @falkordb/canvas dependency to version 0.0.35 in package.json …
Anchel123 Feb 22, 2026
6f2acae
Update @falkordb/canvas dependency to version 0.0.36 in package.json …
Anchel123 Feb 22, 2026
b4e0720
fix tests
Naseem77 Feb 23, 2026
7b3a441
Merge branch 'staging' into merge-main-to-staging
Naseem77 Feb 23, 2026
95e32cf
Update @falkordb/canvas dependency to version 0.0.37; enhance graph d…
Anchel123 Feb 23, 2026
e6b909b
Merge branch 'merge-main-to-staging' of https://github.com/FalkorDB/c…
Anchel123 Feb 23, 2026
d620f76
Remove caption property from node data and update graph function assi…
Anchel123 Feb 23, 2026
be692e6
Refactor graph data handling in ForceGraph and page components for im…
Anchel123 Feb 23, 2026
f5c7158
Add id prop to components for responsive graph rendering; update fetc…
Anchel123 Feb 23, 2026
12577f9
Remove test.only from node path connection test to ensure all tests run
Anchel123 Feb 24, 2026
0d98eda
Update graph data retrieval to use graphDesktop function for improved…
Anchel123 Feb 24, 2026
8462d3b
Fix canvas selection logic in handleDownloadImage for improved reliab…
Anchel123 Feb 24, 2026
d764425
Remove debug console logs from canvas tests for cleaner output
Anchel123 Feb 24, 2026
a204996
Remove stale data bug comments from canvas tests for clarity
Anchel123 Feb 24, 2026
80d7c4f
Update Playwright imports to use @playwright/test and remove outdated…
Anchel123 Feb 24, 2026
40eba8f
Enhance graph components with new link handling and update dependencies
Anchel123 Feb 24, 2026
11e1630
Refactor link curvature calculation in GraphView for improved scaling
Anchel123 Feb 24, 2026
5d7ecba
Update @falkordb/canvas to version 0.0.40 and refactor graph componen…
Anchel123 Feb 25, 2026
a7d8ef2
Update @falkordb/canvas dependency version to use caret notation for …
Anchel123 Feb 25, 2026
6cc12a2
fix pom
Naseem77 Feb 26, 2026
4e5be84
fix canvas tests
Naseem77 Feb 26, 2026
562b995
fix canvas tests
Naseem77 Feb 26, 2026
2b080c7
Implement feature X to enhance user experience and optimize performance
Anchel123 Feb 26, 2026
772431a
fix nodeDetailsPanel tests
Naseem77 Feb 26, 2026
fe5f159
Merge branch 'merge-main-to-staging' of https://github.com/FalkorDB/c…
Naseem77 Feb 26, 2026
b8d9403
fix build
Naseem77 Feb 26, 2026
665039b
fix playwright ci sharding
Naseem77 Feb 26, 2026
c68bae5
fix search Bar tests
Naseem77 Feb 26, 2026
de3dfd9
update @falkordb/canvas dependency to version 0.0.41
Anchel123 Feb 26, 2026
519e88d
fix search tests
Naseem77 Feb 26, 2026
00627b7
Merge branch 'merge-main-to-staging' of https://github.com/FalkorDB/c…
Naseem77 Feb 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
node-version: "24"
cache: ${{ steps.detect-package-manager.outputs.manager }}
- name: Restore cache
uses: actions/cache@v3
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shard: [1, 2]
Comment on lines +11 to +14
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deployment: Playwright test sharding is configured but not used. The test command on line 39 is missing the --shard flag, causing both jobs to run the full test suite.

services:
falkordb:
image: falkordb/falkordb:latest
Expand All @@ -17,7 +21,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
node-version: 24
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
Expand All @@ -32,15 +36,15 @@ jobs:
run: |
npm install
npm run build
NEXTAUTH_SECRET=SECRET npm start & npx playwright test --reporter=dot,list
NEXTAUTH_SECRET=SECRET npm start & npx playwright test --shard=${{ matrix.shard }}/2 --reporter=dot,list
- name: Ensure required directories exist
run: |
mkdir -p playwright-report
mkdir -p playwright-report/artifacts
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
name: playwright-report-shard-${{ matrix.shard }}
path: playwright-report/
retention-days: 30
- name: Upload failed test screenshots
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use a Node.js base image
FROM node:22
FROM node:24

# Set working directory
WORKDIR /app
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@ curl -X POST http://127.0.0.1:5000/analyze_folder \
-d '{"path": "<PATH_TO_LOCAL_REPO>", "ignore": ["./.github", "./sbin", "./.git", "./deps", "./bin", "./build"]}'
```

**Note:** Currently, Code-Graph supports analyzing C and Python source files.
Support for additional languages (e.g., JavaScript, Go, Java) is planned.
Note: At the moment code-graph can analyze both the Java & Python source files.
Support for additional languages e.g. C, JavaScript, Go is planned to be added
in the future.

### 5. Access the Web Interface

Expand Down
4 changes: 2 additions & 2 deletions app/api/repo/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export async function GET() {
return NextResponse.json({ result: repositories }, { status: 200 })
} catch (err) {
console.error(err)
return NextResponse.json((err as Error).message, { status: 400 })
return NextResponse.json(err instanceof Error ? err.message : String(err), { status: 400 })
}
}

Expand Down Expand Up @@ -57,6 +57,6 @@ export async function POST(request: NextRequest) {
return NextResponse.json({ message: "success" }, { status: 200 });
} catch (err) {
console.error(err)
return NextResponse.json((err as Error).message, { status: 400 });
return NextResponse.json(err instanceof Error ? err.message : String(err), { status: 400 });
}
}
212 changes: 212 additions & 0 deletions app/components/ForceGraph.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
"use client"

import { useCallback, useEffect, useState } from "react"
import type { Data, GraphLink, GraphNode } from "@falkordb/canvas"
import { GraphRef, PATH_COLOR } from "@/lib/utils"
import { GraphData, Link, Node } from "./model"

interface Props {
id: "desktop" | "mobile"
data: GraphData
canvasRef: GraphRef
onNodeClick: (node: Node, event: MouseEvent) => void
onNodeHover: (node: Node | null) => void
onNodeRightClick: (node: Node, event: MouseEvent) => void
isNodeSelected: (node: GraphNode) => boolean
onLinkClick: (link: Link, event: MouseEvent) => void
onLinkHover: (link: Link | null) => void
onLinkRightClick: (link: Link, event: MouseEvent) => void
isLinkSelected: (link: GraphLink) => boolean
onBackgroundClick: (event: MouseEvent) => void
onBackgroundRightClick: (event: MouseEvent) => void
nodeCanvasObject: (node: GraphNode, ctx: CanvasRenderingContext2D) => void
nodePointerAreaPaint: (node: GraphNode, color: string, ctx: CanvasRenderingContext2D) => void
linkLineDash: (link: any) => number[] | null
onZoom: () => void
onEngineStop: () => void
cooldownTicks: number | undefined
backgroundColor?: string
foregroundColor?: string
}

const convertToCanvasData = (graphData: GraphData): Data => ({
nodes: graphData.nodes.filter(n => n.visible).map(({ id, category, color, visible, isPath, isPathSelected, data }) => ({
id,
labels: [category],
color,
visible,
data: { ...data, isPath, isPathSelected }
})),
links: graphData.links.filter(l => l.visible).map(({ id, label, color, visible, source, target, isPath, isPathSelected, data }) => ({
id,
relationship: label,
color: isPath ? PATH_COLOR : color,
visible,
source,
target,
data: { ...data, isPath, isPathSelected }
}))
});

export default function ForceGraph({
id,
data,
canvasRef,
onNodeClick,
onNodeHover,
onNodeRightClick,
isNodeSelected,
onLinkClick,
onLinkHover,
onLinkRightClick,
isLinkSelected,
onBackgroundClick,
onBackgroundRightClick,
onZoom,
onEngineStop,
nodeCanvasObject,
nodePointerAreaPaint,
linkLineDash,
cooldownTicks,
backgroundColor = "#FFFFFF",
foregroundColor = "#000000"
}: Props) {
const [canvasLoaded, setCanvasLoaded] = useState(false)

// Load falkordb-canvas dynamically (client-only)
useEffect(() => {
import('@falkordb/canvas').then(() => {
setCanvasLoaded(true)
})
}, [])

useEffect(() => {
const canvas = canvasRef.current

if (!canvas) return

(window as any)[id === "desktop" ? "graphDesktop" : "graphMobile"] = () => canvas.getGraphData();
}, [canvasRef, id])

// Update canvas colors
useEffect(() => {
if (!canvasRef.current || !canvasLoaded) return
canvasRef.current.setBackgroundColor(backgroundColor)
canvasRef.current.setForegroundColor(foregroundColor)
}, [canvasRef, backgroundColor, foregroundColor, canvasLoaded])

// Update cooldown ticks
useEffect(() => {
if (!canvasRef.current || !canvasLoaded) return

canvasRef.current.setCooldownTicks(cooldownTicks === -1 ? undefined : cooldownTicks)
}, [canvasRef, cooldownTicks, canvasLoaded])

// Map node click handler
const handleNodeClick = useCallback((node: GraphNode, event: MouseEvent) => {
const originalNode = data.nodes.find(n => n.id === node.id)
if (originalNode) onNodeClick(originalNode, event)
}, [onNodeClick, data.nodes])

// Map node hover handler
const handleNodeHover = useCallback((node: GraphNode | null) => {
if (!node) {
onNodeHover(null)
return
}

const originalNode = data.nodes.find(n => n.id === node.id)

if (originalNode) onNodeHover(originalNode)
}, [onNodeHover, data.nodes])

// Map node right click handler
const handleNodeRightClick = useCallback((node: GraphNode, event: MouseEvent) => {
const originalNode = data.nodes.find(n => n.id === node.id)
if (originalNode) onNodeRightClick(originalNode, event)
}, [onNodeRightClick, data.nodes])

// Map link click handler
const handleLinkClick = useCallback((link: GraphLink, event: MouseEvent) => {
const originalLink = data.links.find(l => l.id === link.id)
if (originalLink) onLinkClick(originalLink, event)
}, [onLinkClick, data.links])

// Map link hover handler
const handleLinkHover = useCallback((link: GraphLink | null) => {
if (!link) {
onLinkHover(null)
return
}

const originalLink = data.links.find(l => l.id === link.id)

if (originalLink) onLinkHover(originalLink)
}, [onLinkHover, data.links])

// Map link right click handler
const handleLinkRightClick = useCallback((link: GraphLink, event: MouseEvent) => {
const originalLink = data.links.find(l => l.id === link.id)
if (originalLink) onLinkRightClick(originalLink, event)
}, [onLinkRightClick, data.links])

// Handle engine stop and set window.graph
const handleEngineStop = useCallback(() => {
onEngineStop()
}, [canvasRef, onEngineStop])

// Update event handlers
useEffect(() => {
if (!canvasRef.current || !canvasLoaded) return
canvasRef.current.setConfig({
autoStopOnSettle: false,
// nodes will display node.data.captionsKeys in the canvas
captionsKeys: ["name", "title"],
onNodeClick: handleNodeClick,
onNodeRightClick: handleNodeRightClick,
onNodeHover: handleNodeHover,
isNodeSelected: isNodeSelected,
onLinkClick: handleLinkClick,
onLinkRightClick: handleLinkRightClick,
onLinkHover: handleLinkHover,
isLinkSelected: isLinkSelected,
onBackgroundClick,
onBackgroundRightClick,
onEngineStop: handleEngineStop,
node: { nodeCanvasObject, nodePointerAreaPaint },
linkLineDash,
onZoom
})
}, [
handleNodeClick,
handleNodeRightClick,
handleNodeHover,
handleLinkClick,
handleLinkRightClick,
handleLinkHover,
isNodeSelected,
isLinkSelected,
onBackgroundClick,
onBackgroundRightClick,
handleEngineStop,
nodeCanvasObject,
nodePointerAreaPaint,
linkLineDash,
onZoom,
canvasRef,
canvasLoaded
])

// Update canvas data
useEffect(() => {
const canvas = canvasRef.current
if (!canvas || !canvasLoaded) return

const canvasData = convertToCanvasData(data)
canvas.setData(canvasData)
}, [canvasRef, data, canvasLoaded])

return (
<falkordb-canvas ref={canvasRef} node-mode="replace" />
)
}
Loading
Loading