feat: ADR-0006 §8 steps 4-5 — undo/redo commands + confirm-modal flow
Commands & grammar (step 4):
- AppCommand::Undo/Redo, grammar nodes + REGISTRY entries, catalog
help/usage + keys; parse tests
- replay skips undo/redo (is_app_lifecycle_entry_word) + completion
entry-keyword lockstep; replay-skip test extended
Wiring (step 5):
- Action::{PrepareUndo,PrepareRedo,Undo,Redo} + AppEvent::{UndoPrepared,
UndoUnavailable,UndoSucceeded,UndoFailed}
- App: undo_enabled flag, Modal::UndoConfirm, dispatch + event handling
+ confirm-key handler (Y confirms / N/Esc cancels); "turned off" when
--no-undo; "nothing to undo/redo" when empty
- ui::render_undo_confirm names the command + snapshot time
- runtime: opens with undo enabled (!--no-undo), threads it through the
project-switch path, spawn_prepare_undo/spawn_undo (peek->modal,
restore->refresh tables + schema cache)
- 9 Tier-1 app tests + 3 parse tests
1692 passed / 0 failed / 1 ignored; clippy clean.
This commit is contained in:
@@ -168,6 +168,8 @@ pub const KEYS_AND_PLACEHOLDERS: &[(&str, &[&str])] = &[
|
||||
("help.app.import", &[]),
|
||||
("help.app.mode", &[]),
|
||||
("help.app.messages", &[]),
|
||||
("help.app.undo", &[]),
|
||||
("help.app.redo", &[]),
|
||||
("help.ddl.create", &[]),
|
||||
("help.ddl.drop", &[]),
|
||||
("help.ddl.add", &[]),
|
||||
@@ -257,7 +259,9 @@ pub const KEYS_AND_PLACEHOLDERS: &[(&str, &[&str])] = &[
|
||||
("parse.usage.new", &[]),
|
||||
("parse.usage.quit", &[]),
|
||||
("parse.usage.rebuild", &[]),
|
||||
("parse.usage.redo", &[]),
|
||||
("parse.usage.replay", &[]),
|
||||
("parse.usage.undo", &[]),
|
||||
("parse.usage.save", &[]),
|
||||
("parse.usage.select", &[]),
|
||||
("parse.usage.show_data", &[]),
|
||||
@@ -353,6 +357,22 @@ pub const KEYS_AND_PLACEHOLDERS: &[(&str, &[&str])] = &[
|
||||
("modal.rebuild_cancelled", &[]),
|
||||
("modal.rebuild_confirm_prompt", &[]),
|
||||
("modal.rebuild_confirm_title", &[]),
|
||||
("modal.redo_cancelled", &[]),
|
||||
("modal.redo_confirm_command", &[]),
|
||||
("modal.redo_confirm_title", &[]),
|
||||
("modal.undo_cancelled", &[]),
|
||||
("modal.undo_confirm_command", &[]),
|
||||
("modal.undo_confirm_prompt", &[]),
|
||||
("modal.undo_confirm_title", &[]),
|
||||
("modal.undo_confirm_when", &["timestamp"]),
|
||||
// ---- Undo / redo command surfaces (ADR-0006 Amendment 1) ----
|
||||
("undo.disabled", &[]),
|
||||
("undo.nothing_to_undo", &[]),
|
||||
("undo.nothing_to_redo", &[]),
|
||||
("undo.undone_ok", &["command"]),
|
||||
("undo.redone_ok", &["command"]),
|
||||
("undo.undo_failed", &["error"]),
|
||||
("undo.redo_failed", &["error"]),
|
||||
// ---- Status bar + panels ----
|
||||
("panel.hint_empty", &[]),
|
||||
("panel.hint_title", &[]),
|
||||
|
||||
Reference in New Issue
Block a user