131 Commits

Author SHA1 Message Date
94bc3ca282 feat(ui): improve row selection highlighting in grid
Add a subtle dark-gray background color constant for row highlighting.

Apply the highlight background across the entire selected row area,
including gaps between columns and the margin after the last column.

Apply the highlight background to individual cells in the selected row,
using DarkGray for empty values and White for non-empty values.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
2026-04-05 12:30:15 -07:00
f56ca2c66a feat(ui): add dynamic column widths for records mode
Implement dynamic column widths for the grid widget when in records mode.

In records mode, each column width is computed based on the widest
content (pending edit, record value, or header label), with a minimum
of 6 characters and maximum of 32. Pivot mode continues to use fixed
10-character column widths.

The rendering code has been updated to use the computed column widths
and x-offsets for all grid elements: headers, data cells, and totals.
Note that the total row is now only displayed in pivot mode, as it
is not meaningful in records mode.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
2026-04-05 11:53:37 -07:00
78df3a4949 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)
2026-04-05 11:45:36 -07:00
19645a34cf feat: add records mode (long-format view) for drill-down
Implement records mode (long-format view) when drilling into aggregated cells.

Key changes:
- DrillIntoCell now creates views with _Index on Row and _Dim on Column
- GridLayout detects records mode and builds a records list instead of
  cross-product row/col items
- Added records_display() to render individual cell values in records mode
- GridWidget and CSV export updated to handle records mode rendering
- category_names() now includes virtual categories (_Index, _Dim)
- Tests updated to reflect virtual categories counting toward limits

Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
2026-04-05 11:10:41 -07:00
67041dd4a5 feat: add view history navigation and drill-into-cell
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)
2026-04-05 10:57:28 -07:00
b2d633eb7d chore: update gitignore 2026-04-05 01:39:02 -07:00
401a63f544 bench: add profiling workload generator
Generates Forth-style command scripts that build a multi-dimensional
model and exercise the grid aggregation hot path via repeated
export-csv calls. Used for profiling with samply.

Usage:
  python3 bench/gen_workload.py --scale 5 > /tmp/workload.txt
  cargo build --profile profiling
  samply record ./target/profiling/improvise script /tmp/workload.txt

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 01:38:45 -07:00
3d11daca18 chore: update gitignore 2026-04-05 01:09:37 -07:00
ab5f3a5a86 feat(build): add profiling profile configuration
Add a new [profile.profiling] section to Cargo.toml.

This profile inherits from release but with:
- strip = false: Keep debug symbols for profiling
- debug = 2: Full debug information for analysis

Useful for generating profiling data with symbol information.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
2026-04-05 01:09:17 -07:00
377d417e5a feat(model): add symbol table module
Add a new SymbolTable module for interned string identifiers.

The module implements a bidirectional mapping between strings and
Symbol IDs using a HashMap. Key functionality includes:

- intern(): Add a string to the table and return its Symbol ID
- get(): Look up a string by Symbol ID
- resolve(): Get the original string for a Symbol ID
- intern_pair() and intern_coords(): Helper functions for structured
  data interning

The implementation includes unit tests to verify correct behavior.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
2026-04-05 01:09:17 -07:00
872c4c6c5d refactor: add Default derives to CmdRegistry and Keymap
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)
2026-04-05 01:07:08 -07:00
d3a1a57c78 refactor: improve dot separator parsing in command parser
Change split_on_dot() to require dot to be a standalone word
surrounded by whitespace or at line boundaries, rather than any
dot character.

This prevents accidental splitting on dots within identifiers or
quoted strings, making the command syntax more predictable.

The new logic checks both preceding and following bytes to ensure
the dot is truly isolated before treating it as a separator.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
2026-04-05 01:07:08 -07:00
82ad459c4e feat: intern cell keys for O(1) comparison and indexing
Refactor DataStore to use interned keys (InternedKey) instead of
string-based CellKey for O(1) hash and compare operations.

Introduce SymbolTable-backed interning for all category and item
names, storing them as Symbol identifiers throughout the data structure.

Add secondary index mapping (category, item) pairs to sets of interned
keys, enabling efficient partial match queries without scanning all cells.

Optimize matching_values() to avoid allocating CellKey strings by
working directly with interned keys and intersecting index sets.

Update all callers to use new API: iter_cells(), matching_values(),
and internal lookup_key() helper.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
2026-04-05 01:07:08 -07:00
6c211e5421 feat(ui): add buffers HashMap for text input state management
Introduce a buffers HashMap to manage text input state across different
modes (command, edit, formula, category, export).

Changes:
- Added buffers field to GridWidget and updated constructor
- Updated draw_command_bar to use app.buffers instead of mode buffer
- Updated grid edit indicator to use buffers HashMap
- Added tests for command mode buffer behavior:
  * command_mode_typing_appends_to_buffer
  * command_mode_buffer_cleared_on_reentry

Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
2026-04-04 18:37:43 -07:00
0f1de6ba58 refactor(keymap): add Char key fallback and remove unused SHIFT binding
Improve keymap lookup for Char keys by adding fallback to NONE modifiers.
Terminals vary in whether they send SHIFT for uppercase/symbol characters,
so we now retry without modifiers when an exact match fails.

Also removed the unused shift variable and updated key bindings to use
NONE modifiers instead of SHIFT for consistency.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
2026-04-04 18:37:43 -07:00
89fdb27d6c refactor(command): switch to prototype-based command registration
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)
2026-04-04 18:37:43 -07:00
e2ff9cf98e refactor(command): remove key_modifiers from CmdContext
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)
2026-04-04 12:40:55 -07:00
c6c8ac2c69 chore: clippy + format 2026-04-04 12:34:50 -07:00
35946afc91 refactor(command): pre-resolve cell key and grid dimensions in CmdContext
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)
2026-04-04 12:33:11 -07:00
649d80cb35 refactor(command): decouple keymap bindings from command implementations
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)
2026-04-04 11:02:00 -07:00
a45390b7a9 refactor(command): rename commands and extract panel/axis parsers
Rename several commands for consistency:
- save -> save-as (SaveAsCmd)
- save-cmd -> save (SaveCmd)
- enter-search -> search (EnterSearchMode)
- enter-edit -> enter-edit-mode (EnterEditMode)
- exit-search -> exit-search-mode (ExitSearchMode)

Add new commands:
- search-or-category-add
- search-append-char
- search-pop-char
- toggle-panel-and-focus
- toggle-panel-visibility
- command-mode-backspace

Extract parse_panel() and parse_axis() helper functions to replace
repeated match statements. Update documentation comments to reflect
quasi-lisp syntax instead of Forth-style.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
2026-04-04 10:57:37 -07:00
830869d91c test(command): update tests to use ExecuteCommand instead of QuitCmd
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)
2026-04-04 10:56:35 -07:00
32716ebc16 refactor(main): update headless mode to use App and new command system
Update headless command execution to use the new architecture:

- Removed CommandResult import (no longer needed)
- Headless mode now creates an App instance and uses cmd_context()
- Commands are parsed and executed via the registry, effects applied
  through app.apply_effects() instead of command::dispatch()
- Made cmd_context() public so headless mode can access it
- Updated persistence save to use app.model instead of direct model

Tests updated to use ExecuteCommand instead of QuitCmd, with proper
buffer setup for command parsing.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
2026-04-04 10:56:35 -07:00
00c62d85b7 feat(ui): add LoadModel and ImportJsonHeadless effects
Add two new effects for headless model operations:

- LoadModel: Loads a model from a file path, replacing the current one
- ImportJsonHeadless: Imports JSON/CSV files via the analyzer, builds
  a new model from detected fields, and replaces the current model

