Skip to content

feat(timeline): Integrate memory timeline endpoint end-to-end - #218

Merged
ajianaz merged 1 commit into
developfrom
feat/memory-timeline
Aug 8, 2026
Merged

feat(timeline): Integrate memory timeline endpoint end-to-end#218
ajianaz merged 1 commit into
developfrom
feat/memory-timeline

Conversation

@ajianaz

@ajianaz ajianaz commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

What

Wire the existing GET /timeline uteke-server endpoint through all 3 Corin layers — Tauri command, IPC wrapper, and UI component.

Why

The timeline endpoint was fully implemented in uteke-server (handlers.rs:1810, api_registry.rs:455) and the Corin Rust HTTP client already had timeline() — but the frontend never called it. This was the single largest untapped endpoint in the Corin audit (38/57 = 67% coverage).

This PR closes the 3-layer gap, letting users see the full chronological event history of a memory: when it was created, recalled, updated, consolidated, tagged, or forgotten.

Changes

Layer 1 — Tauri Command (Rust)

  • commands.rs (+26 lines): New memory_timeline command
    • Accepts id: String + optional limit (default 50)
    • Returns Vec<TimelineEvent> — empty array if server unavailable
    • Uses existing UtekeClient::timeline() method (no new HTTP code)

Layer 2 — IPC Wrapper (TypeScript)

  • types.ts (+9 lines): TimelineEvent interface
  • ipc.ts (+9 lines): memoryTimeline() async function

Layer 3 — UI Component (Svelte)

  • MemoryDetail.svelte (+168 lines): Timeline section between feedback and neighbors
    • Vertical timeline with colored event dots (6 event types)
    • Collapsible: shows first 5 events, "Show N more" to expand
    • Relative timestamps: "2h ago", "3d ago", etc.
    • Event badges: color-coded per type (green=created, blue=updated, mauve=recalled, yellow=consolidated, peach=tagged, red=forgotten)
    • Graceful states: loading spinner, empty state with hint, non-fatal on error

Layer 4 — Styling (CSS)

  • Catppuccin Mocha palette, consistent with existing design system
  • Vertical connecting line between dots
  • Tabular-nums timestamps for alignment

Testing

  • cargo fmt — pass
  • Cora code review — pass (no issues found)
  • Non-fatal error handling at all 3 layers (returns empty array)
  • State reset on memory switch (no stale timeline data)
  • CI green (awaiting GitHub Actions)

Design Decisions

Why in MemoryDetail? Timeline is memory-specific history. It belongs alongside content, metadata, and neighbors — not as a separate view.

Why 5-item collapse? Prevents timeline from dominating the detail panel for memories with hundreds of events. Users can expand for full history.

Why not a separate TimelineView? The data is per-memory, not per-namespace. A separate view would require a memory selector, adding unnecessary navigation.

Wire the existing GET /timeline uteke-server endpoint through all
3 Corin layers — Tauri command, IPC wrapper, and UI component.

## What
- Layer 1 (Rust):  Tauri command + register in lib.rs
- Layer 2 (TS):  type +  IPC wrapper
- Layer 3 (UI): Timeline section in MemoryDetail.svelte with:
  - Vertical timeline with colored event dots (6 event types)
  - Collapsible (shows 5, expand for more)
  - Relative timestamps ("2h ago")
  - Graceful empty/loading states
  - Non-fatal: silently empty if uteke-serve unavailable

## Why
The timeline endpoint was fully implemented in uteke-server and the
Rust HTTP client already had timeline() — but the frontend never
called it. This closes the 3-layer gap, letting users see the full
event history of a memory (created, recalled, updated, etc.).

## Changes
- commands.rs: +26 lines (new command)
- lib.rs: +2 lines (handler registration)
- MemoryDetail.svelte: +168 lines (state, helpers, UI, CSS)
- ipc.ts: +9 lines (import + wrapper function)
- types.ts: +9 lines (TimelineEvent interface)

## Testing
- Rust compiles with edition 2024 (async fn + let chains)
- Svelte syntax valid
- Non-fatal error handling: all 3 layers degrade gracefully
  when uteke-serve is unavailable (returns empty array)
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

🔍 Cora AI Code Review

No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit f008ed9 into develop Aug 8, 2026
8 checks passed
@ajianaz
ajianaz deleted the feat/memory-timeline branch August 8, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant