SnapBack

Session Time-Travel

The Challenge: Multi-File AI Changes

Your AI assistant just refactored 5 files. The output looks good, but something broke:

🧒 Files Modified:
   βœ“ src/auth.ts          (looks good)
   βœ“ src/user.ts          (looks good)
   ❌ src/index.ts         (undefined reference!)
   βœ“ src/middleware.ts     (looks good)
   βœ“ tests/auth.test.ts    (looks good)

Your options:

  • Option A: VS Code undo (Cmd+Z) 10+ times individually per file = slow
  • Option B: Git revert commit = loses all good work
  • Option C: Manual fix = hours of debugging
  • Option D: SnapBack sessions = 1 click navigate all 5 files with full context βœ”οΈ

How Sessions Work

SnapBack automatically groups related snapshots based on timing and context:

⏱️

Automatic Grouping

SnapBack intelligently groups snapshots into sessions based on timing and context.

πŸ”„

Atomic Navigation

Navigate entire sessions with one action, ensuring consistency across all modified files.

🧭

Time Navigation

Navigate through your coding history with intuitive time-travel controls.

Session Triggers

SnapBack automatically creates new sessions based on these triggers:

Session Grouping Example

Here’s what SnapBack automatically created:

πŸ“¦ Session: "Claude refactored auth system" (14:05 - 14:23 UTC)
β”œβ”€β”€ Trigger: Multiple file saves within 60s
β”œβ”€β”€ Files in Session:
β”‚  β”œβ”€ src/auth.ts          (3 snapshots: 14:05, 14:12, 14:18)
β”‚  β”œβ”€ src/user.ts          (2 snapshots: 14:06, 14:19)
β”‚  β”œβ”€ src/index.ts         (2 snapshots: 14:07, 14:23)
β”‚  β”œβ”€ src/middleware.ts     (1 snapshot: 14:08)
β”‚  └─ tests/auth.test.ts    (2 snapshots: 14:09, 14:21)
└── AI Detection: 🚴 HIGH RISK
   └─ src/index.ts has undefined reference (detected 14:23)

Click β€œApply State” β†’ All 5 files navigate to 14:04 state β†’ 2 seconds βœ”οΈ

How Sessions Are Grouped

SnapBack uses this logic:

  1. Timing: Snapshots within 60 seconds of each other group together
  2. AI Detection: Same AI assistant detected across files β†’ same session
  3. User Activity: Idle gap >105s β†’ new session starts
  4. Git Events: Git commit β†’ new session starts

Time-Based Triggers

  • 105s Idle Gap: After 105 seconds of inactivity, a new session begins
  • Window Blur: When you switch away from VS Code, the current session ends

Action-Based Triggers

  • Git Commit: Each Git commit starts a new session
  • Task Completion: Finishing a coding task (configured in settings)

Manual Triggers

You can also manually create sessions:

# Create a new session manually
snapback session create --name "Implement user authentication"

# End current session
snapback session end

Session Structure

Each session contains:

  1. Metadata: Timestamp, duration, trigger event
  2. File Changes: All snapshots created during the session
  3. AI Detection Results: Any risks detected during the session
  4. User Notes: Optional notes added during the session

Time-Travel Navigation

Navigate through your coding history with intuitive controls:

VS Code Extension

  1. Open the SnapBack panel (View β†’ SnapBack)
  2. Switch to the β€œSessions” tab
  3. Browse through your session history
  4. Click on any session to view its protection states
  5. Apply the entire session or individual protection states

CLI Tool

# List all sessions
snapback session list

# View session details
snapback session view --id session_12345

# Navigate to a session state
snapback session restore --id session_12345

# Compare sessions
snapback session diff --id session_12345 --id session_67890

Session vs Snapshot Differences

Understanding the relationship between sessions and snapshots:

ConceptDescriptionScope
SnapshotPoint-in-time capture of a single fileSingle file
SessionGroup of related snapshots with shared contextMultiple files

Applying a session state is simple and safe:

Step 1: Identify the Session

Find the session you want to explore:

Step 2: Review Changes

Before applying, review what will be changed:

Step 3: Apply State

Apply the session state:

# Apply an entire session state
snapback session restore --id session_12345

# Apply specific files from a session
snapback session restore --id session_12345 --files src/index.js,src/utils.js

# Preview changes before applying
snapback session restore --id session_12345 --dry-run

Best Practices

🏷️ Name Important Sessions

Give meaningful names to important sessions to make them easier to find later.

πŸ“ Add Context Notes

Add notes to sessions explaining what you were working on and any important context.

⏰ Be Mindful of Timing

Take breaks to allow natural session boundaries, making it easier to navigate your history.

πŸ” Review Before Applying

Always review session changes before applying to avoid unintended modifications.

Advanced Features

Session Comparison

Compare different sessions to understand changes over time:

# Compare two sessions
snapback session diff --id session_12345 --id session_67890

# Export session comparison as HTML report
snapback session diff --id session_12345 --id session_67890 --format html > comparison.html

Session Export

Export sessions for backup or sharing:

# Export a session
snapback session export --id session_12345 --output session_backup.json

# Import a session
snapback session import --input session_backup.json

πŸ’‘ Pro Tip: Use sessions as a natural checkpoint in your development workflow. Before starting a major refactor or implementing a new feature, take a moment to let the current session end naturally.

Privacy First: SnapBack works 100% offline on the Free plan. MCP is optional and requires explicit consent on paid plans. Learn more β†’