Editor has no 'autosave' toggle — user can lose work to a crash with no autosave (only the session-restore per #161, which is best-effort), no explicit autosave preference #338

Open
opened 2026-10-04 03:54:13 +00:00 by Mark · 0 comments
Owner

Finding

The session restore (per #161) auto-saves the editor's state to tc_workspace_snapshot. But:

  • This is on every change (high frequency)
  • It's sessionStorage (per-tab, per-window, clears on tab close)
  • It's not user-configurable

A user with a long editing session:

  • Wants autosave to localStorage (more durable)
  • Or wants autosave every N minutes (less frequent)
  • Or wants to disable autosave entirely (and rely on manual Save)

Currently: the user has no preference.

grep -rn 'autosave\|autoSave' src/components/editor/ returns 0 (only as part of #161's session restore).

Where

  • Session restore: src/pages/Editor.tsx (per #161)
  • No autosave settings: grep -rn 'autosave' src/components/editor/ returns 0
  • Settings: SettingsModal (per #306)

Suggested fix shape

  1. Settings: in the editor's settings (or in a global "Preferences" section), an "Autosave" section:
<SelectField
  label="Autosave"
  value={autosaveMode}
  options={[
    { value: 'every-change', label: 'Every change (default)' },
    { value: 'every-5-min', label: 'Every 5 minutes' },
    { value: 'every-15-min', label: 'Every 15 minutes' },
    { value: 'manual', label: 'Manual only' },
  ]}
  onChange={(v) => setAutosaveMode(v as AutosaveMode)}
/>
  1. Implementation:
  • every-change (current): push to sessionStorage on every change.
  • every-5-min / every-15-min: push to localStorage on an interval.
  • manual: only push on Save (to Gallery).
  1. Status: the editor's status bar shows "Last autosaved 4 minutes ago" (per #262).

  2. Recovery: on crash, the user is prompted to restore from the last autosave (if newer than the Gallery).

Severity

Low. The session-restore covers most cases. Power users notice the lack of choice.

Discovered by

Gap analysis (2026-10-02) of editor persistence.

  • #161 (open) — Editor beforeunload. The session restore is the current implementation.
  • #262 (open) — Save status indicator. The status display is the visible surface.
  • Figma/Google Docs have explicit autosave settings. The editor's gap is the parallel.
## Finding The session restore (per #161) auto-saves the editor's state to `tc_workspace_snapshot`. But: - This is on every change (high frequency) - It's sessionStorage (per-tab, per-window, clears on tab close) - It's not user-configurable A user with a long editing session: - Wants autosave to localStorage (more durable) - Or wants autosave every N minutes (less frequent) - Or wants to disable autosave entirely (and rely on manual Save) Currently: the user has no preference. `grep -rn 'autosave\|autoSave' src/components/editor/` returns 0 (only as part of #161's session restore). ## Where - Session restore: `src/pages/Editor.tsx` (per #161) - No autosave settings: `grep -rn 'autosave' src/components/editor/` returns 0 - Settings: SettingsModal (per #306) ## Suggested fix shape 1. **Settings**: in the editor's settings (or in a global "Preferences" section), an "Autosave" section: ```tsx <SelectField label="Autosave" value={autosaveMode} options={[ { value: 'every-change', label: 'Every change (default)' }, { value: 'every-5-min', label: 'Every 5 minutes' }, { value: 'every-15-min', label: 'Every 15 minutes' }, { value: 'manual', label: 'Manual only' }, ]} onChange={(v) => setAutosaveMode(v as AutosaveMode)} /> ``` 2. **Implementation**: - `every-change` (current): push to sessionStorage on every change. - `every-5-min` / `every-15-min`: push to localStorage on an interval. - `manual`: only push on Save (to Gallery). 3. **Status**: the editor's status bar shows "Last autosaved 4 minutes ago" (per #262). 4. **Recovery**: on crash, the user is prompted to restore from the last autosave (if newer than the Gallery). ## Severity Low. The session-restore covers most cases. Power users notice the lack of choice. ## Discovered by Gap analysis (2026-10-02) of editor persistence. ## Related - #161 (open) — Editor beforeunload. The session restore is the current implementation. - #262 (open) — Save status indicator. The status display is the visible surface. - Figma/Google Docs have explicit autosave settings. The editor's gap is the parallel.
Sign in to join this conversation.
No description provided.