- commit
- 45cb7f052a52336d2c1e00c94419a2892356960b
- parent
- 841f5437a470c9cd4742da55765f35430774da88
- author
- Dami <dami.etoile@gmail.com>
| A | README.md | 42 | ++++++++++++++++ |
| A | ROADMAP.md | 77 | ++++++++++++++++++++++++++++++ |
@@ -0,0 +1,42 @@
1+# one232+3+A Lotus 1-2-3 style spreadsheet for the terminal, built on Bubble Tea v2.4+5+```sh6+make run # build (pure Go, CGO_ENABLED=0) and start7+./bin/one23 budget.o238+```9+10+## Keys11+12+| Key | Action |13+|---|---|14+| Arrows, PgUp/PgDn, Tab/Shift+Tab, Home | Move the cell pointer |15+| Type text | Label (`'` left, `"` right, `^` center) |16+| Type `0-9 + - . ( @ # $ =` | Value or formula, e.g. `+A1*2`, `@SUM(A1..A5)` |17+| Arrow after an operator | POINT mode: arrow to a cell, `.` anchors a range |18+| F2 | Edit the current cell |19+| F5 | Go to an address |20+| Del | Erase the current cell |21+| `/` or `<` | Menu: Worksheet, Range, File, Quit (type first letters, e.g. `/fs`) |22+| F1 | Help |23+24+## Layout25+26+```27+cmd/one23 entry point28+internal/sheet engine: addresses, Pratt parser, evaluator, recalc, file format29+internal/ui Bubble Tea model: modes, menu, prompts, rendering30+e2e/ end-to-end tests: real binary on a pty, rendered by libghostty-vt31+```32+33+## Tests34+35+```sh36+make test # engine and UI unit tests37+make fuzz # fuzz the formula parser38+make e2e # builds libghostty-vt from source with Zig, then runs e2e tests39+```40+41+`make e2e` needs Zig 0.16+ and `pkg-config`. It is a separate Go module so the42+cgo dependency never reaches the main binary.@@ -0,0 +1,77 @@
1+# Roadmap: past 1-2-32+3+Principles: keyboard first, 1-2-3 muscle memory stays the default, the main4+binary stays pure Go (`CGO_ENABLED=0`), and every feature ships with unit5+tests plus a libghostty e2e test.6+7+## Phase 1: engine foundations (unblocks everything else)8+9+| Item | Why | Size |10+|---|---|---|11+| Command log: every mutation is a command with an inverse | Multi-level undo/redo, macro recording, later sync | M |12+| /Copy and /Move with relative and `$absolute` ref adjustment | 1-2-3 parity; `$` is parsed today but ignored | M |13+| Insert/Delete rows and columns with reference rewriting | Parity | M |14+| /Range Format: Fixed, Currency, Percent, Comma, Date | Parity, and the biggest visual gap today | S |15+| Range names (`@SUM(SALES)`) | Parity | S |16+| @DATE, @NOW, @PMT, @NPV, @IRR, @VLOOKUP | Lotus serial dates (with the 1900 leap-day quirk) done in-house | M |17+| Differential tests against `excelize` `CalcCellValue` | Test oracle: translate our formulas to Excel syntax, compare results | S |18+19+## Phase 2: modern UX20+21+| Item | Source of the idea | Building block | Size |22+|---|---|---|---|23+| Command palette (Ctrl+P), shows each command's key | VisiData, Quadratic, MS Edit | lipgloss v2 `Compositor` layers, `sahilm/fuzzy` | S-M |24+| Formula autocomplete and signature hint while typing `@SU` | Excel, Sheets | third panel line, function table | M |25+| Live SUM/AVG/COUNT of the pointed range in the status line | Excel | engine `aggregate` | S |26+| Trace precedents/dependents: highlight, `[` and `]` to jump | Excel | dependency graph already exists | M |27+| One-key frozen titles | csvlens, sc-im, 1-2-3 /Worksheet Titles | viewport split | S-M |28+| Search (`n`/`N`) and non-destructive row filter | csvlens | | M |29+| Fill down / fill series (1,2,3, Jan, Feb) | Excel, Sheets | needs Copy ref adjustment | S-M |30+| Optional vim keymap (`hjkl`, counts, `:` commands) | sc-im, csvlens | `bubbles/v2/key` bindings | M |31+| Frequency table of a column as a derived sheet | VisiData Shift+F | | M |32+33+## Phase 3: terminal-native features34+35+| Item | API | Notes |36+|---|---|---|37+| Copy range as TSV to the system clipboard | `tea.SetClipboard` (OSC 52) | Works over SSH |38+| Paste TSV/CSV into a range | `tea.PasteMsg` (bracketed paste, already on) | |39+| Text charts in a popup (/Graph) | `ntcharts/v2` | Works everywhere |40+| Real image charts | x/ansi `kitty` Unicode placeholders + `tea.Raw` | Ghostty/kitty; survives the diff renderer and tmux. Sixel fallback redrawn on resize |41+| Clickable URLs in cells | lipgloss `Style.Hyperlink` (OSC 8) | |42+| Red undercurl on ERR cells | `UnderlineStyle(UnderlineCurly).UnderlineColor` | |43+| Bar cursor in EDIT, block elsewhere | `View.Cursor.Shape` | |44+| Light/dark palette | `tea.RequestBackgroundColor` | |45+| Progress bar and notification for long imports | `View.ProgressBar`, `ansi.Notify` | |46+| Hold-to-preview, shift+enter | `View.KeyboardEnhancements` | kitty protocol terminals |47+48+Bubble Tea v2 already turns on synchronized output (2026) and grapheme width49+(2027) when the terminal supports them.50+51+## Phase 4: data in and out (all pure Go)52+53+| Format | Library |54+|---|---|55+| CSV/TSV | stdlib `encoding/csv` plus a small dialect sniffer |56+| XLSX | `github.com/xuri/excelize/v2` |57+| SQLite | `modernc.org/sqlite` |58+| Parquet | `github.com/parquet-go/parquet-go` |59+| Lotus .wk1 | in-house (no Go reader exists), from the LibreOffice and Gnumeric filters |60+61+Avoid in the main binary: DuckDB and automerge (both need cgo).62+63+## Phase 5: beyond64+65+- Multiple sheets with `B:A1` style references (1-2-3 R3), sheet tabs. Engine gets a sheet dimension. L.66+- Pivot tables as derived sheets. L.67+- Macros: replay the command log; Starlark (`go.starlark.net`) for scripts, with step limits.68+- Serve over SSH with `charm.land/wish/v2`.69+- Decimal mode for currency (`cockroachdb/apd/v3`), opt-in.70+- Demos in CI with VHS tapes; screenshots with freeze.71+72+## Suggested order73+74+1. Command log + undo, Copy/Move with ref adjustment, Range Format.75+2. Command palette, autocomplete, status line stats.76+3. CSV and XLSX import/export.77+4. Charts (text first, then kitty placeholders).