Skip to content

v0.3.0

Choose a tag to compare

@calebl calebl released this 04 Nov 20:13
· 2 commits to main since this release
089e333

Session replay (opt-in)

pocket-kit can now attach a short session replay to feedback notes and page error reports. Each page records with rrweb and keeps about the last 30 seconds in memory only (never localStorage, IndexedDB, cookies, or the network); the recording is sent only with a report, to the app's own endpoint.

Off by default. Enable it per app:

PocketKit.configure do |config|
  config.replay.enabled = true
end

and add <%= pocket_kit_replay_tag %> to the layout. With replay off, the recorder is never loaded and reports are unchanged.

Privacy defaults

  • Typed text in inputs, textareas, selects, and contenteditable elements is masked (config.replay.show_typed_text = true shows it; passwords are always masked).
  • Use rrweb's rr-block (not recorded) and rr-mask (text replaced with *) classes to hide other page content.
  • replay is added to filter_parameters; playback blocks cross-origin resources.

Storage: each accepted replay is saved as <uuid>.json in config.replay.directory (default tmp/pocket_kit/replays), readable only by the app's user; the report references the file. Retention is bounded by config.replay.keep and size by config.replay.max_bytes.

Viewing: open the report's replay.viewer path (e.g. /pocket-kit/replays/<uuid>) in the app, or open viewer/replay.html from a pocket-kit checkout and pick the file.

Install: gem "pocket_kit", github: "calebl/pocket-kit", tag: "v0.3.0"

Full changes: v0.2.0...v0.3.0