Add undo/redo to planner

Yjs UndoManager tracks waypoints, no-go areas, and notes. Only
local mutations (origin "local") are undoable — remote changes
from other users are not.

- Keyboard shortcuts: Ctrl/Cmd+Z (undo), Ctrl/Cmd+Shift+Z/Y (redo)
- Shortcuts suppressed in text inputs (browser-native undo there)
- Undo/redo buttons in header with disabled state
- stopCapturing on drag to isolate drag as one undo step
- All mutation sites wrapped with "local" origin
- 5 unit tests for UndoManager behavior
- Archived undo-redo change

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-04-04 10:04:01 +01:00
parent 52bd063a2a
commit 743169550e
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9
14 changed files with 236 additions and 32 deletions

View file

@ -22,6 +22,8 @@ export default {
exportRouteDesc: "GPX-Track für jede App",
exportPlan: "Plan exportieren",
exportPlanDesc: "Mit Wegpunkten und Sperrzonen",
"undo.tooltip": "Rückgängig (Strg+Z)",
"redo.tooltip": "Wiederholen (Strg+Umschalt+Z)",
importGpx: "GPX importieren",
importGpxError: "GPX-Datei konnte nicht gelesen werden. Bitte Dateiformat prüfen.",
dropGpxHere: "GPX-Datei hier ablegen",

View file

@ -22,6 +22,8 @@ export default {
exportRouteDesc: "Clean GPX track for any app",
exportPlan: "Export Plan",
exportPlanDesc: "Includes waypoints and no-go areas",
"undo.tooltip": "Undo (Ctrl+Z)",
"redo.tooltip": "Redo (Ctrl+Shift+Z)",
importGpx: "Import GPX",
importGpxError: "Could not read GPX file. Please check the file format.",
dropGpxHere: "Drop GPX file here",