Removes dead use statements across dispatch, formula, import, model, and
UI modules. Prefixes intentionally unused variables with _ in app.rs,
analyzer.rs, and grid.rs.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When a formula Ref resolves to an item that doesn't exist in any
category, find_item_category returned None and the fallback
unwrap_or(name) used the item name as a category name. The resulting
key still matched the formula target, causing infinite recursion and a
stack overflow. Now returns None immediately via ? so the expression
evaluates to Empty.
Adds unit tests for Model (structure, cell I/O, views), formula
evaluation (arithmetic, WHERE, aggregation, IF), and a full
five-category Region×Product×Channel×Time×Measure integration test.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ImportPipeline holds all data and logic (raw JSON, records, proposals,
model_name, build_model). ImportWizard wraps it with UI-only state
(step, cursor, message). Rename WizardState → WizardStep throughout.
Headless import in dispatch.rs now constructs ImportPipeline directly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
move_selection() only clamped at 0, letting the row/col index go past
the last valid item. Selected_cell_key() would then return None, leaving
the cursor in a phantom position with no selectable cell.
Now clamp both row and col against the actual item count so pressing
Enter on the last row keeps the cursor on that row.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
N (from anywhere) or n (in Category panel) opens an inline prompt
to add categories one after another without typing :add-cat each time.
- Yellow border + prompt distinguishes it from item-add (green)
- Enter / Tab adds the category and clears the buffer, staying open
- Esc returns to the category list
- Cursor automatically moves to the newly added category
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Two new ways to add multiple items without repeating yourself:
1. :add-items <category> item1 item2 item3 ...
Adds all space-separated items in one command.
2. Category panel quick-add mode (press 'a' or 'o' on a category):
- Opens an inline prompt at the bottom of the panel
- Enter adds the item and clears the buffer — stays open for next entry
- Tab does the same as Enter
- Esc closes and returns to the category list
- The panel border turns green and the title updates to signal add mode
- Item count in the category list updates live as items are added
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Welcome overlay shown when model has no categories, listing common
commands and navigation hints to orient new users
- Vim-style keybindings:
- i / a → Insert mode (edit cell); Esc → Normal
- x → clear cell; yy / p → yank / paste
- G / gg → last / first row; 0 / $ → first / last col
- Ctrl+D / Ctrl+U → half-page scroll
- n / N → next / prev search match
- T → tile-select mode (single key, no Ctrl needed)
- ZZ → save + quit
- F / C / V → toggle panels (no Ctrl needed)
- ? → help (in addition to F1)
- Command mode (:) for vim-style commands:
:q :q! :w [path] :wq ZZ
:import <file.json> :export [path]
:add-cat <name> :add-item <cat> <item>
:formula <cat> <Name=expr> :add-view [name] :help
- Status bar now context-sensitive: shows mode-specific hint text
instead of always showing the same generic shortcuts
- Mode label changed: "Editing" → "INSERT" to match vim convention
- Title bar shows filename in parentheses when model is backed by a file
- Help widget updated with full key reference in two-column layout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>