Session Replay
Record and replay database sessions in tpaw — review query history, mutations, and data changes with rollback SQL generation.
Session Replay records every query you execute during a tpaw session and stores the timeline as a series of events. You can review the session history, filter by operation type, scrub through the timeline, and generate rollback SQL to undo data mutations.
What gets recorded
| Event type | Recorded data |
|---|---|
| SELECT queries | SQL, execution time, row count |
| INSERT mutations | SQL, before/after data snapshot |
| UPDATE mutations | SQL, before/after row data |
| DELETE mutations | SQL, before data snapshot |
| Table browse | Table opened, filters applied, pagination |
| Table filter | Filter conditions applied in Data Grid |
| Table sort | Sort column and direction |
Silent reloads (automatic data refreshes after a mutation) are excluded from the timeline to keep the event list clean.
Viewing session history
Open the Replay panel from the sidebar navigation. The panel shows:
- Session selector — a dropdown of past sessions, each labeled with start time and duration
- Timeline — a density histogram of events over time
- Event list — all events in the selected session, filterable and searchable
Filtering events
Use the operation filter buttons to show only specific event types:
- SELECT — read queries
- INSERT — insert mutations
- UPDATE — update mutations
- DELETE — delete mutations
Playing back a session
The Replay panel has playback controls:
| Control | Action |
|---|---|
| Play | Auto-advance through events at the selected speed |
| Pause | Stop auto-advance |
| Stop | Reset to beginning |
| Speed | 1×, 2×, or 4× playback speed |
The timeline scrubber shows your current position. Click anywhere on the timeline to jump to that point.
Inspecting events
Click any event in the list to expand it. For mutation events (INSERT/UPDATE/DELETE), you can see:
- The SQL statement that was executed
- A diff view showing before and after data
- Row count affected
Opening a query in the editor
Click the Open in Editor button on any event to load its SQL into the Query Editor for re-execution or modification.
Rollback SQL generation
The Rollback Editor button is visible but not yet functional.
Session labels
Each session is labeled with:
- Start time (date + hour:minute)
- End time (if the session ended)
- Duration (e.g., "45m 12s")
Sessions are per-connection
Each database connection has its own session history. Sessions persist across app restarts.