These effects enable headless mode to load and import data without
interactive prompts. ImportJsonHeadless handles both CSV and JSON
files, auto-detects array paths, and uses the existing import pipeline.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
2026-04-04 10:56:35 -07:00
64ab352490 refactor(command): update parsing to use registry-based system
Update the command parsing layer to use the new CmdRegistry:

- parse_line() now uses default_registry() and returns Vec<Box<dyn Cmd>>
- parse_line_with() accepts a registry parameter for custom registries
- Tokenization replaced direct Command construction with registry.parse()
- Updated tests to verify command names instead of struct fields
- Removed parse_command() and helper functions (require_args, parse_coords,
  etc.)

The parser now delegates command construction to the registry, which
allows commands to be defined and registered in one place.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
2026-04-04 10:56:35 -07:00
909c20bcbd refactor(command): remove old Command enum and dispatch system
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)
2026-04-04 10:56:35 -07:00
1e8bc7a135 feat(command): add trait-based command system with registry
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)
2026-04-04 10:56:34 -07:00
2be1eeae5d refactor(app): remove legacy command execution code
Remove unused imports for legacy code that is no longer needed.

Delete execute_command function that handled :q, :w, :import
commands via direct AppMode matching.

Delete handle_wizard_key function and associated fallback logic
for modes not yet migrated to keymaps. These are now handled
by the new keymap-based approach.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
2026-04-04 10:42:25 -07:00
b8cff2488c feat(effect): add WizardKey and StartImportWizard effects
Add WizardKey effect to handle key bindings for navigating
wizard steps: Preview, SelectArrayPath, ReviewProposals,
ConfigureDates, DefineFormulas, and NameModel.

Add StartImportWizard effect to initialize the wizard by
reading and parsing a JSON file.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
2026-04-04 10:42:25 -07:00
4941b6f44c feat(keymap): add ImportWizard mode with Any key pattern
Add Any key pattern as lowest priority fallback in KeyPattern enum.

Add ImportWizard to ModeKey enum and its mapping from AppMode.
Modify key lookup to fall back to Any pattern for unmatched keys.

Change Enter key in command mode to execute ExecuteCommand.
Add ImportWizard keymap that binds all keys to HandleWizardKey.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
2026-04-04 10:42:25 -07:00
630367a9b0 feat(command): add HandleWizardKey and ExecuteCommand handlers
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)
2026-04-04 10:42:25 -07:00
3c561adf05 chore: clippy send + sync warnings, drop warnings 2026-04-04 10:01:27 -07:00
0db89b1e3a chore: clippy + fmt 2026-04-04 09:59:01 -07:00
d8f7d9a501 feat(commands): add panel cursor and tile selection commands
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)
2026-04-04 09:58:31 -07:00
ebe8df89ee refactor(app): wire up keymap dispatch and remove old handlers
Update handle_key to pass key code and modifiers to cmd_context.
Update keymap_set.dispatch to pass search_mode from App state.

Remove old-style panel handlers (handle_edit_key, handle_formula_edit_key,
handle_formula_panel_key, etc.) - approximately 500 lines.

Update handle_command_mode_key to use buffers map for command execution.
All other modes now handled via keymap dispatch.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
2026-04-04 09:58:31 -07:00
5cd3cf3c18 feat(app): add tile_cat_idx and buffers to App state
Add tile_cat_idx field to track selected tile category index.
Add buffers HashMap for named text buffers used in text-entry modes.

Update AppMode::TileSelect to remove nested cat_idx struct.
Update cmd_context to accept key and modifiers parameters.
Update cmd_context to populate new fields from App state.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
2026-04-04 09:58:31 -07:00
e976b3c49a feat(keymap): add AnyChar pattern and new mode variants
Add AnyChar key pattern for text-entry modes that matches any Char key.

Add new mode variants to ModeKey: FormulaPanel, CategoryPanel, ViewPanel,
TileSelect, Editing, FormulaEdit, CategoryAdd, ItemAdd, ExportPrompt,
CommandMode, and SearchMode.

