testing.md describes doccheck and the docs tests, says how tapes reach commands and when docs/media is updated, and loses a repeated paragraph on test config directories. UX.md's checklist asks for the feature's doc and keys.md rather than a README keys table that doesn't exist. CLAUDE.md names doccheck and the one-home rule. data.md gives Alt+A for replace all, which the find bar takes. The charts tape reaches Insert > Chart through the palette: its menu position changed.
- commit
- 24a404b3bed868bd1ff266af1ad578df0284bc4f
- parent
- e389ff447c3d071a77e1915edc64cc00d0863ba9
- author
- Dami <dami.etoile@gmail.com>
| M | CLAUDE.md | 8 | +++- |
| M | demos/ | 11 | ++--- |
| M | docs/ | 5 | ++- |
| M | docs/ | 2 | +- |
| M | docs/ | 61 | ++++++++++++++++++++---------- |
@@ -8,8 +8,8 @@ Read [docs/UX.md](docs/UX.md), [docs/extending.md](docs/extending.md) and
88 Noise that stays becomes invisible, and then real problems hide in it.99 1010 - `make check` passes before every push: gofmt, vet, `make lint`11- (staticcheck in every module, doclint, cognitive complexity at most 25,12- Go files at most 500 lines), unit tests, the excelize oracle and the11+ (staticcheck in every module, doclint, doccheck, cognitive complexity12+ at most 25, Go files at most 500 lines), unit tests, the excelize oracle and the1313 libghostty e2e tests. A red check is fixed first, not worked around.1414 - A warning is fixed where it points, or turned off in its tool's config1515 with the reason written next to it (`staticcheck.conf`). Nothing is left@@ -19,5 +19,9 @@ Noise that stays becomes invisible, and then real problems hide in it.
1919 or merge, who did it) belongs in commit messages; doclint enforces this.2020 Saying why the code stays compatible with a planned change is fine: that2121 explains the code today. Plans go in ROADMAP.md.22+- Each doc has one job and one home per fact: change the section a23+ reader would look in, link to it from elsewhere, and restructure when24+ appending would make a wall of text. Shipped roadmap items move to its25+ Shipped list as one line.2226 - No scratch files, debug tests or temporary samples in commits.2327 - Visual changes are reviewed in the golden gallery (`make screens`).@@ -1,6 +1,6 @@
1-# Charts: Insert > Chart charts the table around the active cell; the2-# editor bar switches the type with Left/Right, and the chart redraws as3-# its data changes. Terminals with the kitty graphics protocol get a real1+# Charts: Insert > Chart (here from the palette) charts the table2+# around the active cell; the editor bar switches the type with3+# Left/Right, and the chart redraws as its data changes. Terminals with the kitty graphics protocol get a real44 # image; this recording shows the text rendering every terminal gets.55 Output out/charts.gif66 Source lib/setup.tape@@ -11,10 +11,9 @@ Sleep 2s
1111 Show1212 1313 Sleep 800ms14-Alt+i14+Ctrl+K15+Type@120ms "chart"1516 Sleep 900ms16-Up17-Sleep 500ms1817 Enter1918 Sleep 1.8s2019 Screenshot out/stills/chart-editor.png@@ -85,7 +85,10 @@ follow-up task.
8585 Fix anything misaligned, low-contrast, cramped or clipped before8686 committing. Screens are drawn from libghostty's cell grid, so they8787 match what a terminal shows.88-- [ ] README keys table updated if keys changed.88+- [ ] The feature's doc updated in place, where a reader looks for it,89+ and its keys in [keys.md](keys.md) (tests check every bound key is90+ there); a headline feature gets a tape in `demos/` and a place in91+ the README ([testing.md](testing.md#demo-recordings)).8992 9093 ## Review checklist for screenshots9194 @@ -250,7 +250,7 @@ changes it.
250250 Ctrl+F opens a find bar on the context line: matches highlight as you type,251251 the active cell follows the current one, and Enter and Shift+Enter step252252 through them. Ctrl+H adds a replacement field; Enter replaces and moves on,253-Ctrl+Enter replaces all as one undo step. Chips toggle match case (Alt+C),253+Ctrl+Enter or Alt+A replaces all as one undo step. Chips toggle match case (Alt+C),254254 whole cell (Alt+W), regular expressions (Alt+R, with `$1` in replacements),255255 searching formulas (Alt+=). The scope chip says where to search, as Sheets'256256 "Search" choice: this sheet, all sheets, or the range selected when the bar@@ -2,7 +2,7 @@
22 33 ```sh44 make check # all of the below that must pass before a push: gofmt, vet, lint, test, oracle, e2e5-make lint # go vet, staticcheck, cognitive complexity at most 25, Go files at most 500 lines, doclint (docs describe the code, not its history)5+make lint # go vet, staticcheck, cognitive complexity at most 25, Go files at most 500 lines, doclint and doccheck (see Docs below)66 make test # engine, file formats and UI unit tests77 make fuzz # fuzz the formula parser and the CSV, .wk1 and XLSX readers88 make oracle # compare formulas and number formats with excelize@@ -28,21 +28,18 @@ Ghostty would send. Tests assert on what a user would see: screen text,
2828 cursor position, window title, hyperlinks, which screen is active after2929 quitting. A fake TypeSafe server answers JEV questions, and the harness3030 clears `TYPESAFE_API_KEY` so tests never reach the real service. Every31-session gets its own config directory (`XDG_CONFIG_HOME`, with an32-optional config file), and the binary is built with `-tags fakekeyring`,33-whose credential store is a file there, so tests never read your config34-or touch your keychain. Unit tests do the same with `ui.Settings` and35-`keyring.Memory`.31+session points `XDG_CONFIG_HOME` into its working directory (with an32+optional config file), so its config, theme files and the machine id33+that macros' trust uses are the test's own: sessions that share a34+directory are one computer. The binary is built with `-tags35+fakekeyring`, whose credential store is a file there, so tests never36+read your config or touch your keychain. Unit tests do the same with37+`ui.Settings` and `keyring.Memory`.3638 3739 `e2e/ssh_test.go` runs `012 serve` and reaches it with the system's3840 `ssh` client inside the same libghostty terminal, so the server path3941 is tested as a user sees it (skipped when `ssh` isn't installed).4042 41-Each session points `XDG_CONFIG_HOME` into its working directory, so its42-config file, theme files and the machine id that macros' trust uses are43-the test's own: sessions that share a directory are one computer, and44-tests never touch the real config, keychain or machine id.45-4643 `make e2e` builds libghostty-vt from source with Zig into `.deps/` on first4744 use. It is its own Go module so cgo never reaches the main binary.4845 @@ -67,8 +64,8 @@ reason.
6764 ## The XLSX differential test6865 6966 `TestXLSXDifferential` (`internal/fileio/xlsx_diff_test.go`) imports a70-corpus of workbooks with 012's own XLSX reader and with the excelize71-importer it replaced (kept in `xlsx_excelize_test.go`), and compares67+corpus of workbooks with 012's own XLSX reader and with an importer68+built on excelize (`xlsx_excelize_test.go`), and compares7269 every sheet as saved, the widths, names, sheet shown, rows and notes.7370 The corpus is workbooks written by the test (hand-written SpreadsheetML,7471 excelize and 012's exporter), the stress datasets' XLSX files when@@ -86,13 +83,37 @@ service one question of each kind, using `TYPESAFE_API_KEY`.
8683 ## Demo recordings8784 8885 `demos/` holds [VHS](https://github.com/charmbracelet/vhs) tapes for the89-recordings in the README. `make demos` renders all of them (or90-`make demos DEMOS=jev` for one) into `demos/out/`: full GIFs, PNG stills of91-key moments in `demos/out/stills/`, and smaller GIFs in `demos/out/media/`.92-It needs vhs 0.12+, ttyd and ffmpeg. The JEV tape talks to `demos/fakejev`, a93-local stand-in the target starts on 127.0.0.1, never the real service. On94-macOS, `demos/lib/ttyd` wraps ttyd so Alt+letter reaches the app. VHS has no95-mouse commands, so the tapes use the keyboard.86+recordings and stills the README and the docs show. `make demos` renders87+all of them (or `make demos DEMOS=jev` for one) into `demos/out/`: full88+GIFs, PNG stills of key moments in `demos/out/stills/`, and smaller GIFs89+in `demos/out/media/`. It needs vhs 0.12+, ttyd and ffmpeg. The JEV tape90+talks to `demos/fakejev`, a local stand-in the target starts on91+127.0.0.1, never the real service. On macOS, `demos/lib/ttyd` wraps ttyd92+so Alt+letter reaches the app. VHS has no mouse commands, so the tapes93+use the keyboard, and they reach commands through the palette (Ctrl+K)94+rather than counting menu items, so a new menu item doesn't break them.95+Tapes that change settings set them for the run (`O12_KEYMAP=vim`)96+rather than writing the config file the other tapes share.97+98+A change to what a tape shows means rendering it again, reading its99+stills, and copying what the docs show into `docs/media/`: GIFs from100+`demos/out/media/`, stills from `demos/out/stills/`. Only files a doc101+shows go there, and GIFs stay under 1 MB.102+103+## Docs104+105+`make lint` runs `scripts/doclint`, which flags wording that narrates106+history (see [CLAUDE.md](../CLAUDE.md)), and `scripts/doccheck`: relative107+links and anchors resolve, [docs/README.md](README.md) links every doc,108+every file in `docs/media` is shown by a doc and made by a tape, and109+every tape records something a doc shows. Unit tests check what the docs110+say about the code: menu paths lead to menu items, command ids and keys111+exist and every bound key is in [keys.md](keys.md)112+(`internal/ui/docs_test.go`), settings and variables are options113+(`internal/config/docs_test.go`), and [files.md](files.md) names every114+field of the format (`internal/sheet/file_doc_test.go`).115+[functions.md](functions.md) and [config.md](config.md)'s reference are116+generated, and their tests fail when they're stale.96117 97118 ## No broken windows98119