A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.
feat: react force graph and realtime logs
dextmorgnd3ab27582b0c
diff --git a/flowsint-app/src/renderer/src/components/layout/secondary-navigation.tsx b/flowsint-app/src/renderer/src/components/layout/secondary-navigation.tsxindex a17d566e..ceb9ce0c 100644--- a/flowsint-app/src/renderer/src/components/layout/secondary-navigation.tsx+++ b/flowsint-app/src/renderer/src/components/layout/secondary-navigation.tsx@@ -3,21 +3,12 @@ import InvestigationList from "../investigations/investigation-list"import GraphNavigation from "../graphs/graph-navigation"import TransformNavigation from "../transforms/transform-navigation"import SketchList from "../investigations/sketch-list"-import WallNavigation from "../walls/wall-navigation"const SecondaryNavigation = () => {const { id, investigationId, type } = useParams({ strict: false })const { pathname } = useLocation()- if (pathname.includes("/dashboard/investigations/wall")) {- return (- <div className="grow w-full overflow-x-hidden">- <WallNavigation />- </div>- )- }-if (!investigationId && !id && !pathname.startsWith("/dashboard/transforms")) {return (<div className="grow w-full overflow-x-hidden">diff --git a/flowsint-app/src/renderer/src/components/layout/sidebar.tsx b/flowsint-app/src/renderer/src/components/layout/sidebar.tsxindex 53c1176e..8be3f367 100644--- a/flowsint-app/src/renderer/src/components/layout/sidebar.tsx+++ b/flowsint-app/src/renderer/src/components/layout/sidebar.tsx@@ -29,7 +29,7 @@ export function Sidebar() {const navItems: NavItem[] = [{ icon: Home, label: "Dashboard", href: "/dashboard" },{ icon: Fingerprint, label: "Cases", href: "/dashboard/investigations" },- { icon: BrickWall, label: "Walls", href: "/dashboard/investigations/wall" },+ // { icon: BrickWall, label: "Walls", href: "/dashboard/investigations/wall" },{ icon: Workflow, label: "Transforms", href: "/dashboard/transforms" },]diff --git a/flowsint-app/src/renderer/src/components/layout/status-bar.tsx b/flowsint-app/src/renderer/src/components/layout/status-bar.tsxindex 0cbb7ac8..4ecaf5af 100644--- a/flowsint-app/src/renderer/src/components/layout/status-bar.tsx+++ b/flowsint-app/src/renderer/src/components/layout/status-bar.tsx@@ -1,5 +1,5 @@import { Button } from "@/components/ui/button"-import { HelpCircle, Info, Terminal, Trash, Unlock } from "lucide-react"+import { HelpCircle, Terminal, Trash, Unlock } from "lucide-react"import { ModeToggle } from "../mode-toggle"import { useLayoutStore } from "@/stores/layout-store"import Legend from "../sketches/legend"diff --git a/flowsint-app/src/renderer/src/components/walls/annotation-node.tsx b/flowsint-app/src/renderer/src/components/walls/annotation-node.tsxdeleted file mode 100644index 5ea9cef4..00000000--- a/flowsint-app/src/renderer/src/components/walls/annotation-node.tsx+++ /dev/null@@ -1,88 +0,0 @@-import { forwardRef, HTMLAttributes } from "react";-import { cn } from "@/lib/utils";--/* ANNOTATION NODE ------------------------------------------------------------ A container for an annotation node.-*/--export type AnnotationNodeProps = HTMLAttributes<HTMLDivElement>;--export const AnnotationNode = forwardRef<HTMLDivElement, AnnotationNodeProps>(- ({ className, children, ...props }, ref) => {- return (- <div- ref={ref}- {...props}- className={cn(- "relative flex max-w-[180px] items-start p-2 text-sm text-secondary-foreground",- className,- )}- >- {children}- </div>- );- },-);--AnnotationNode.displayName = "AnnotationNode";--/* ANNOTATION NODE NUMBER ------------------------------------------------------ Renders the annotation node number.-*/--export type AnnotationNodeNumberProps = HTMLAttributes<HTMLDivElement>;--export const AnnotationNodeNumber = forwardRef<- HTMLDivElement,- AnnotationNodeNumberProps->(({ className, children, ...props }, ref) => {- return (- <div ref={ref} {...props} className={cn("mr-1 leading-snug", className)}>- {children}- </div>- );-});--AnnotationNodeNumber.displayName = "AnnotationNodeNumber";--/* ANNOTATION NODE CONTENT ----------------------------------------------------- Renders the main content of the annotation node.-*/--export type AnnotationNodeContentProps = HTMLAttributes<HTMLDivElement>;--export const AnnotationNodeContent = forwardRef<- HTMLDivElement,- AnnotationNodeContentProps->(({ className, children, ...props }, ref) => {- return (- <div ref={ref} {...props} className={cn("leading-snug", className)}>- {children}- </div>- );-});--AnnotationNodeContent.displayName = "AnnotationNodeContent";--/* ANNOTATION NODE ICON -------------------------------------------------------- Renders the icon for the annotation node.-*/--export type AnnotationNodeIconProps = HTMLAttributes<HTMLDivElement>;--export const AnnotationNodeIcon = forwardRef<- HTMLDivElement,- AnnotationNodeIconProps->(({ className, children, ...props }, ref) => {- return (- <div- ref={ref}- {...props}- className={cn("absolute bottom-0 right-2 text-2xl", className)}- >- {children}- </div>- );-});--AnnotationNodeIcon.displayName = "AnnotationNodeIcon";\ No newline at end of filediff --git a/flowsint-app/src/renderer/src/components/walls/base-node.tsx b/flowsint-app/src/renderer/src/components/walls/base-node.tsxdeleted file mode 100644index d8dd68fc..00000000--- a/flowsint-app/src/renderer/src/components/walls/base-node.tsx+++ /dev/null@@ -1,378 +0,0 @@-import { forwardRef, useCallback, HTMLAttributes, ReactNode, memo } from "react";-import { useNodeId, useReactFlow, NodeProps } from "@xyflow/react";-import { EllipsisVertical, Trash, MessageSquarePlus } from "lucide-react";-import { cn } from "@/lib/utils";-import { Slot } from "@radix-ui/react-slot";-import { Button } from "@/components/ui/button";-import {- DropdownMenu,- DropdownMenuTrigger,- DropdownMenuContent,-} from "@/components/ui/dropdown-menu";-import { BaseNode } from "@/components/ui/base-node";-import {- DropdownMenuItem,- DropdownMenuLabel,- DropdownMenuSeparator,-} from "@/components/ui/dropdown-menu";-import { Rocket } from "lucide-react";--/* NODE HEADER -------------------------------------------------------------- */--export type NodeHeaderProps = HTMLAttributes<HTMLElement>;--/**- * A container for a consistent header layout intended to be used inside the- * `<BaseNode />` component.- */-export const NodeHeader = forwardRef<HTMLElement, NodeHeaderProps>(- ({ className, ...props }, ref) => {- return (- <header- ref={ref}- {...props}- className={cn(- "flex items-center justify-between gap-2 px-3 py-2",- // Remove or modify these classes if you modify the padding in the- // `<BaseNode />` component.- className,- )}- />- );- },-);--NodeHeader.displayName = "NodeHeader";--/* NODE HEADER TITLE -------------------------------------------------------- */--export type NodeHeaderTitleProps = HTMLAttributes<HTMLHeadingElement> & {- asChild?: boolean;-};--/**- * The title text for the node. To maintain a native application feel, the title- * text is not selectable.- */-export const NodeHeaderTitle = forwardRef<- HTMLHeadingElement,- NodeHeaderTitleProps->(({ className, asChild, ...props }, ref) => {- const Comp = asChild ? Slot : "h3";-- return (- <Comp- ref={ref}- {...props}- className={cn(className, "user-select-none flex-1 font-semibold")}- />- );-});--NodeHeaderTitle.displayName = "NodeHeaderTitle";--/* NODE HEADER ICON --------------------------------------------------------- */--export type NodeHeaderIconProps = HTMLAttributes<HTMLSpanElement>;--export const NodeHeaderIcon = forwardRef<HTMLSpanElement, NodeHeaderIconProps>(- ({ className, ...props }, ref) => {- return (- <span ref={ref} {...props} className={cn(className, "[&>*]:size-5")} />- );- },-);--NodeHeaderIcon.displayName = "NodeHeaderIcon";--/* NODE HEADER ACTIONS ------------------------------------------------------ */--export type NodeHeaderActionsProps = HTMLAttributes<HTMLDivElement>;--/**- * A container for right-aligned action buttons in the node header.- */-export const NodeHeaderActions = forwardRef<- HTMLDivElement,- NodeHeaderActionsProps->(({ className, ...props }, ref) => {- return (- <div- ref={ref}- {...props}- className={cn(- "ml-auto flex items-center gap-1 justify-self-end",- className,- )}- />- );-});--NodeHeaderActions.displayName = "NodeHeaderActions";--/* NODE HEADER ACTION ------------------------------------------------------- */--export type NodeHeaderActionProps = any & {- label: string;-};--/**- * A thin wrapper around the `<Button />` component with a fixed sized suitable- * for icons.- *- * Because the `<NodeHeaderAction />` component is intended to render icons, it's- * important to provide a meaningful and accessible `label` prop that describes- * the action.- */-export const NodeHeaderAction = forwardRef<- HTMLButtonElement,- NodeHeaderActionProps->(({ className, label, title, ...props }, ref) => {- return (- <Button- ref={ref}- variant="ghost"- aria-label={label}- title={title ?? label}- className={cn(className, "nodrag size-6 p-1")}- {...props}- />- );-});--NodeHeaderAction.displayName = "NodeHeaderAction";--//--export type NodeHeaderMenuActionProps = Omit<- NodeHeaderActionProps,- "onClick"-> & {- trigger?: ReactNode;-};--/**- * Renders a header action that opens a dropdown menu when clicked. The dropdown- * trigger is a button with an ellipsis icon. The trigger's content can be changed- * by using the `trigger` prop.- *- * Any children passed to the `<NodeHeaderMenuAction />` component will be rendered- * inside the dropdown menu. You can read the docs for the shadcn dropdown menu- * here: https://ui.shadcn.com/docs/components/dropdown-menu- *- */-export const NodeHeaderMenuAction = forwardRef<- HTMLButtonElement,- NodeHeaderMenuActionProps->(({ trigger, children, ...props }, ref) => {- return (- <DropdownMenu>- <DropdownMenuTrigger asChild>- <div>- <NodeHeaderAction ref={ref} {...props}>- {trigger ?? <EllipsisVertical />}- </NodeHeaderAction>- </div>- </DropdownMenuTrigger>- <DropdownMenuContent>{children}</DropdownMenuContent>- </DropdownMenu>- );-});--NodeHeaderMenuAction.displayName = "NodeHeaderMenuAction";--/* NODE HEADER DELETE ACTION --------------------------------------- */--export const NodeHeaderDeleteAction = () => {- const id = useNodeId();- const { setNodes } = useReactFlow();-- const handleClick = useCallback(() => {- setNodes((prevNodes) => prevNodes.filter((node) => node.id !== id));- }, [id, setNodes]);-- return (- <NodeHeaderAction onClick={handleClick} variant="ghost" label="Delete node">- <Trash />- </NodeHeaderAction>- );-};--NodeHeaderDeleteAction.displayName = "NodeHeaderDeleteAction";--/* ANNOTATION NODE ------------------------------------------------------------ A container for an annotation node.-*/--export type AnnotationNodeProps = HTMLAttributes<HTMLDivElement>;--export const AnnotationNode = forwardRef<HTMLDivElement, AnnotationNodeProps>(- ({ className, children, ...props }, ref) => {- return (- <div- ref={ref}- {...props}- className={cn(- "relative flex max-w-[180px] items-start p-2 text-sm text-secondary-foreground",- className,- )}- >- {children}- </div>- );- },-);--AnnotationNode.displayName = "AnnotationNode";--/* ANNOTATION NODE NUMBER ------------------------------------------------------ Renders the annotation node number.-*/--export type AnnotationNodeNumberProps = HTMLAttributes<HTMLDivElement>;--export const AnnotationNodeNumber = forwardRef<- HTMLDivElement,- AnnotationNodeNumberProps->(({ className, children, ...props }, ref) => {- return (- <div ref={ref} {...props} className={cn("mr-1 leading-snug", className)}>- {children}- </div>- );-});--AnnotationNodeNumber.displayName = "AnnotationNodeNumber";--/* ANNOTATION NODE CONTENT ----------------------------------------------------- Renders the main content of the annotation node.-*/--export type AnnotationNodeContentProps = HTMLAttributes<HTMLDivElement>;--export const AnnotationNodeContent = forwardRef<- HTMLDivElement,- AnnotationNodeContentProps->(({ className, children, ...props }, ref) => {- return (- <div ref={ref} {...props} className={cn("leading-snug", className)}>- {children}- </div>- );-});--AnnotationNodeContent.displayName = "AnnotationNodeContent";--/* ANNOTATION NODE ICON -------------------------------------------------------- Renders the icon for the annotation node.-*/--export type AnnotationNodeIconProps = HTMLAttributes<HTMLDivElement>;--export const AnnotationNodeIcon = forwardRef<- HTMLDivElement,- AnnotationNodeIconProps->(({ className, children, ...props }, ref) => {- return (- <div- ref={ref}- {...props}- className={cn("absolute bottom-0 right-2 text-2xl", className)}- >- {children}- </div>- );-});--AnnotationNodeIcon.displayName = "AnnotationNodeIcon";--interface AnnotationNodeData {- type: 'annotation';- number?: string | number;- content: ReactNode;- icon?: ReactNode;-}--interface BaseNodeData {- type?: string;- title?: string;- content?: ReactNode;-}--type CustomNodeData = AnnotationNodeData | BaseNodeData;--const isAnnotationNode = (data: CustomNodeData): data is AnnotationNodeData => {- return data.type === 'annotation';-};--const CustomNode = memo(({ selected, data }: NodeProps) => {- const { setNodes, getNodes } = useReactFlow();- const nodeId = useNodeId();-- const handleAddAnnotation = useCallback(() => {- const nodes = getNodes();- const currentNode = nodes.find(n => n.id === nodeId);- if (!currentNode) return;-- const annotationId = `annotation-${Date.now()}`;- const annotationNode = {- id: annotationId,- type: 'custom',- position: {- x: currentNode.position.x + 200,- y: currentNode.position.y- },- data: {- type: 'annotation',- content: 'New annotation',- number: nodes.filter(n => n.data?.type === 'annotation').length + 1- }- };-- setNodes(nodes => [...nodes, annotationNode]);- }, [nodeId, getNodes, setNodes]);-- if (!data) return null;-- const customData = data as CustomNodeData;-- if (isAnnotationNode(customData)) {- return (- <AnnotationNode>- {customData.number && <AnnotationNodeNumber>{customData.number}</AnnotationNodeNumber>}- <AnnotationNodeContent>{customData.content}</AnnotationNodeContent>- {customData.icon && <AnnotationNodeIcon>{customData.icon}</AnnotationNodeIcon>}- </AnnotationNode>- );- }-- return (- <BaseNode selected={selected} className="px-3 py-2 border">- <NodeHeader className="-mx-3 -mt-2 border-b">- <NodeHeaderIcon>- <Rocket />- </NodeHeaderIcon>- <NodeHeaderTitle>{customData.title || 'Node Title'}</NodeHeaderTitle>- <NodeHeaderActions>- <NodeHeaderMenuAction label="Expand account options">- <DropdownMenuLabel>Node Actions</DropdownMenuLabel>- <DropdownMenuSeparator />- <DropdownMenuItem onClick={handleAddAnnotation}>- <MessageSquarePlus className="mr-2 h-4 w-4" />- Add Annotation- </DropdownMenuItem>- <DropdownMenuSeparator />- <DropdownMenuItem>Profile</DropdownMenuItem>- <DropdownMenuItem>Billing</DropdownMenuItem>- <DropdownMenuItem>Team</DropdownMenuItem>- <DropdownMenuItem>Subscription</DropdownMenuItem>- </NodeHeaderMenuAction>- <NodeHeaderDeleteAction />- </NodeHeaderActions>- </NodeHeader>- <div className="mt-2">{customData.content || 'Node Content'}</div>- </BaseNode>- );-});--export default CustomNode;\ No newline at end of filediff --git a/flowsint-app/src/renderer/src/components/walls/controls.tsx b/flowsint-app/src/renderer/src/components/walls/controls.tsxdeleted file mode 100644index 12cab8c9..00000000--- a/flowsint-app/src/renderer/src/components/walls/controls.tsx+++ /dev/null@@ -1,110 +0,0 @@-"use client"--import { Button } from "@/components/ui/button"-import { Panel } from "@xyflow/react"-import { Save, Trash2, ZoomIn, ZoomOut, Maximize, LayoutGrid } from "lucide-react"-import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"--interface FlowControlsProps {- loading: boolean- handleSaveWall: () => void- handleDeleteWall: () => void- onLayout: () => void- fitView: () => void- zoomIn: () => void- zoomOut: () => void- isSaved: boolean,- wall?: any-}--export function FlowControls({- loading,- handleSaveWall,- handleDeleteWall,- onLayout,- fitView,- zoomIn,- zoomOut,- isSaved,- wall-}: FlowControlsProps) {- return (- <TooltipProvider>- <Panel position="bottom-right" className="flex gap-2 mt-28 mr-2 z-40">- <Tooltip>- <TooltipTrigger asChild>- <Button variant="outline" size="icon" className="bg-card" onClick={handleSaveWall} disabled={loading}>- <Save className="h-4 w-4" />- </Button>- </TooltipTrigger>- <TooltipContent>- <p>Save Wall</p>- </TooltipContent>- </Tooltip>-- {isSaved && (- <Tooltip>- <TooltipTrigger asChild>- <Button- variant="outline"- size="icon"- className="bg-card"- onClick={handleDeleteWall}- disabled={loading}- >- <Trash2 className="h-4 w-4" />- </Button>- </TooltipTrigger>- <TooltipContent>- <p>Delete Wall</p>- </TooltipContent>- </Tooltip>- )}-- <Tooltip>- <TooltipTrigger asChild>- <Button variant="outline" size="icon" className="bg-card" onClick={onLayout}>- <LayoutGrid className="h-4 w-4" />- </Button>- </TooltipTrigger>- <TooltipContent>- <p>Auto Layout</p>- </TooltipContent>- </Tooltip>-- <Tooltip>- <TooltipTrigger asChild>- <Button variant="outline" size="icon" className="bg-card" onClick={fitView}>- <Maximize className="h-4 w-4" />- </Button>- </TooltipTrigger>- <TooltipContent>- <p>Fit View</p>- </TooltipContent>- </Tooltip>-- <Tooltip>- <TooltipTrigger asChild>- <Button variant="outline" size="icon" className="bg-card" onClick={zoomIn}>- <ZoomIn className="h-4 w-4" />- </Button>- </TooltipTrigger>- <TooltipContent>- <p>Zoom In</p>- </TooltipContent>- </Tooltip>-- <Tooltip>- <TooltipTrigger asChild>- <Button variant="outline" size="icon" className="bg-card" onClick={zoomOut}>- <ZoomOut className="h-4 w-4" />- </Button>- </TooltipTrigger>- <TooltipContent>- <p>Zoom Out</p>- </TooltipContent>- </Tooltip>- </Panel>- </TooltipProvider>- )-}diff --git a/flowsint-app/src/renderer/src/components/walls/details-panel.tsx b/flowsint-app/src/renderer/src/components/walls/details-panel.tsxdeleted file mode 100644index 7fc77531..00000000--- a/flowsint-app/src/renderer/src/components/walls/details-panel.tsx+++ /dev/null@@ -1,53 +0,0 @@-"use client"-import { memo } from "react"-import { cn } from "@/lib/utils"-import { CopyButton } from "@/components/copy"--export default function DetailsPanel({ data }: { data: any }) {- return (- <div className="overflow-y-auto overflow-x-hidden w-full min-w-0 h-full min-h-0">- <div className="flex items-center sticky w-full bg-card top-0 border-b justify-start px-4 py-2 gap-2 z-50">- <h1 className="text-md font-semibold truncate">{data?.label}</h1>- <div className="grow" />- <div className="flex items-center gap-2">- {/* <LaunchTransform values={[data.label]} type={data?.type} /> */}- </div>- </div>- <KeyValueDisplay data={data} />- </div>- )-}--interface KeyValueDisplayProps {- data: Record<string, any>- className?: string-}--function KeyValueDisplay({ data, className }: KeyValueDisplayProps) {- return (- <div className={cn("w-full border-collapse", className)}>- {data && Object.entries(data)- .filter(([key]) => !["sketch_id", "caption", "size", "color"].includes(key))- .map(([key, value], index) => {- const val = Array.isArray(value) ? `${value.length} items` : value?.toString() || null- const display = (typeof val === "string" && val.startsWith("https://"))- ? <a href={val} className="underline text-primary truncate" target="_blank" rel="noopener noreferrer">{val}</a>- : val- return (- <div- key={index}- className="flex w-full bg-card items-center divide-x divide-border border-b border-border p-0"- >- <div className="w-1/2 px-4 p-2 text-sm text-muted-foreground font-normal truncate">{key}</div>- <div className="w-1/2 px-4 p-2 text-sm font-medium flex items-center justify-between min-w-0">- <div className="truncate font-semibold">{display || <span className="italic text-muted-foreground">N/A</span>}</div>- {display && <CopyButton className="h-6 w-6 shrink-0" content={val} />}- </div>- </div>- )- })}- </div>- )-}--export const MemoizedKeyValueDisplay = memo(KeyValueDisplay)diff --git a/flowsint-app/src/renderer/src/components/walls/investigations-wall.tsx b/flowsint-app/src/renderer/src/components/walls/investigations-wall.tsxdeleted file mode 100644index d6af9f24..00000000--- a/flowsint-app/src/renderer/src/components/walls/investigations-wall.tsx+++ /dev/null@@ -1,192 +0,0 @@-import { useCallback, useState } from "react"-import {- ReactFlow,- Background,- MiniMap,- Node,- Connection,- addEdge,- useNodesState,- useEdgesState,- useReactFlow,- ReactFlowProvider-} from "@xyflow/react"-import "@xyflow/react/dist/style.css"-import { useWallStore } from "@/stores/wall-store"-import CustomNode from "./base-node";-import { FlowControls } from "./controls"-import { useTheme } from "../theme-provider"--const nodeTypes = {- custom: CustomNode,-};--function FlowContent() {- const [loading, setLoading] = useState(false)- const reactFlowInstance = useReactFlow()- const initialNodes = useWallStore(s => s.nodes)- const initialEdges = useWallStore(s => s.edges)- const onNodesChange = useWallStore(s => s.onNodesChange)- const onEdgesChange = useWallStore(s => s.onEdgesChange)- const onConnect = useWallStore(s => s.onConnect)- const setCurrentNode = useWallStore(s => s.setCurrentNode)- const setSelectedNodes = useWallStore(s => s.setSelectedNodes)- const saveWall = useWallStore(s => s.saveWall)- const deleteWall = useWallStore(s => s.deleteWall)-- const { theme } = useTheme()-- const [nodes, setNodes, onNodesChangeLocal] = useNodesState(initialNodes)- const [edges, setEdges, onEdgesChangeLocal] = useEdgesState(initialEdges)-- const handleSaveWall = useCallback(async () => {- setLoading(true)- try {- await saveWall(nodes, edges)- } catch (error) {- console.error('Failed to save wall:', error)- } finally {- setLoading(false)- }- }, [nodes, edges, saveWall])-- const handleDeleteWall = useCallback(async () => {- setLoading(true)- try {- await deleteWall()- } catch (error) {- console.error('Failed to delete wall:', error)- } finally {- setLoading(false)- }- }, [deleteWall])-- const onLayout = useCallback(() => {- if (!reactFlowInstance) return- const { fitView } = reactFlowInstance- // You can implement your own layout logic here- // For now, we'll just fit the view- fitView({ duration: 800 })- }, [reactFlowInstance])-- const handleNodesChange = useCallback(- (changes: any) => {- onNodesChangeLocal(changes)- onNodesChange(changes)- },- [onNodesChangeLocal, onNodesChange]- )-- const handleEdgesChange = useCallback(- (changes: any) => {- onEdgesChangeLocal(changes)- onEdgesChange(changes)- },- [onEdgesChangeLocal, onEdgesChange]- )-- const handleConnect = useCallback(- (connection: Connection) => {- setEdges((eds) => addEdge(connection, eds))- onConnect(connection)- },- [setEdges, onConnect]- )-- const onDragOver = useCallback((event: React.DragEvent<HTMLDivElement>) => {- event.preventDefault()- event.dataTransfer.dropEffect = "move"- }, [])-- const onDrop = useCallback(- (event: React.DragEvent<HTMLDivElement>) => {- event.preventDefault()-- const reactFlowBounds = event.currentTarget.getBoundingClientRect()- const data = JSON.parse(event.dataTransfer.getData("text/plain"))-- const position = {- x: event.clientX - reactFlowBounds.left,- y: event.clientY - reactFlowBounds.top,- }-- const newNode: Node = {- id: `${data.type}-${Date.now()}`,- type: "custom",- position,- data: { ...data },- }-- setNodes((nds) => nds.concat(newNode))- onNodesChange([{ type: "add", item: newNode }])- setCurrentNode(newNode)- },- [setNodes, onNodesChange, setCurrentNode]- )-- const onNodeClick = useCallback(- (_: React.MouseEvent, node: Node) => {- setCurrentNode(node)- },- [setCurrentNode]- )-- const onSelectionChange = useCallback(- ({ nodes }: { nodes: Node[] }) => {- setSelectedNodes(nodes)- },- [setSelectedNodes]- )-- const onPaneClick = useCallback(- () => {- setCurrentNode(null)- setSelectedNodes([])- },- [setCurrentNode, setSelectedNodes]- )-- return (- <div className="h-full w-full flex flex-col">- <div className="flex-1 w-full h-full bg-background">- <ReactFlow- nodes={nodes}- proOptions={{ hideAttribution: true }}- edges={edges}- colorMode={theme}- nodeTypes={nodeTypes}- onNodesChange={handleNodesChange}- onEdgesChange={handleEdgesChange}- onConnect={handleConnect}- onDragOver={onDragOver}- onDrop={onDrop}- onNodeClick={onNodeClick}- onPaneClick={onPaneClick}- onSelectionChange={onSelectionChange}- fitView- >- <Background bgColor="var(--background)" />- <FlowControls- loading={loading}- handleSaveWall={handleSaveWall}- handleDeleteWall={handleDeleteWall}- onLayout={onLayout}- fitView={() => reactFlowInstance?.fitView({ duration: 800 })}- zoomIn={() => reactFlowInstance?.zoomIn({ duration: 800 })}- zoomOut={() => reactFlowInstance?.zoomOut({ duration: 800 })}- isSaved={true}- />- <MiniMap position="bottom-left" />- </ReactFlow>- </div>- </div>- )-}--export default function InvestigationsWall() {- return (- <ReactFlowProvider>- <FlowContent />- </ReactFlowProvider>- )-}\ No newline at end of filediff --git a/flowsint-app/src/renderer/src/components/walls/nodes-panel.tsx b/flowsint-app/src/renderer/src/components/walls/nodes-panel.tsxdeleted file mode 100644index eb9f1fc5..00000000--- a/flowsint-app/src/renderer/src/components/walls/nodes-panel.tsx+++ /dev/null@@ -1,359 +0,0 @@-import type React from "react"-import { memo, useMemo, useState, useCallback, useRef } from "react"-import { useVirtualizer } from '@tanstack/react-virtual'-import { Button } from "@/components/ui/button"-import { Badge } from "@/components/ui/badge"-import { TypeBadge } from "@/components/type-badge"-import { Search, FilterIcon, XIcon } from "lucide-react"-import { usePlatformIcons } from "@/hooks/use-platform-icons"-import { Input } from "@/components/ui/input"-import { actionItems } from "@/lib/action-items"-import { cn } from "@/lib/utils"-import {- DropdownMenu,- DropdownMenuContent,- DropdownMenuItem,- DropdownMenuLabel,- DropdownMenuSeparator,- DropdownMenuTrigger,-} from "@/components/ui/dropdown-menu"-import type { NodeData } from "@/types"-import { Checkbox } from "@/components/ui/checkbox"-import { useWallStore } from "@/stores/wall-store"--// Hauteur fixe pour chaque item (en pixels)-const ITEM_HEIGHT = 40--// Mémoiser le composant SocialNode-const SocialNode = memo(- ({- node,- setCurrentNode,- onCheckboxChange,- isNodeChecked,- }: {- node: any- setCurrentNode: (node: NodeData) => void- onCheckboxChange: (node: NodeData, checked: boolean) => void- isNodeChecked: (nodeId: string) => boolean- }) => {- const platformsIcons = usePlatformIcons()- const platformIcon = useMemo(() => {- // @ts-ignore- return platformsIcons?.[node?.data?.platform]?.icon- }, [platformsIcons, node?.data?.platform])-- const handleClick = useCallback(() => setCurrentNode(node), [node, setCurrentNode])-- const handleCheckboxChange = useCallback(- (checked: boolean) => {- onCheckboxChange(node, checked)- },- [node, onCheckboxChange],- )-- return (- <div className="flex items-center border-b h-full">- <div className="pl-2">- <Checkbox checked={isNodeChecked(node.id)} onCheckedChange={handleCheckboxChange} className="mr-1" />- </div>- <Button- variant={"ghost"}- className={cn(- "flex-1 flex items-center justify-start p-4 !py-5 rounded-none text-left border-l-2 border-l-transparent h-full gap-2"- )}- onClick={handleClick}- >- <Badge variant="secondary" className="h-7 w-7 p-0 rounded-full flex-shrink-0">- {platformIcon}- </Badge>- <div className="min-w-0 grow truncate text-ellipsis">- {node?.data?.username || <span className="italic opacity-60">Unknown</span>}- </div>- <div className="flex-shrink-0">- <TypeBadge type={node?.data?.type as string} />- </div>- </Button>- </div>- )- },-)--// Mémoiser le composant NodeRenderer-const NodeRenderer = memo(- ({- node,- setCurrentNode,- onCheckboxChange,- isNodeChecked,- }: {- node: any- setCurrentNode: (node: NodeData) => void- onCheckboxChange: (node: NodeData, checked: boolean) => void- isNodeChecked: (nodeId: string) => boolean- }) => {- const handleClick = useCallback(() => setCurrentNode(node), [node, setCurrentNode])- const handleCheckboxChange = useCallback(- (checked: boolean) => {- onCheckboxChange(node, checked)- },- [node, onCheckboxChange],- )-- if (node.data?.type === "social") {- return (- <SocialNode- setCurrentNode={setCurrentNode}- node={node}- onCheckboxChange={onCheckboxChange}- isNodeChecked={isNodeChecked}- />- )- }-- return (- <div className="flex items-center hover:bg-muted border-b h-full">- <div className="pl-2">- <Checkbox checked={isNodeChecked(node.id)} onCheckedChange={handleCheckboxChange} className="mr-1 border-border" />- </div>- <Button- variant={"ghost"}- className={cn(- "flex-1 flex truncate items-center justify-start p-4 !py-5 rounded-none text-left border-l-2 border-l-transparent h-full",- )}- onClick={handleClick}- >- <div className="grow truncate text-ellipsis">{node?.data?.label}</div>- <TypeBadge type={node?.data?.type} />- </Button>- </div>- )- },-)--// Composant pour un item virtualisé-const VirtualizedItem = memo(({- node,- setCurrentNode,- onCheckboxChange,- isNodeChecked-}: {- index: number- node: NodeData- setCurrentNode: (node: NodeData) => void- onCheckboxChange: (node: NodeData, checked: boolean) => void- isNodeChecked: (nodeId: string) => boolean-}) => {- return (- <NodeRenderer- node={node}- setCurrentNode={setCurrentNode}- onCheckboxChange={onCheckboxChange}- isNodeChecked={isNodeChecked}- />- )-})--const NodesPanel = memo(({ nodes, isLoading }: { nodes: NodeData[]; isLoading?: boolean }) => {- const setCurrentNode = useWallStore((state) => state.setCurrentNode)- const setSelectedNodes = useWallStore((state) => state.setSelectedNodes)- const selectedNodes = useWallStore((state) => state.selectedNodes || [])- const [searchQuery, setSearchQuery] = useState<string>("")- const [filters, setFilters] = useState<null | string[]>(null)-- // Ref pour le conteneur parent du virtualizer- const parentRef = useRef<HTMLDivElement>(null)-- const filteredNodes = useMemo(() => {- const searchText = searchQuery.toLowerCase()- return nodes?.filter((node) => {- const matchesSearch =- //@ts-ignore- node?.data?.label?.toLowerCase().includes(searchText) || node?.id?.toLowerCase().includes(searchText)-- const matchesFilter = !filters || filters.includes(node?.data?.type as string)-- return matchesSearch && matchesFilter- })- }, [nodes, searchQuery, filters])-- // Configuration du virtualizer- const virtualizer = useVirtualizer({- count: filteredNodes?.length || 0,- getScrollElement: () => parentRef.current,- estimateSize: () => ITEM_HEIGHT,- overscan: 5, // Nombre d'éléments à pré-rendre en dehors de la zone visible- })-- const toggleFilter = useCallback((filter: string | null) => {- if (filter === null) {- setFilters(null)- } else {- setFilters((prev) => {- if (prev === null) return [filter]- const next = prev.includes(filter) ? prev.filter((f) => f !== filter) : [...prev, filter]- return next.length === 0 ? null : next- })- }- }, [])-- const handleSearchChange = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {- setSearchQuery(e.target.value)- }, [])-- const clearFilters = useCallback(() => {- setFilters(null)- }, [])-- const isNodeChecked = useCallback(- (nodeId: string) => {- return selectedNodes.some((node) => node.id === nodeId)- },- [selectedNodes],- )-- const handleCheckboxChange = useCallback(- (node: NodeData, checked: boolean) => {- if (checked) {- setSelectedNodes([...selectedNodes.filter((n) => n.id !== node.id), node])- } else {- setSelectedNodes(selectedNodes.filter((n) => n.id !== node.id))- }- },- [selectedNodes, setSelectedNodes],- )-- return (- <div className="overflow-hidden bg-card h-full flex flex-col w-full !p-0 !m-0">- {/* Header fixe */}- <div className="sticky border-b top-0 p-2 bg-card z-10 flex-shrink-0">- <div className="flex items-center gap-2">- <Badge className="h-7" variant={"outline"}>- <span className="font-semibold">- {(filters?.length || searchQuery) ? `${filteredNodes?.length} / ${nodes?.length || 0}` : nodes?.length || 0}</span>{" "}- <span className="font-normal opacity-60">nodes</span>- </Badge>- <div className="relative grow">- <Search className="absolute left-2.5 top-1.5 h-4 w-4 text-muted-foreground" />- <Input- type="search"- placeholder="Search..."- className="pl-8 h-7 border-border"- value={searchQuery}- onChange={handleSearchChange}- />- </div>- <DropdownMenu>- <div>- <DropdownMenuTrigger asChild>- <div>- <Button variant={"outline"} className="h-7 w-8 relative border-border border" size={"icon"}>- <FilterIcon className={cn("opacity-60 h-3 w-3", filters && "opacity-100")} />- {filters && (- <Badge className="absolute -top-2 -right-1 text-xs rounded-full h-4 w-4 text-white" variant={"default"}>- {filters.length}- </Badge>- )}- </Button>- </div>- </DropdownMenuTrigger>- </div>- <DropdownMenuContent className="w-48 max-h-[50vh] space-y-1 overflow-y-auto">- <DropdownMenuLabel>- {filters ? (- <Badge variant={"outline"} className="flex items-center gap-1 pr-1">- {filters?.length} filter(s)- <Button size={"icon"} variant={"ghost"} className="h-5 w-5 rounded-full" onClick={clearFilters}>- <XIcon className="h-3 w-3" />- </Button>- </Badge>- ) : (- "filters"- )}- </DropdownMenuLabel>- <DropdownMenuSeparator />- <DropdownMenuItem className={cn(filters == null && "bg-primary")} onClick={() => toggleFilter(null)}>- All- </DropdownMenuItem>- {actionItems.map((item) => (- <DropdownMenuItem- className={cn(filters?.includes(item?.type) && "bg-primary/30")}- key={item.id}- onClick={() => toggleFilter(item?.type)}- >- {item?.type || "unknown"}- </DropdownMenuItem>- ))}- </DropdownMenuContent>- </DropdownMenu>- </div>- </div>-- {/* Contenu principal */}- <div className="flex-1 min-h-0">- {!isLoading && filteredNodes?.length === 0 && searchQuery === "" && (- <div className="text-sm p-4 text-center">- <p className="border rounded-md border-dashed p-4 text-center">- Drag and drop you first node in the "items" section.- </p>- </div>- )}- {/* {isLoading || !filteredNodes?.length && (- <div className="p-2"><SkeletonList rowCount={7} /></div>- )} */}-- {filteredNodes?.length === 0 && searchQuery && (- <div className="p-4 text-center text-muted-foreground">- No nodes match your search- </div>- )}-- {/* Liste virtualisée */}- {!isLoading && filteredNodes && filteredNodes.length > 0 && (- <div- ref={parentRef}- className="h-full overflow-auto"- style={{- contain: 'strict',- }}- >- <div- style={{- height: `${virtualizer.getTotalSize()}px`,- width: '100%',- position: 'relative',- }}- >- {virtualizer.getVirtualItems().map((virtualItem) => {- const node = filteredNodes[virtualItem.index]- return (- <div- key={virtualItem.key}- style={{- position: 'absolute',- top: 0,- left: 0,- width: '100%',- height: `${virtualItem.size}px`,- transform: `translateY(${virtualItem.start}px)`,- }}- >- <VirtualizedItem- index={virtualItem.index}- node={node}- setCurrentNode={setCurrentNode}- onCheckboxChange={handleCheckboxChange}- isNodeChecked={isNodeChecked}- />- </div>- )- })}- </div>- </div>- )}- </div>- </div>- )-})--export default NodesPanel\ No newline at end of filediff --git a/flowsint-app/src/renderer/src/components/walls/wall-navigation.tsx b/flowsint-app/src/renderer/src/components/walls/wall-navigation.tsxdeleted file mode 100644index 14e57632..00000000--- a/flowsint-app/src/renderer/src/components/walls/wall-navigation.tsx+++ /dev/null@@ -1,64 +0,0 @@-import NodesPanel from "./nodes-panel"-import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"-import { UserPlus, Users } from "lucide-react"-import { ItemsPanel } from "../graphs/items-panel"-import DetailsPanel from "./details-panel"-import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "../ui/resizable"-import { useWallStore } from "@/stores/wall-store"-import { NodeData } from "@/types"--const WallNavigation = () => {- const nodes = useWallStore((s) => s.nodes)- const currentNode = useWallStore((s) => s.currentNode)-- return (- <div className="h-full w-full min-h-0">- <Tabs defaultValue="entities" className="w-full h-full gap-0 flex flex-col min-w-0">- <TabsList className="w-full p-0 rounded-none my-0 border-b">- <TabsTrigger value="entities"><Users className="h-3 w-3 opacity-60" /> Entities</TabsTrigger>- <TabsTrigger value="items"><UserPlus className="h-3 w-3 opacity-60" /> Items</TabsTrigger>- </TabsList>- <TabsContent- value="entities"- className="grow flex flex-col min-h-0 min-w-0 overflow-hidden"- >- <ResizablePanelGroup- autoSaveId="conditional"- direction="vertical"- className="flex-1 min-h-0 flex w-full flex-col"- >- {currentNode && (- <>- <ResizablePanel- order={2}- id="infos"- defaultSize={30}- className="flex flex-col w-full overflow-hidden min-h-0 min-w-0"- >- <DetailsPanel data={currentNode.data} />- </ResizablePanel>- <ResizableHandle />- </>- )}- <ResizablePanel- order={3}- id="nodes"- defaultSize={40}- className="flex flex-col overflow-hidden min-h-0 min-w-0"- >- <NodesPanel nodes={nodes as NodeData[]} />- </ResizablePanel>- </ResizablePanelGroup>- </TabsContent>- <TabsContent- value="items"- className="my-0 grow h-full overflow-hidden min-h-0"- >- <ItemsPanel />- </TabsContent>- </Tabs>- </div>- )-}--export default WallNavigationdiff --git a/flowsint-app/src/renderer/src/routeTree.gen.ts b/flowsint-app/src/renderer/src/routeTree.gen.tsindex f8e9e0dd..cca52a19 100644--- a/flowsint-app/src/renderer/src/routeTree.gen.ts+++ b/flowsint-app/src/renderer/src/routeTree.gen.ts@@ -24,7 +24,6 @@ import { Route as AuthDashboardToolsImport } from './routes/_auth.dashboard.toolimport { Route as AuthDashboardTransformsIndexImport } from './routes/_auth.dashboard.transforms.index'import { Route as AuthDashboardInvestigationsIndexImport } from './routes/_auth.dashboard.investigations.index'import { Route as AuthDashboardTransformsTransformIdImport } from './routes/_auth.dashboard.transforms.$transformId'-import { Route as AuthDashboardInvestigationsWallImport } from './routes/_auth.dashboard.investigations.wall'import { Route as AuthDashboardInvestigationsInvestigationIdIndexImport } from './routes/_auth.dashboard.investigations.$investigationId.index'import { Route as AuthDashboardInvestigationsInvestigationIdTypeIdImport } from './routes/_auth.dashboard.investigations.$investigationId.$type.$id'@@ -108,13 +107,6 @@ const AuthDashboardTransformsTransformIdRoute =getParentRoute: () => AuthDashboardRoute,} as any)-const AuthDashboardInvestigationsWallRoute =- AuthDashboardInvestigationsWallImport.update({- id: '/investigations/wall',- path: '/investigations/wall',- getParentRoute: () => AuthDashboardRoute,- } as any)-const AuthDashboardInvestigationsInvestigationIdIndexRoute =AuthDashboardInvestigationsInvestigationIdIndexImport.update({id: '/investigations/$investigationId/',@@ -196,13 +188,6 @@ declare module '@tanstack/react-router' {preLoaderRoute: typeof AuthDashboardIndexImportparentRoute: typeof AuthDashboardImport}- '/_auth/dashboard/investigations/wall': {- id: '/_auth/dashboard/investigations/wall'- path: '/investigations/wall'- fullPath: '/dashboard/investigations/wall'- preLoaderRoute: typeof AuthDashboardInvestigationsWallImport- parentRoute: typeof AuthDashboardImport- }'/_auth/dashboard/transforms/$transformId': {id: '/_auth/dashboard/transforms/$transformId'path: '/transforms/$transformId'@@ -246,7 +231,6 @@ declare module '@tanstack/react-router' {interface AuthDashboardRouteChildren {AuthDashboardToolsRoute: typeof AuthDashboardToolsRouteAuthDashboardIndexRoute: typeof AuthDashboardIndexRoute- AuthDashboardInvestigationsWallRoute: typeof AuthDashboardInvestigationsWallRouteAuthDashboardTransformsTransformIdRoute: typeof AuthDashboardTransformsTransformIdRouteAuthDashboardInvestigationsIndexRoute: typeof AuthDashboardInvestigationsIndexRouteAuthDashboardTransformsIndexRoute: typeof AuthDashboardTransformsIndexRoute@@ -257,7 +241,6 @@ interface AuthDashboardRouteChildren {const AuthDashboardRouteChildren: AuthDashboardRouteChildren = {AuthDashboardToolsRoute: AuthDashboardToolsRoute,AuthDashboardIndexRoute: AuthDashboardIndexRoute,- AuthDashboardInvestigationsWallRoute: AuthDashboardInvestigationsWallRoute,AuthDashboardTransformsTransformIdRoute:AuthDashboardTransformsTransformIdRoute,AuthDashboardInvestigationsIndexRoute: AuthDashboardInvestigationsIndexRoute,@@ -292,7 +275,6 @@ export interface FileRoutesByFullPath {'/dashboard': typeof AuthDashboardRouteWithChildren'/dashboard/tools': typeof AuthDashboardToolsRoute'/dashboard/': typeof AuthDashboardIndexRoute- '/dashboard/investigations/wall': typeof AuthDashboardInvestigationsWallRoute'/dashboard/transforms/$transformId': typeof AuthDashboardTransformsTransformIdRoute'/dashboard/investigations': typeof AuthDashboardInvestigationsIndexRoute'/dashboard/transforms': typeof AuthDashboardTransformsIndexRoute@@ -309,7 +291,6 @@ export interface FileRoutesByTo {'/toolbar': typeof ToolbarLazyRoute'/dashboard/tools': typeof AuthDashboardToolsRoute'/dashboard': typeof AuthDashboardIndexRoute- '/dashboard/investigations/wall': typeof AuthDashboardInvestigationsWallRoute'/dashboard/transforms/$transformId': typeof AuthDashboardTransformsTransformIdRoute'/dashboard/investigations': typeof AuthDashboardInvestigationsIndexRoute'/dashboard/transforms': typeof AuthDashboardTransformsIndexRoute@@ -328,7 +309,6 @@ export interface FileRoutesById {'/_auth/dashboard': typeof AuthDashboardRouteWithChildren'/_auth/dashboard/tools': typeof AuthDashboardToolsRoute'/_auth/dashboard/': typeof AuthDashboardIndexRoute- '/_auth/dashboard/investigations/wall': typeof AuthDashboardInvestigationsWallRoute'/_auth/dashboard/transforms/$transformId': typeof AuthDashboardTransformsTransformIdRoute'/_auth/dashboard/investigations/': typeof AuthDashboardInvestigationsIndexRoute'/_auth/dashboard/transforms/': typeof AuthDashboardTransformsIndexRoute@@ -348,7 +328,6 @@ export interface FileRouteTypes {| '/dashboard'| '/dashboard/tools'| '/dashboard/'- | '/dashboard/investigations/wall'| '/dashboard/transforms/$transformId'| '/dashboard/investigations'| '/dashboard/transforms'@@ -364,7 +343,6 @@ export interface FileRouteTypes {| '/toolbar'| '/dashboard/tools'| '/dashboard'- | '/dashboard/investigations/wall'| '/dashboard/transforms/$transformId'| '/dashboard/investigations'| '/dashboard/transforms'@@ -381,7 +359,6 @@ export interface FileRouteTypes {| '/_auth/dashboard'| '/_auth/dashboard/tools'| '/_auth/dashboard/'- | '/_auth/dashboard/investigations/wall'| '/_auth/dashboard/transforms/$transformId'| '/_auth/dashboard/investigations/'| '/_auth/dashboard/transforms/'@@ -453,7 +430,6 @@ export const routeTree = rootRoute"children": ["/_auth/dashboard/tools","/_auth/dashboard/",- "/_auth/dashboard/investigations/wall","/_auth/dashboard/transforms/$transformId","/_auth/dashboard/investigations/","/_auth/dashboard/transforms/",@@ -469,10 +445,6 @@ export const routeTree = rootRoute"filePath": "_auth.dashboard.index.tsx","parent": "/_auth/dashboard"},- "/_auth/dashboard/investigations/wall": {- "filePath": "_auth.dashboard.investigations.wall.tsx",- "parent": "/_auth/dashboard"- },"/_auth/dashboard/transforms/$transformId": {"filePath": "_auth.dashboard.transforms.$transformId.tsx","parent": "/_auth/dashboard"diff --git a/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.wall.tsx b/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.wall.tsxdeleted file mode 100644index 7659047f..00000000--- a/flowsint-app/src/renderer/src/routes/_auth.dashboard.investigations.wall.tsx+++ /dev/null@@ -1,9 +0,0 @@-"use client"--import { createFileRoute } from "@tanstack/react-router"-import InvestigationsWall from "@/components/walls/investigations-wall"--export const Route = createFileRoute('/_auth/dashboard/investigations/wall')({- component: InvestigationsWall,- pendingComponent: () => <div>Loading...</div>,-})\ No newline at end of file