Commit Graph

19 Commits

Author SHA1 Message Date
98d151f345 refactor: unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M 2026-03-31 23:10:52 -07:00
f1e6e61bca Revert "test: use gpt-oss-20b to do some minor refactoring"
This reverts commit bbd1f48b78.
2026-03-31 22:50:10 -07:00
bbd1f48b78 test: use gpt-oss-20b to do some minor refactoring 2026-03-31 22:50:07 -07:00
bbfd2dc163 refactor: TuiGuard -> TuiContext 2026-03-31 22:05:02 -07:00
85eabebd88 refactor: extract terminal setup/teardown 2026-03-31 21:27:40 -07:00
22ea265b63 refactor: inline print_usage 2026-03-31 20:59:39 -07:00
dda5571faf refactor: inline run_headless 2026-03-31 20:58:43 -07:00
c32e800128 refactor: split main code paths for clarity. 2026-03-31 20:52:28 -07:00
aae8392f46 refactor: continue simplifying entrypoint 2026-03-31 20:15:20 -07:00
866a6ff589 chore: more cleaning 2026-03-30 23:55:08 -07:00
af0b2c6fdd refactor: more entrypoint simplifications
initial model calculated in its own function
2026-03-30 23:37:04 -07:00
3e3ac05b05 refactor: cleanup entry point 2026-03-30 23:30:57 -07:00
a655078997 fix: --import now opens the wizard instead of doing a headless auto-import
Previously --import ran ImportJson headless before the TUI started,
hitting the category limit and printing the error to stderr where it
was invisible. Now it parses the JSON and opens the ImportWizard on
startup, matching :import behavior.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 15:18:37 -07:00
45b848dc67 fix: navigation bounds and stale state after model load
- app.rs: scroll_rows (Ctrl+D/U) now clamps to the cross-product row
  count and follows the viewport, matching move_selection's behaviour.
  Previously it could push selected past the last row, causing
  selected_cell_key to return None and silently ignoring edits.
- model.rs: add normalize_view_state() which resets row/col offsets to
  zero on all views.
- main.rs, dispatch.rs, app.rs: call normalize_view_state() after every
  model replacement (initial load, :Load command, wizard import) so
  stale offsets from a previous session can't hide the grid.
- app.rs: clamp formula_cursor to the current formula list length at the
  top of handle_formula_panel_key so a model reload with fewer formulas
  can't leave the cursor pointing past the end.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 23:32:26 -07:00
cc072e192d Chore: remove unused imports and suppress unused variable warnings
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>
2026-03-21 23:35:50 -07:00
c9d1313072 Add quick-add mode for categories
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>
2026-03-21 23:03:45 -07:00
4f322e53cd Add quick multi-item entry to categories
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>
2026-03-21 22:51:36 -07:00
66dfdf705f Improve UX: welcome screen, vim keybindings, command mode
- 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>
2026-03-21 22:41:35 -07:00
eae00522e2 Initial implementation of Improvise TUI
Multi-dimensional data modeling terminal application with:
- Core data model: categories, items, groups, sparse cell store
- Formula system: recursive-descent parser, named formulas, WHERE clauses
- View system: Row/Column/Page axes, tile-based pivot, page slicing
- JSON import wizard (interactive TUI + headless auto-mode)
- Command layer: all mutations via typed Command enum for headless replay
- TUI: Ratatui grid, tile bar, formula/category/view panels, help overlay
- Persistence: .improv (JSON), .improv.gz (gzip), CSV export, autosave
- Static binary via x86_64-unknown-linux-musl + nix flake devShell
- Headless mode: --cmd '{"op":"..."}' and --script file.jsonl

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 21:11:55 -07:00