feat: add records-mode drill-down with staged edits

Introduce records-mode drill-down functionality that allows users to
edit individual records without immediately modifying the underlying model.

Key changes:
- Added DrillState struct to hold frozen records snapshot and pending edits
- New effects: StartDrill, ApplyAndClearDrill, SetDrillPendingEdit
- Extended CmdContext with records_col and records_value for records mode
- CommitCellEdit now stages edits in pending_edits when in records mode
- DrillIntoCell captures a snapshot before switching to drill view
- GridLayout supports frozen records for stable view during edits
- GridWidget renders with drill_state for pending edit display

In records mode, edits are staged and only applied to the model when
the user navigates away or commits. This prevents data loss and allows
batch editing of records.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
This commit is contained in:
Edward Langley
2026-04-05 11:45:36 -07:00
parent 19645a34cf
commit 78df3a4949
6 changed files with 311 additions and 12 deletions

View File

@ -245,7 +245,13 @@ fn draw_content(f: &mut Frame, area: Rect, app: &App) {
}
f.render_widget(
GridWidget::new(&app.model, &app.mode, &app.search_query, &app.buffers),
GridWidget::new(
&app.model,
&app.mode,
&app.search_query,
&app.buffers,
app.drill_state.as_ref(),
),
grid_area,
);
}