diff --git a/.cursor/hooks/state/continual-learning.json b/.cursor/hooks/state/continual-learning.json index 2d5d3a5..c25f107 100644 --- a/.cursor/hooks/state/continual-learning.json +++ b/.cursor/hooks/state/continual-learning.json @@ -1,8 +1,8 @@ { "version": 1, "lastRunAtMs": 1782633053032, - "turnsSinceLastRun": 6, + "turnsSinceLastRun": 7, "lastTranscriptMtimeMs": 1782633052959.9294, - "lastProcessedGenerationId": "fa1ae817-7a99-4fd6-8b50-8407600557dd", + "lastProcessedGenerationId": "5c41c5b1-0c40-4c8e-a6df-b22e873df8f6", "trialStartedAtMs": null } diff --git a/memento-note/components/network-graph.tsx b/memento-note/components/network-graph.tsx index 2fbef0e..9bd868e 100644 --- a/memento-note/components/network-graph.tsx +++ b/memento-note/components/network-graph.tsx @@ -2,6 +2,7 @@ import { useEffect, useRef } from 'react' import * as d3 from 'd3' +import { Maximize2 } from 'lucide-react' interface Note { id: string @@ -49,6 +50,7 @@ export function NetworkGraph({ }: NetworkGraphProps) { const svgRef = useRef(null) const containerRef = useRef(null) + const zoomRef = useRef(null) useEffect(() => { if (!svgRef.current || !containerRef.current) return @@ -67,6 +69,7 @@ export function NetworkGraph({ g.attr('transform', event.transform) }) + zoomRef.current = zoom svg.call(zoom as any) // Filter notes with cluster assignments @@ -348,6 +351,15 @@ export function NetworkGraph({ } }, [notes, clusters, bridgeNotes, onNoteSelect, selectedClusterId]) + const handleFitView = () => { + if (!svgRef.current || !zoomRef.current) return + d3.select(svgRef.current) + .transition() + .duration(600) + .call(zoomRef.current.transform, d3.zoomIdentity) + onClusterSelect?.(null) + } + return (
{/* Pastilles de cluster — cliquables pour activer le focus */} @@ -378,6 +390,15 @@ export function NetworkGraph({ )}
+ {/* Fit view button */} + )