Skip to content

Past-session replay mode — scrub any session through the live node graph #85

@smorchj

Description

@smorchj

Context

The live node graph (#78) shows Claude's activity in real time while a session is running. A natural extension: replay any past session by reading its completed JSONL from the observation log (#79) and feeding it to the same activity store with timestamps shifted to wall time. Useful for:

  • Explaining a past bug ("show me what Claude was reading when it broke auth")
  • Studying routing patterns after the fact
  • Demo / docs — a recorded session that plays when Klonode loads

UI

In the top bar, next to the Project/Machine scope toggle, add a source dropdown:

  • `Live` (current default) — tail active sessions
  • `Session: — 2026-04-14 session about refactoring auth` — replay a specific recorded session
  • `All past sessions (aggregate pulse)` — scrub through all sessions combined on a timeline

When a past session is picked, a scrub bar appears below the graph with: play/pause, speed control (1x / 2x / 10x), timeline with tool-use dots, current position cursor.

Implementation

  • New server endpoint `/api/sessions/replay?sessionId=...` that streams the session's events over SSE with a `startedAt` query param to rebase timestamps.
  • Client `sessionWatcher` store gains a `source: 'live' | { replay: sessionId }` field that switches which SSE endpoint it subscribes to.
  • The activity store doesn't need changes — it's already time-agnostic; it just sees events arriving with `at` in wall time.
  • ACTIVITY_LIFETIME_MS might want to be configurable per replay speed (at 10x, pulses should last 0.8s not 8s) — simple derived value.

Session discovery

List all recorded sessions from `~/.claude/projects//`. Show session id, start time, duration, tool-use count, detected topic (first user message, truncated).

Out of scope

  • Editing a replay (scrubbing through to change what Claude sees). This is view-only.
  • Comparing two sessions side-by-side. Nice to have but out of scope here.

Dependencies

Depends on #79 for the observation log (we need structured access to past events), or can read directly from the JSONL files. Either works; the observation log is cleaner because it's already normalized.

Part of the #77 pivot roadmap. This is the "nice-to-have" tail of the roadmap — ship after the learning model and suggestions panel if there's appetite.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions