review suggestions option for inferred memories#1138
Conversation
How to use the Graphite Merge QueueAdd the label Main to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
Claude finished @sohamd22's task in 40s —— View job Review Complete
Overview: Second commit adds an undo feature (Ctrl/Cmd+Z) to step back through reviewed cards and revert server-side decisions. New changes look good: The undo implementation correctly uses refs ( Outstanding issue: The velocity bug from my previous inline comment is still present at lines 368-371. The swipe detection can trigger the wrong action if the user drags one direction but flicks the opposite way. The fix is straightforward: - if (offset.x > SWIPE_OFFSET || velocity.x > SWIPE_VELOCITY)
+ if ((offset.x > SWIPE_OFFSET) || (offset.x > 0 && velocity.x > SWIPE_VELOCITY))
onDecide("approve")
- else if (offset.x < -SWIPE_OFFSET || velocity.x < -SWIPE_VELOCITY)
+ else if ((offset.x < -SWIPE_OFFSET) || (offset.x < 0 && velocity.x < -SWIPE_VELOCITY))
onDecide("decline")Score: 9/10 — Ship once the velocity check is fixed. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-mcp | fcd1e6c | Jun 20 2026, 11:42 AM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-app | fcd1e6c | Commit Preview URL | Jun 20 2026, 11:43 AM |
There was a problem hiding this comment.
Overview: Adds a swipeable card UI for reviewing Nova's inferred memories from the dashboard.
Issues found:
- Swipe velocity detection can trigger the wrong decision when the user drags one direction but flicks the opposite way (see inline comment with fix)
Everything else looks solid — the snapshot-on-open pattern for the card queue is well thought out, keyboard support is clean, and the mutation/cache update logic handles the optimistic removal correctly.
Score: 9/10
| if (offset.x > SWIPE_OFFSET || velocity.x > SWIPE_VELOCITY) | ||
| onDecide("approve") | ||
| else if (offset.x < -SWIPE_OFFSET || velocity.x < -SWIPE_VELOCITY) | ||
| onDecide("decline") |
There was a problem hiding this comment.
Bug: Velocity check can trigger wrong decision
The velocity conditions don't verify that the drag direction matches. If a user drags left but releases with a rightward flick (or vice versa), the velocity check can override the visual intent:
- User drags left (
offset.x = -50) but flicks right (velocity.x = +700) - First condition:
offset.x > 120is false, butvelocity.x > 600is true - Result: approve is triggered despite the card being in the decline zone
This would feel broken to users since the card's visual feedback (red wash, "Decline" pill) wouldn't match the action taken.
| if (offset.x > SWIPE_OFFSET || velocity.x > SWIPE_VELOCITY) | |
| onDecide("approve") | |
| else if (offset.x < -SWIPE_OFFSET || velocity.x < -SWIPE_VELOCITY) | |
| onDecide("decline") | |
| if ((offset.x > SWIPE_OFFSET) || (offset.x > 0 && velocity.x > SWIPE_VELOCITY)) | |
| onDecide("approve") | |
| else if ((offset.x < -SWIPE_OFFSET) || (offset.x < 0 && velocity.x < -SWIPE_VELOCITY)) | |
| onDecide("decline") |
This ensures a fast flick only counts if the drag is already moving in that direction.
9aa147b to
fcd1e6c
Compare

TL;DR
Adds a swipeable "Review suggestions" card to the dashboard that lets users approve or decline inferred memories surfaced by Nova.
What changed?
ReviewMemoriesCardcomponent that appears in the "Suggested for you" section of the dashboard (both desktop and mobile layouts). The card is hidden when there are no pending inferred memories, so it never renders empty chrome. While the modal is open, the displayed count is frozen so the trigger button doesn't tick down or disappear mid-session. Switching spaces closes the modal automatically.ReviewMemoriesModalcomponent that presents inferred memories as a swipeable card deck. Users can approve (swipe right / ✓), decline (swipe left / ✗), or skip each memory. The modal includes:→to approve,←to decline,↓orSpaceto skip, andCmd/Ctrl+Zto undouseReducedMotionuseInferredMemorieshook to fetch the pending review queue for a given container tag, and auseReviewInferredMemorymutation hook that calls the review endpoint. On success it removes the reviewed entry from the cached queue directly; on undo it invalidates the query to refetch the restored memory from the server.GET /container-tags/:containerTag/inferredto fetch the pending queue andPOST /container-tags/:containerTag/inferred/:memoryId/reviewto submit an approve, decline, or undo action.How to test?
Cmd/Ctrl+Zto step back through decisions and confirm the server-side state is reverted correctly.Why make this change?
Nova infers memories on behalf of users but may not always be fully confident in them. This feature gives users a lightweight, low-friction way to review and curate those suggestions directly from the dashboard, improving the quality and trustworthiness of their memory store.