Kanshō/Memory conflict resolver

Memory conflict resolver

When a new fact contradicts an active one, the user decides: keep both, merge, or delete the old. Old vs new is shown side by side with source and confidence.

Included in the single kansho full pack. Components are not offered as separate installs.

Old vs new

Last action: unresolved
ConflictedTwo facts disagree
Active (old)88% conf

Avery's local project still uses the legacy runtime.

message · 2025-11-022025-11-02
Candidate (new)93% conf

Avery's local project now uses the current runtime.

message · 2026-05-262026-05-26

Usage

Guidance
Do
  • Show the existing and incoming facts side by side with their confidence and source.
  • Let the operator choose keep-both, merge, or delete-old explicitly.
Don't
  • Auto-resolve a conflict without surfacing it.
  • Hide which fact is currently active.
When to use
When an incoming fact contradicts a stored one and a human must decide.
When not to
Non-conflicting memory updates — use the diff / rollback card.

Props

API reference
PropTypeDescription
existingrequiredConflictSideThe active fact: fact, confidence, source, timestamp.
incomingrequiredConflictSideThe conflicting incoming fact.
onResolve(resolution) => voidFires with 'keep-both' | 'merge' | 'delete-old'.

Component documentation

Memory Conflict Resolver

components/memory/memory-conflict-resolver.tsx

Purpose

Compares an existing and incoming memory fact and offers a resolution.

Appropriate use

Use when a human must choose how two conflicting facts enter the memory store.

Example

components/memory/memory-conflict-resolver.tsx has a representative live example in the "Old vs new" section on /components/memory-conflict-resolver.

States

Resolutions are keep-both, merge, and delete-old; each side includes fact, confidence, source, and timestamp.

API and props

MemoryConflictResolver accepts existing, incoming, optional onResolve, and className; it exports ConflictSide and ConflictResolution.

Dependencies

Direct imports are React, Lucide icons, StatusPill, Tag, InlineConfirmButton, shared memory types, and cn.

Accessibility

Both facts, confidence values, sources, and action labels are textual; deleting the old fact uses inline confirmation.

Limitations

It is not a modal, does not calculate a merged value, persist a decision, or report asynchronous resolution errors.

Source

Source: components/memory/memory-conflict-resolver.tsx.

Full pack

components/memory/memory-conflict-resolver.tsx is documented at /components/memory-conflict-resolver and installs only through the single Kansho full pack; no individual component install is offered.