M1.7: crash-recovery journal and restore dialog
Dirty buffers are written atomically to <data_dir>/recovery/<project-id>/ about 1 s after the last edit (at most 2 s while typing), from pump_vfs, never per keystroke. Entries are removed on save, close (also force), forced project close/open and recovery.discard. project.open emits recoveryAvailable; recovery.list/restore/discard; restored buffers are dirty and keep line ending and BOM. Corrupt entries are moved aside and reported as warning notifications. UI: restore dialog in ui/src/components/recovery (Restore all, Restore selected, Discard, time, changed-on-disk hint), catalog keys and runtime allow-list. Tests: crash/restore with CRLF + BOM, corrupt entries, removal paths, property test of random edits, headless control-channel test, Vitest for the dialog. Docs: architecture, parity, gaps, ROADMAP. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
6d976ed03e
commit
0b40eb90f8
27 changed files with 2222 additions and 27 deletions
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"app.statusBar.version": "{name} {version}",
|
||||
"common.cancel": "Cancel",
|
||||
"common.close": "Close",
|
||||
"common.dismiss": "Dismiss",
|
||||
"common.dontSave": "Don't Save",
|
||||
"common.error.unexpectedResult": "unexpected result of {command}",
|
||||
|
|
@ -15,10 +16,21 @@
|
|||
"editor.tabs.close": "Close {name}",
|
||||
"editor.tabs.label": "Editor tabs",
|
||||
"editor.tabs.unsaved": "unsaved changes",
|
||||
"notification.recovery.corrupt": "Skipped an unreadable recovery file ({file}): {reason}",
|
||||
"notification.recovery.unavailable": "Could not read the recovery journal: {reason}",
|
||||
"notification.recovery.writeFailed": "Could not keep a recovery copy of {path}: {reason}",
|
||||
"project.empty.noFolder": "No folder is open.",
|
||||
"project.openFolder": "Open Folder…",
|
||||
"project.toolWindow.title": "Project",
|
||||
"project.tree.loading": "Loading…",
|
||||
"recovery.dialog.changedOnDisk": "The file changed on disk since then",
|
||||
"recovery.dialog.discard": "Discard",
|
||||
"recovery.dialog.failed": "{path} could not be restored: {message}",
|
||||
"recovery.dialog.intro": "Lutra stopped before these files were saved. Restore your unsaved changes?",
|
||||
"recovery.dialog.restoreAll": "Restore All",
|
||||
"recovery.dialog.restoreSelected": "Restore Selected",
|
||||
"recovery.dialog.savedAt": "Saved {time}",
|
||||
"recovery.dialog.title": "Unsaved changes found",
|
||||
"theme.lutraDark": "Lutra Dark",
|
||||
"theme.lutraLight": "Lutra Light"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue