Auto-Save

Notidian automatically saves your work so you never lose changes.

Overview

Auto-save provides:

  • Instant Saving - Changes save as you work
  • No Manual Save Needed - Focus on your content
  • Workspace Restoration - Resume where you left off
  • Experimental Sync Triggering - Saved notes can request an encrypted sync pass when sync is enabled

How It Works

For Notes (.note files)

  1. Trigger - Any change to title, content, or canvas
  2. Debounce - Waits 500ms after last change
  3. Save - Writes to disk immediately
  4. Sync trigger - Requests an experimental encrypted sync pass (if enabled)

For Markdown (.md files)

  1. Trigger - Any text change in edit mode
  2. Debounce - Waits 2 seconds after last change
  3. Save - Updates the markdown file
  4. Indicator - Yellow dot clears when saved

Save Indicators

Look for these visual cues:

IndicatorMeaning
No indicatorDocument is saved
Yellow dot (•)Unsaved changes
SpinningSave in progress
Sync statusExperimental sync state is shown in Settings

Manual Save

You can still save manually:

  • Keyboard - Cmd+S (Mac) / Ctrl+S (Windows)
  • Button - Click Save in the toolbar

Manual save is useful when:

  • You want immediate confirmation
  • You’re about to close the app
  • Auto-save seems delayed

Workspace Restoration

Notidian remembers your session:

What’s Restored

  • Open tabs and their positions
  • File Explorer navigation state
  • Last viewed note per tab
  • Scroll positions

When It Restores

  • On app launch
  • After browser refresh
  • When reopening a workspace

Storage

Restoration data is stored in:

  • IndexedDB (primary)
  • localStorage (fallback)

Experimental sync triggering

When encrypted sync is enabled and the vault is unlocked:

  1. Local save - Note saves to disk
  2. Event - The app emits a local-change/save signal
  3. Debounce - Sync waits briefly to batch bursts of changes
  4. Sync pass - The sync engine compares manifests and uploads/downloads encrypted changes

This means local saves stay independent from sync. Sync is still pending the #647 manual QA pass before it should be treated as stable backup.

Performance

Auto-save is optimized for performance:

Debouncing

  • Multiple rapid changes = single save
  • Prevents excessive disk writes
  • Reduces experimental sync traffic

Incremental Updates

  • Only changed data is written
  • Canvas strokes save incrementally
  • Metadata updates are lightweight

Background Processing

  • Saves happen in background
  • No UI blocking
  • Canvas remains responsive

Configuration

Currently, auto-save settings are not configurable. Future options may include:

  • Disable auto-save
  • Adjust debounce timing
  • Configure sync triggers

Troubleshooting

Changes Not Saving

  1. Check indicator - Look for yellow dot
  2. Try manual save - Press Cmd+S
  3. Check permissions - Ensure workspace is writable
  4. Check disk space - Ensure storage available

Slow Saves

  • Large notes with many strokes take longer
  • Heavy media content increases save time
  • Experimental sync can add additional time when it runs

Data Not Restored

  • Check if IndexedDB is enabled
  • Clear browser cache may reset restoration
  • Try refreshing the page

Sync Not Triggering

  • Verify experimental sync is enabled/unlocked
  • Check you’re signed in
  • Look at the sync engine status in Settings

Best Practices

  1. Trust the system - Auto-save is reliable, don’t over-save
  2. Watch indicators - Glance at save status before closing
  3. Keep backups - Do not rely on experimental sync as your only backup yet
  4. Check sync status - Before switching devices

Technical Details

Storage Locations

DataLocation
Note contentWorkspace folder (file system)
Session stateIndexedDB
PreferenceslocalStorage
Experimental syncNotidian encrypted sync server

File Events

Auto-save triggers on:

  • input events (text changes)
  • Canvas stroke completion
  • Metadata updates (title, tags)
  • Media additions

Error Handling

If a save fails:

  1. Error is logged to console
  2. Retry is attempted
  3. User is notified (for repeated failures)
  4. Data remains in memory until successful save