feat(sdk-playground): reflect SDK-owned memory block in debug view - #1533
feat(sdk-playground): reflect SDK-owned memory block in debug view#1533Dhravya wants to merge 1 commit into
Conversation
Update the playground to display the current deduplicated <supermemory> replacement block produced by the SDK middleware instead of a browser-side seen-facts delta. Add memory-dedupe helper and ignore local tsbuildinfo. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Claude finished @Dhravya's task in 2m 6s —— View job Review Complete
Overview: Adds a memory deduplication helper and updates the SDK playground debug view to show the actual deduplicated memory block that the SDK middleware sends. Issues found: None — this looks good to ship. The implementation is clean:
Score: 10/10 |
There was a problem hiding this comment.
Overview: Adds a memory deduplication helper and updates the SDK playground debug view to show the actual deduplicated memory block that the SDK middleware sends.
Issues found: None — this looks good to ship.
The implementation is clean:
dedupeProfileForModecorrectly implements static → dynamic → search priority deduplication with case-insensitive normalization- The
chatReadylogic properly allows chat when either user-entered keys OR server env keys are present - The debug view now accurately reflects what the SDK middleware actually injects
Score: 10/10
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ed15364. Configure here.
| dynamic: profileRaw?.dynamic ?? [], | ||
| searchResults: normalizeSearchResults(profileResponse.searchResults), | ||
| }, | ||
| ) |
There was a problem hiding this comment.
Wrong-mode double dedupe
Medium Severity
fetchContainerContext always runs dedupeProfileForMode with "full" or "profile" based only on whether a query string is present, then buildMiddlewareMemoryDebug dedupes again with the real memoryMode. For "query" mode that first pass treats overlapping search hits as profile duplicates and drops them, so the debug preview no longer matches what the SDK middleware injects.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit ed15364. Configure here.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-mcp | ed15364 | Aug 18 2026, 03:18 PM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-app | ed15364 | Commit Preview URL Branch Preview URL |
Aug 18 2026, 03:21 PM |



Stack Context
Part 3 (top) of a 3-PR stack moving memory deduplication into the SDKs. See
sdk-dedup/tools-tsfor full context.What?
Update the SDK playground so its debug view reflects the SDK-owned memory block.
<supermemory>replacement block produced by the SDK middleware, instead of the old browser-side "seen facts" delta.memory-dedupehelper and ignores local*.tsbuildinfo.Why?
The previous debug cards were misleading — they showed an incremental browser-filtered delta while the middleware actually re-injected the full profile. Now the visualization matches what the SDK really sends.
🤖 Generated with Claude Code
Note
Low Risk
Playground-only visualization and chat gating changes; no production SDK or API behavior.
Overview
The playground debug trace now shows the deduplicated memory block the SDK middleware would inject (static → dynamic → search, mode-aware), instead of a misleading browser-side “new facts” delta. A new
memory-dedupehelper mirrors@supermemory/toolsmiddleware behavior and is applied when fetching container context and building middleware memory debug entries; the context preview card is relabeled to reflect that each turn replaces the prior<supermemory>block.Chat UX: messaging is enabled when API keys are configured on the server (
hasSupermemoryKey/hasOpenAiKeyfrom/api/chat), not only when keys are typed in the panel. The message input stays editable while waiting for text; Send still requires non-empty input.Also ignores
*.tsbuildinfoin.gitignore.Reviewed by Cursor Bugbot for commit ed15364. Bugbot is set up for automated code reviews on this repo. Configure here.