mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-09-29 01:41:22 +00:00
Copilot review flagged three things: 1. Casting an arbitrary parsed object to Tweet without validating shape can still crash inside enrichTweet. Added an isTweetLike type guard that requires the 'user' field, which both CustomTweetHeader and the downstream enrichTweet expect. 2. Returning null on bad data silently hid the failure. Now render a small 'Tweet preview unavailable' fallback (matching the style of the existing fallback in document-modal/content/tweet.tsx) and emit a console.warn so failures show up during debugging. 3. JSON.parse was running on every render. Wrapped in useMemo keyed by the data prop so reparsing only happens when the input changes. |
||
|---|---|---|
| .. | ||
| browser-extension | ||
| docs | ||
| mcp | ||
| memory-graph-playground | ||
| raycast-extension | ||
| web | ||