fix(records): allow adding rows in empty records view
Add helper methods to CmdContext to clarify layout state and synthetic record presence. Update AddRecordRow to check for records mode generally rather than requiring a synthetic record at the current cursor, which allows adding the first row to an empty records view. Includes a regression test for the empty records view scenario. Co-Authored-By: fiddlerwoaroof/git-smart-commit (gemma-4-31B-it-UD-Q4_K_XL.gguf)
This commit is contained in:
@ -228,11 +228,7 @@ impl Cmd for EditOrDrill {
|
||||
.unwrap_or(false)
|
||||
});
|
||||
// In records mode (synthetic key), always edit directly — no drilling.
|
||||
let is_synthetic = ctx
|
||||
.cell_key()
|
||||
.as_ref()
|
||||
.and_then(crate::view::synthetic_record_info)
|
||||
.is_some();
|
||||
let is_synthetic = ctx.synthetic_record_at_cursor().is_some();
|
||||
let is_aggregated = !is_synthetic && regular_none;
|
||||
if is_aggregated {
|
||||
let Some(key) = ctx.cell_key().clone() else {
|
||||
|
||||
Reference in New Issue
Block a user