@socketscope/replay-engine
v0.1.1
Published
Time-travel replay for SocketScope — scrubber bar, stacked tracks, cursor engine.
Maintainers
Readme
@socketscope/replay-engine
Time-travel replay for SocketScope — scrubber bar, stacked event tracks, cursor drift engine.
Already included when you install @socketscope/ui. Install standalone only if you want to embed the scrubber elsewhere.
Install
pnpm add @socketscope/replay-engine @socketscope/coreExports
import {
ScrubberBar, // bottom toolbar — jump-to-error, ±10s, play/pause, speed, scrub
ReplayView, // full-bleed tab — 4 stacked tracks + cursor + quick actions
useReplayDrift, // hook: advances the cursor at 0.5×speed per 80ms
useDerivedMarkers, // hook: auto-detect red error markers + amber reconnect markers
} from '@socketscope/replay-engine';How it works
- The store's
replaySliceholds{ active, pct, speed, markers }. useReplayDrift()incrementspctover time whenactive = true. Reaches 100 → flips back tolive.- The ScrubberBar reads/writes the slice; the ReplayView projects events onto stacked tracks.
License
MIT
