5 Commits

Author SHA1 Message Date
42d869e4c2 refactor(ui): integrate centralized layout and display logic
Update UI components and view layout to use the new centralized layout and
display logic.

- Update `CategoryPanel` to remove redundant title text.
- Update `ViewPanel` to remove redundant title text.
- Refactor `Effect` implementations to use `display_value` and `Rc` for
  records.
- Update `GridWidget` to use the centralized `layout` and `display_text` .
- Refactor `GridLayout` to support synthetic keys for records mode and
  unified display.
- Update `view` module to re-export `synthetic_record_info` .

Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q5_K_XL)
2026-04-07 09:29:45 -07:00
d32a6140b8 refactor(core): centralize formatting logic
Move formatting logic to a new `format` module and update `main.rs` and
`persistence` to use it.

- Create `src/format.rs` with shared formatting functions.
- Update `src/main.rs` to include the `format` module.
- Refactor `src/persistence/mod.rs` to use the new `display_text` logic via
  `GridLayout` .

Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q5_K_XL)
2026-04-07 09:29:45 -07:00
9251e37180 refactor(ui): optimize record sharing and centralize layout management
Refactor `App` and `DrillState` to use `Rc` for efficient sharing of frozen
records and integrate a persistent `layout` field.

- Update `DrillState` to use `Rc<Vec<(CellKey, CellValue)>>` for records.
- Add `layout` field to `App` .
- Implement `rebuild_layout()` in `App` to refresh the grid layout.
- Ensure `layout` is rebuilt after applying effects and handling key
  events.
- Update `App::new` and `App::cmd_context` to use the new layout
  management.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q5_K_XL)
2026-04-07 09:29:45 -07:00
492d309277 feat(command): update keybindings for navigation and editing
Update keybindings to support new navigation commands and improve user
experience.

- Bind `Home` to `jump-first-col` and `End` to `jump-last-col` .
- Bind `PageUp` and `PageDown` to `page-scroll` .
- Update `o` keybinding from `add-record-row` to `open-record-row` .
- Bind `Tab` to `commit-and-advance-right` in editing mode.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q5_K_XL)
2026-04-07 09:29:45 -07:00
85a459289d refactor(command): unify layout access and navigation commands
Refactor `CmdContext` to delegate layout-related information (row/column
counts, categories, cell keys) to a `GridLayout` object.

- Add `layout` field to `CmdContext` .
- Implement helper methods on `CmdContext` to access layout data.
- Consolidate multiple jump commands ( `JumpToFirstRow` , `JumpToLastRow` ,
  `JumpToFirstCol` , `JumpToLastCol` ) into a single `JumpToEdge` command.
- Introduce `ScrollRows` and `PageScroll` commands for improved navigation.
- Update `CursorState` instantiation to use the new context structure.
- Update command registry to use the new unified commands and macros.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q5_K_XL)
2026-04-07 09:29:45 -07:00

Diff Content Not Available