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) <noreply@anthropic.com>
Co-authored-by: Molecule AI SDK-Dev <sdk-dev@agents.moleculesai.app>
This commit is contained in:
airenostars 2026-04-22 06:56:46 -07:00 committed by GitHub
parent 0506e0cabc
commit 201e18f9ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

Diff Content Not Available