MemoryDiffRollback
Side-by-side diff of a memory entry before and after a change, with rollback action.
Preview
Before
User is working on the authentication flow for the XFA dashboard.
After
User is building a public component library called kansho-ui.
Variants
Non-restorable
Before
Billing plan: Starter (free tier).
After
Billing plan: Pro — confirmed via Stripe webhook.
Props
| Prop | Type | Description |
|---|---|---|
| before* | string | The previous value of the memory fact, shown struck-through on the left. |
| after* | string | The current value after the update, shown on the right. |
| changedBy* | string | Attribution string, e.g. "corrected by Alex" or "reinforced from R-1041". |
| timestamp* | string | When the change occurred, shown in the header. |
| restorable | boolean | Whether the restore button is enabled. Defaults to true. |
| onRestore | () => void | Called when the user clicks "Restore previous value". |
| className | string | Additional CSS classes for the section root. |
* required.
Usage
import { MemoryDiffRollback } from "@/components/memory/memory-diff-rollback";
<MemoryDiffRollback
before="User is working on the authentication flow."
after="User is building a component library called kansho-ui."
changedBy="corrected by kansho-agent"
timestamp="9 Jun 2026 · 14:07"
restorable
onRestore={() => console.log("restored")}
/>