feat(cmd): allow direct commit of synthetic records in records mode
Allow synthetic record edits to be applied directly to the model when not in drill mode, whereas they remain staged in drill state when a drill snapshot is active. This enables editing of records in plain records view. Additionally, add validation to prevent creating records with empty coordinates in both direct commits and when applying staged drill edits. Includes regression tests for persistence in blank models, drill state staging, and empty coordinate prevention. Co-Authored-By: fiddlerwoaroof/git-smart-commit (gemma-4-31B-it-UD-Q4_K_XL.gguf)
This commit is contained in:
@ -458,6 +458,10 @@ impl Effect for ApplyAndClearDrill {
|
||||
};
|
||||
app.model.set_cell(orig_key.clone(), value);
|
||||
} else {
|
||||
if new_value.is_empty() {
|
||||
app.status_msg = "Record coordinates cannot be empty".to_string();
|
||||
continue;
|
||||
}
|
||||
// Rename a coordinate: remove old cell, insert new with updated coord
|
||||
let value = match app.model.get_cell(orig_key) {
|
||||
Some(v) => v.clone(),
|
||||
|
||||
Reference in New Issue
Block a user