From 491dc57144ac41f88d1b137920b9b3af87006f95 Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Sat, 11 Jul 2026 18:31:33 +0200 Subject: [PATCH] docs: drop relative line numbering from the v0.2 gutter Relative numbering renumbers the whole gutter on every j/k, a tall partial refresh per cursor move that eats the e-ink ghosting budget for no proportionate gain. Gutter is now absolute-only; Spike 13 downgrades from a genuine e-ink risk to a layout decision. --- docs/roadmap.md | 6 ++++-- docs/spikes.md | 31 ++++++++++++++----------------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/docs/roadmap.md b/docs/roadmap.md index 9977431..78aa0da 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -198,8 +198,10 @@ gutter. Shipped early beyond scope: a read-only **View** mode and the full - [~] Movement: `h j k l`, `w b e`, `0 $`, `gg G` (✓); `Ctrl-d Ctrl-u` remain - [x] `i a o O A` to enter Insert - [x] `Esc` returns to Normal -- [ ] Line numbers in the left gutter: relative in Normal mode (current line - shown as its absolute number), absolute in Insert mode — Spike 13 first +- [ ] Line numbers in the left gutter: **absolute** — Spike 13 first. Relative + numbering was dropped (2026-07-11): renumbering the whole gutter on every + `j`/`k` burns the e-ink ghosting budget for no proportionate gain, whereas + absolute renumbers only the rows below an edit. - [x] Groundwork — UTF-8-correct buffer: caret motions and edits step by character, not byte (dropped the ASCII == byte-offset assumption), so every motion stays correct with accented input. **Done 2026-07-11** alongside diff --git a/docs/spikes.md b/docs/spikes.md index add1981..b74784d 100644 --- a/docs/spikes.md +++ b/docs/spikes.md @@ -114,23 +114,20 @@ risk early. a design decision this spike hands data to.) 13. **Spike 13 — Line-number gutter.** Draw a fixed-width digit column left of - the text area. The v0.2 spec is the hard case: **relative** numbers in - Normal mode (current line as its absolute number), **absolute** in Insert. - The naive part — reserving columns and drawing digits — is trivial; the - e-ink risk is churn. Relative numbering renumbers the *entire visible gutter - on every `j`/`k`*, so a single cursor move becomes a partial refresh of a - tall digit column, straight into the Spike 5 windowed-Y path and the "20 - partials → forced full refresh" ghosting counter - ([`firmware/src/epd.rs`](../firmware/src/epd.rs), render module). Absolute - numbering is cheap by comparison — only the rows below an inserted/deleted - line renumber. Two more interactions: the gutter steals horizontal columns - from the render-time soft-wrap, and wrapped continuation rows have no number - (blank vs. tilde — a layout decision). Prove: measure gutter partial-refresh - cost for (a) a held-`j` scan that renumbers the whole relative gutter vs. - (b) a single-line absolute edit, and confirm neither blows the ghosting - budget or forces extra full refreshes. Decides whether relative numbering is - viable on this panel or must be gated (absolute-only, or a batched/coalesced - gutter repaint). (Feeds v0.2's line-number gutter; genuine new e-ink risk.) + the text area. **Absolute numbering only** — relative numbering was dropped + (2026-07-11). It renumbered the *entire visible gutter on every `j`/`k`*, so + a single cursor move became a partial refresh of a tall digit column, + straight into the Spike 5 windowed-Y path and the "20 partials → forced full + refresh" ghosting counter ([`firmware/src/epd.rs`](../firmware/src/epd.rs), + render module) — real e-ink cost for no proportionate gain on a + distraction-first panel. Dropping it removes the genuine e-ink risk this + spike existed to prove: absolute numbering is cheap — only the rows below an + inserted/deleted line renumber. What remains is a **layout decision**, not a + latency one: the gutter steals horizontal columns from the render-time + soft-wrap, and wrapped continuation rows have no number (blank vs. tilde). + Prove: reserve the gutter width, then confirm a single-line edit repaints + only the rows at/below the change and forces no extra full refresh. (Feeds + v0.2's line-number gutter; now low-risk after the relative drop.) 14. **Spike 14 — Multi-file navigation (open / switch / new / delete).** The panel *mechanism* is already Spike 11 (which names this v0.5 file palette),