Editor's Path Properties has 'Path Properties' but no 'Path version' / 'revision history' — user wanting to revert to a previous version of the path (not just undo) has no affordance, only the editor's global undo/redo #389

Open
opened 2026-10-04 04:02:01 +00:00 by Mark · 0 comments
Owner

Finding"

grep -rn 'pathVersion\|pathRevision' src/components/editor/ returns 0. The editor has no per-path version history.

The editor has a global undo/redo (per #196), but no per-path version. A user wanting to revert just one path to a previous state:

  • Has to use the global undo
  • May revert other paths' changes too

The fix is a per-path version history.

Where

  • Path Properties: src/components/editor/EditorRightPanel.tsx
  • No path version: grep -rn 'pathVersion' src/components/editor/ returns 0

Suggested fix shape

  1. State: for each path, store a list of versions:
// In the Path type
interface StitchPath {
  // ... existing fields
  versions: Array<{ timestamp: number; nodes: PathNode[]; stitchType: StitchType; density: number; threadColor: string }>;
}
  1. UI: in the Path Properties section, a "Version history" sub-section:
<SectionHeader title="Version history" isOpen={openSections.history} onToggle={...} />
{openSections.history && (
  <ul className="text-[11px]">
    {p.versions.slice(-10).reverse().map((v) => (
      <li
        key={v.timestamp}
        onClick={() => onRestorePathVersion(p.id, v.timestamp)}
      >
        {formatRelativeTime(v.timestamp)} — {v.nodes.length} nodes
      </li>
    ))}
  </ul>
)}
  1. Behavior: clicking a version restores the path to that state.

  2. Storage: 10 versions per path, kept in the editor's state.

  3. Use cases:

  • The user changed a path and wants to revert
  • The user wants to compare two versions

Severity**

Low. The user can use the global undo. Power users with complex designs notice.

Discovered by

Gap analysis (2026-10-02) of editor path versioning.

  • The editor's history panel (per #265) is the design-level version. The path-level is the deeper.
  • #255 (open) — Workspace history panel. The workspace's version.
  • Figma has "Component version history." Standard.
## Finding" `grep -rn 'pathVersion\|pathRevision' src/components/editor/` returns 0. The editor has no per-path version history. The editor has a global undo/redo (per #196), but no per-path version. A user wanting to revert just one path to a previous state: - Has to use the global undo - May revert other paths' changes too The fix is a per-path version history. ## Where - Path Properties: `src/components/editor/EditorRightPanel.tsx` - No path version: `grep -rn 'pathVersion' src/components/editor/` returns 0 ## Suggested fix shape 1. **State**: for each path, store a list of versions: ```ts // In the Path type interface StitchPath { // ... existing fields versions: Array<{ timestamp: number; nodes: PathNode[]; stitchType: StitchType; density: number; threadColor: string }>; } ``` 2. **UI**: in the Path Properties section, a "Version history" sub-section: ```tsx <SectionHeader title="Version history" isOpen={openSections.history} onToggle={...} /> {openSections.history && ( <ul className="text-[11px]"> {p.versions.slice(-10).reverse().map((v) => ( <li key={v.timestamp} onClick={() => onRestorePathVersion(p.id, v.timestamp)} > {formatRelativeTime(v.timestamp)} — {v.nodes.length} nodes </li> ))} </ul> )} ``` 3. **Behavior**: clicking a version restores the path to that state. 4. **Storage**: 10 versions per path, kept in the editor's state. 5. **Use cases**: - The user changed a path and wants to revert - The user wants to compare two versions ## Severity** Low. The user can use the global undo. Power users with complex designs notice. ## Discovered by Gap analysis (2026-10-02) of editor path versioning. ## Related** - The editor's history panel (per #265) is the design-level version. The path-level is the deeper. - #255 (open) — Workspace history panel. The workspace's version. - Figma has "Component version history." Standard.
Sign in to join this conversation.
No description provided.