From 201e18f9ed1375e789897eea183f9aa8b2933bd0 Mon Sep 17 00:00:00 2001 From: airenostars Date: Wed, 22 Apr 2026 06:56:46 -0700 Subject: [PATCH] fix(canvas): infinite render loop in ContextMenu + dedupe SSRF funcs (#1499) ContextMenu: useCanvasStore selector returned .filter() (new array on every call), causing React 19's useSyncExternalStore to detect a reference change and re-render infinitely. Fixed by using .some() which returns a stable boolean. Also deduplicates isSafeURL, isPrivateOrMetadataIP, validateRelPath which existed in 3 files after PR merges collided. Canonical location is ssrf.go. Removed unused imports (fmt, net, net/url, database/sql, strings) from a2a_proxy.go, a2a_proxy_helpers.go, mcp_tools.go. Co-authored-by: Claude Opus 4.6 (1M context) Co-authored-by: Molecule AI SDK-Dev