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:
Edward Langley
2026-04-14 02:32:03 -07:00
parent c79498b04b
commit 9710fb534e
5 changed files with 191 additions and 7 deletions

View File

@ -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(),