Files
2026-03-12 12:33:48 +01:00

2.1 KiB

Issue #16: Memory candidates viewer

Status: COMPLETED Issue: #16 Branch: feature/issue-16-memory-viewer

Acceptance Criteria

  • Dedicated /memory route
  • List of MemoryCandidate entries
  • Each entry shows: content, source badge, confidence score
  • Entries grouped by session
  • Confidence score visualized (progress bar with color-coding)
  • Filterable by source or confidence threshold

Implementation

New Files

  • src/lib/stores/memory.svelte.ts — reactive store for memory candidates grouped by session ID, with localStorage persistence, sample/demo data, and addCandidates() / getAllBySession() / clearSession() API
  • src/lib/components/MemoryCandidateCard.svelte — card component displaying a single memory candidate with content, color-coded source badge (Tool Output=blue, Model Knowledge=purple, Web=green, Unspecified=gray), and horizontal confidence progress bar with percentage
  • src/routes/memory/+page.svelte — dedicated memory route with session-grouped layout, source dropdown filter, confidence threshold slider, empty state, and back-to-chat link
  • src/routes/memory/+page.ts — SSR disabled for this route

Modified Files

  • src/routes/+page.svelte — added Memory Candidates navigation link on the home page
  • src/routes/chat/+page.svelte — added Memory link in the header next to Lineage; wired up capture of finalResult.newMemoryCandidates into the memory store

Key Decisions

  • Uses sample/demo data seeded into localStorage on first load, since the orchestrator doesn't currently include memory candidates in typical responses
  • StoredMemoryCandidate type decouples the UI store from protobuf Message dependency (same pattern as lineage's SimpleAgentIdentifier)
  • Confidence bar color-coded: green (>=80%), amber (>=50%), red (<50%)
  • Source badge colors match the project's existing badge conventions (blue, purple, green, gray)
  • Grid layout (1-3 columns responsive) for candidate cards within each session group
  • Filter controls use a source dropdown and a range slider for confidence threshold