From 3b15166c32051673b549451c807b2425286642b7 Mon Sep 17 00:00:00 2001 From: Hiren Kangad Date: Thu, 12 Mar 2026 18:44:19 +0530 Subject: [PATCH] feat(review): wire PinOverlay ghost/focus from Editor state --- frontend/src/pages/Editor.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/frontend/src/pages/Editor.tsx b/frontend/src/pages/Editor.tsx index 7ee0c05..5479888 100644 --- a/frontend/src/pages/Editor.tsx +++ b/frontend/src/pages/Editor.tsx @@ -208,6 +208,18 @@ export default function Editor({ isPublicView }: EditorProps) { pinOverlay.refresh(); }, [pinOverlay]); + // Sync draft pin to PinOverlay ghost pin + useEffect(() => { + if (!pinOverlay) return; + pinOverlay.setGhostPin(draftPin ? { objectId: draftPin.objectId, pinX: draftPin.pinX, pinY: draftPin.pinY } : null); + }, [draftPin, pinOverlay]); + + // Sync focused thread to PinOverlay focus visuals + useEffect(() => { + if (!pinOverlay) return; + pinOverlay.setFocusedThread(focusedThreadId); + }, [focusedThreadId, pinOverlay]); + // Review-mode pointer handling: pin click + draft pin placement useEffect(() => { const vp = canvasRef.current?.getViewport();