Update Keymap::lookup to fall back to AnyChar for Char keys.
Update KeymapSet::get to accept search_mode parameter.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
2026-04-04 09:58:31 -07:00
b7e4316cef feat(command): add CmdContext extensions and new effects
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)
2026-04-04 09:58:30 -07:00
56839b81d2 fix transient keymap consumption bug
- Fixed transient keymap consumption logic: the transient keymap is now only
  consumed when a match is found.
- Updated handle_key to retain transient keymap if no command matches, allowing
  subsequent key presses to be processed by the main keymap set.
- Added issue noting the previous unintended consumption.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (gpt-oss:20b)
2026-04-04 09:31:49 -07:00
67fca18200 tidy method calls
- Reformatted method calls in RemoveFormula and SetAxis for consistency.
- Minor formatting changes to improve readability.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (gpt-oss:20b)
2026-04-04 09:31:49 -07:00
387190c9f7 overhaul keymap handling and remove pending key
- Updated imports to include Arc and removed KeyModifiers.
- Replaced pending_key with transient_keymap and keymap_set.
- Added KeymapSet for mode-specific keymaps.
- Removed legacy pending key logic and many helper methods.
- Updated tests to use new command execution pattern.
- Adjusted App struct and methods to align with new keymap system.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (gpt-oss:20b)
2026-04-04 09:31:49 -07:00
dfae4a882d tidy apply_config_to_pipeline signature
- Combined function signature into a single line for readability.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (gpt-oss:20b)
2026-04-04 09:31:49 -07:00
9afa13f78a improve error formatting
- Added missing comma in error message for set-cell command.
- Reformatted error messages for consistency.
- Minor formatting changes to improve readability.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (gpt-oss:20b)
2026-04-04 09:31:49 -07:00
bfc30cb7b2 overhaul keymap API and add Debug
- Replaced ModeKey with direct KeyPattern keys.
- Stored bindings as Arc<dyn Cmd> for cheap sharing.
- Added Debug implementation for Keymap.
- Updated bind, bind_cmd, bind_prefix, lookup, and dispatch signatures.
- Introduced PrefixKey command and SetTransientKeymap effect.
- Added KeymapSet for mode-specific keymaps.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (gpt-oss:20b)
2026-04-04 09:31:49 -07:00
c188ce3f9d add panel toggling and new command implementations
- 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)
2026-04-04 09:31:48 -07:00
f2bb8ec2a7 update CmdContext and imports
- 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)
2026-04-04 09:31:48 -07:00
038c99c473 chore: update gitignore 2026-04-03 23:07:13 -07:00
f7436e73ba refactor: add Keymap with default bindings and wire into handle_key
Create keymap.rs with Keymap struct mapping (mode, key) to Cmd trait
objects. Wire into App::handle_key — keymap dispatch is tried first,
falling through to old handlers for unmigrated bindings. Normal mode
navigation, cell ops, mode switches, and Help mode are keymap-driven.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 22:40:36 -07:00
0c751b7b8b refactor: add Cmd trait with CmdContext and first command implementations
Define Cmd trait (execute returns Vec<Box<dyn Effect>>) and CmdContext
(read-only state snapshot). Implement navigation commands (MoveSelection,
JumpTo*, ScrollRows), mode commands (EnterMode, Quit, SaveAndQuit),
cell operations (ClearSelectedCell, YankCell, PasteCell), and view
commands (TransposeAxes, Save, EnterSearchMode).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 22:38:56 -07:00
9421d01da5 refactor: add Effect trait and apply_effects infrastructure
Define Effect trait in ui/effect.rs with concrete effect structs for
all model mutations, view changes, navigation, and app state updates.
Each effect implements apply(&self, &mut App). Add App::apply_effects
to apply a sequence of effects. No behavior change yet — existing
key handlers still work as before.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 22:36:44 -07:00