Add view navigation history with back/forward stacks (bound to < and >).
Introduce CategoryKind enum to distinguish regular categories from
virtual ones (_Index, _Dim) that are synthesized at query time.
Add DrillIntoCell command that creates a drill view showing raw data
for an aggregated cell, expanding categories on Axis::None into Row
and Column axes while filtering by the cell's fixed coordinates.
Virtual categories default to Axis::None and are automatically added
to all views when the model is initialized.
Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
Add #[derive(Default)] to CmdRegistry and Keymap structs, enabling
easy construction of empty instances with CmdRegistry::default() and
Keymap::default().
This simplifies initialization code and follows Rust conventions for
types that hold empty collections as their default state.
Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
Refactor command registry to use prototype-based registration instead of
string-based names. This makes the API more consistent and type-safe.
Changes:
- Changed Cmd::name() to return &'static str instead of &str
- Updated CmdRegistry::register, register_pure, and register_nullary to accept
prototype command instances instead of string names
- Added NamedCmd helper struct for cases where command is built by closure
- Updated all command implementations to return static string literals
- Modified EnterMode::execute to clear buffers when entering text-entry modes
Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
Remove the key_modifiers field from CmdContext struct and all its usages.
This simplifies the command context by removing unused modifier state.
The Cmd trait's execute method no longer receives key modifiers.
Changes:
- Removed KeyModifiers import from cmd.rs
- Removed key_modifiers field from CmdContext struct
- Removed file_path_set field from CmdContext (unused)
- Updated App::cmd_context to not populate key_modifiers
- Removed KeymapSet::registry() accessor
- Updated test code to match new struct layout
- Added documentation to Cmd::name() method
Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
Refactor command system to pre-resolve cell key and grid dimensions
in CmdContext, eliminating repeated GridLayout construction.
Key changes:
- Add cell_key, row_count, col_count to CmdContext
- Replace generic CmdRegistry::register with
register/register_pure/register_nullary
- Cell commands (clear-cell, yank, paste) now take explicit CellKey
- Update keymap dispatch to use new interactive() method
- Special-case "search" buffer in SetBuffer effect
- Update tests to populate new context fields
This reduces code duplication and makes command execution more
efficient by computing layout once at context creation time.
Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
Refactor the keymap system to use string-based command names instead of
concrete command struct instantiations. This introduces a Binding enum that
can represent either a command lookup (name + args) or a prefix sub-keymap.
Key changes:
- Keymap now stores Binding enum instead of Arc<dyn Cmd>
- dispatch() accepts CmdRegistry to resolve commands at runtime
- Added bind_args() for commands with arguments
- KeymapSet now owns the command registry
- Removed PrefixKey struct, inlined its logic
- Updated all default keymap bindings to use string names
This enables more flexible command configuration and easier testing.
Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
Update command tests to work with the new trait-based system:
- Tests now use ExecuteCommand instead of QuitCmd
- Added buffer setup with 'q' command for quit functionality
- Tests verify effects contain SetStatus or ChangeMode via debug output
- Removed direct QuitCmd construction in favor of ExecuteCommand
The tests verify that quit behavior works correctly when dirty vs
clean, ensuring the new command system produces the expected effects.
Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
Remove the old JSON-based command infrastructure:
- Delete Command enum and CommandResult from types.rs
- Remove QuitCmd and InitBuffer command implementations
- Delete entire dispatch.rs file that handled command execution
- Remove Command type exports from mod.rs
The old system used a monolithic Command enum with serde serialization.
The new trait-based system is more flexible and doesn't require JSON
serialization for command execution.
Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
Introduce a new trait-based command architecture that replaces the
previous JSON-based Command enum. The new system uses:
- Cmd trait: Commands are trait objects that produce Effects
- CmdRegistry: Central registry for parsing commands from text
- ParseFn: Function type for parsing string arguments into commands
- effect_cmd! macro: Helper macro for defining parseable commands
The registry allows commands to be registered by name and parsed from
Forth-style text arguments. This enables both TUI and headless modes
to use the same command parsing infrastructure.
Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
Introduce HandleWizardKey command to dispatch keys to the import wizard.
Add ExecuteCommand implementation that parses and executes various
commands like :quit, :write, :import, :add-item, and :formula.
Handles argument parsing, validation, and mode transitions.
Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
Add comprehensive command implementations for managing panel cursors
(formula_cursor, cat_panel_cursor, view_panel_cursor), tile selection,
text buffers, and search functionality.
Update EnterEditMode to use SetBuffer effect before changing mode.
Update EnterTileSelect to use SetTileCatIdx effect before changing mode.
Add keymap bindings for all new modes with navigation (arrows/hjkl),
editing actions (Enter, Backspace, Char), and mode transitions (Esc, Tab).
Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
Add new fields to CmdContext for tracking search mode, panel cursors,
tile category index, named text buffers, and key information.
Add SetBuffer and SetTileCatIdx effects for managing application state.
Update TileBar to accept tile_cat_idx parameter for rendering.
Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
- Implemented a suite of new commands for panel visibility, editing, export
prompts, search navigation, page cycling, and grid operations.
- Updated tests to cover new command behavior.
- Adjusted command context usage accordingly.
Co-Authored-By: fiddlerwoaroof/git-smart-commit (gpt-oss:20b)
- Updated imports to include Panel and Axis.
- Added new fields to CmdContext: formula_panel_open, category_panel_open,
view_panel_open.
- Reformatted effect vectors for consistency.
- Minor formatting changes to improve readability.
Co-Authored-By: fiddlerwoaroof/git-smart-commit (gpt-oss:20b)