From 866b7b722a3339d92be7e4e8e506adffa07b2ef8 Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Tue, 14 Jul 2026 10:06:56 +0200 Subject: [PATCH] docs(v0.8): re-home the auto_sync runtime to v0.8 v0.7 closed with manual :gl/:gp only, leaving the auto_sync timer unscheduled. It lands in v0.8 alongside the sleep transitions it must respect and a new explicit item: per-sync Wi-Fi teardown (the git_sync modem-ownership refactor), prerequisite for both sleep modes. Forward pointers in typoena-toml.md and the v0.5 spec updated to match; the v0.5 macroplan learning is left as a historical record. --- docs/macroplan.md | 5 +++-- docs/typoena-toml.md | 9 +++++---- docs/v0.5-palette-and-multi-file.md | 11 ++++++----- docs/v0.8-battery-and-sleep.md | 13 +++++++++++++ 4 files changed, 27 insertions(+), 11 deletions(-) diff --git a/docs/macroplan.md b/docs/macroplan.md index bc222ba..ec09764 100644 --- a/docs/macroplan.md +++ b/docs/macroplan.md @@ -217,8 +217,9 @@ Detail: [v0.7-search-and-git.md](v0.7-search-and-git.md). ## v0.8 — Power: battery + sleep — [ ] -Bench current-draw measurement, 18650 + charge board, light/deep sleep, and a -battery indicator. **Not started.** +Bench current-draw measurement, 18650 + charge board, per-sync Wi-Fi teardown, +light/deep sleep, the `auto_sync` runtime (re-homed from v0.7), and a battery +indicator. **Not started.** Detail: [v0.8-battery-and-sleep.md](v0.8-battery-and-sleep.md). ## v0.9 — Robustness — [ ] diff --git a/docs/typoena-toml.md b/docs/typoena-toml.md index 2305f8d..2f1378f 100644 --- a/docs/typoena-toml.md +++ b/docs/typoena-toml.md @@ -22,7 +22,7 @@ like any note — which means the preferences **sync to every device** that clon the repo. That is deliberate: your editor behaviour follows you. (A per-device override for the one genuinely device-specific key, `auto_sync`, may layer on top later via `typoena.conf` — worth it only once `auto_sync` actually does something -in v0.7. See the [auto_sync](#auto_sync) note.) +in v0.8. See the [auto_sync](#auto_sync) note.) The file is read **once at boot**, before the first screen is drawn (so `line_numbers` shapes the opening frame). A **missing, empty, or partial file is @@ -37,7 +37,7 @@ works with no config present. | `format_on_save` | bool | `true` | `true` / `false` | Run `:fmt` on the buffer before an explicit `:w`/`:sync`. | | `line_numbers` | bool | `true` | `true` / `false` | Show the absolute line-number gutter. Off reclaims its columns for text. | | `theme` | string | `"light"` | `light` / `dark` | Panel colour polarity. `dark` inverts the whole frame to white-on-black. | -| `auto_sync` | string | `"10m"` | `2m` / `5m` / `10m` / `15m` / `30m` | Max-staleness cap for opportunistic auto-publish. **Value only — no behaviour yet** (rides v0.7). | +| `auto_sync` | string | `"10m"` | `2m` / `5m` / `10m` / `15m` / `30m` | Max-staleness cap for opportunistic auto-publish. **Value only — no behaviour yet** (rides v0.8, with the sleep work). | The **Options** column is what the palette rotates through on **Enter**; a boolean is just the two-option case. Hand-editing a string key can still set any @@ -109,7 +109,8 @@ to get — an *opportunistic, rate-limited* push, not a wall-clock timer. The palette rotates it through the presets `2m` / `5m` / `10m` / `15m` / `30m` (hand-editing can still set any string, e.g. `"0"`/empty to disable). **The value is only stored and displayed in v0.5 — nothing reads it yet:** the periodic push -rides the better-git work in v0.7 and must interact with sleep in v0.8, so +lands with the sleep work in v0.8 (originally pencilled on v0.7's git work; +v0.7 closed 2026-07-14 with manual `:gl`/`:gp` only), so cycling the interval today changes what will be honoured *then*, not now. Rationale for the `"10m"` default: [`tradeoff-curves/wifi-auto-sync.md`](tradeoff-curves/wifi-auto-sync.md). @@ -145,7 +146,7 @@ Two ways, both landing in the same file: **Esc** (or `Cmd-P`) closes it. Each change rides the next `:sync` to your other devices. - `auto_sync` is a value command now, but has no behaviour to drive until v0.7 — + `auto_sync` is a value command now, but has no behaviour to drive until v0.8 — cycling it sets the interval that the future periodic push will honour. ## Parsing diff --git a/docs/v0.5-palette-and-multi-file.md b/docs/v0.5-palette-and-multi-file.md index 7534232..f375cd7 100644 --- a/docs/v0.5-palette-and-multi-file.md +++ b/docs/v0.5-palette-and-multi-file.md @@ -262,15 +262,16 @@ from the same boot log, both already instrumented: [`tradeoff-curves/wifi-auto-sync.md`](tradeoff-curves/wifi-auto-sync.md). The **schema + default (`"10m"`) live here in v0.5** and round-trip through `Prefs`; **nothing reads the value yet** — the periodic side - rides the better-git work (v0.7) and must interact with light / deep - sleep (v0.8). Marked `[~]`: parsed and preserved, no behaviour. + lands with the light / deep sleep work (v0.8; originally pencilled on + v0.7's git work, re-homed 2026-07-14 when v0.7 closed with manual + `:gl`/`:gp` only). Marked `[~]`: parsed and preserved, no behaviour. **Amended 2026-07-12:** now a palette preset command — Enter rotates it through `2m`/`5m`/`10m`/`15m`/`30m` (the `~2m` min is baked into the - preset list). Set-ahead only: still read by nothing until v0.7. + preset list). Set-ahead only: still read by nothing until v0.8. - [x] Open question RESOLVED (2026-07-12): the per-device sync cadence override (a card-local `typoena.conf` layer over the committed prefs) is **deferred** — `auto_sync` is inert in v0.5, so there is nothing yet to - override; revisit when v0.7 makes the periodic push real. + override; revisit when v0.8 makes the periodic push real. - [x] **Palette command mode** — typing `>` at the `Cmd-P` palette switches it from file search to a command list (VS Code-style). **Done in core 2026-07-12.** The v0.5 commands toggle the three boolean `.typoena.toml` @@ -284,5 +285,5 @@ from the same boot log, both already instrumented: also register into. **Amended 2026-07-12:** the palette now also carries the non-boolean prefs `> theme` (`light`/`dark`, live whole-frame invert) and `> auto sync` (`2m`..`30m`), both cycled by the same Enter-rotates-to-next - gesture. `auto_sync` is exposed **set-ahead** (no behaviour until v0.7), + gesture. `auto_sync` is exposed **set-ahead** (no behaviour until v0.8), knowingly overriding the earlier "dead switch" call. diff --git a/docs/v0.8-battery-and-sleep.md b/docs/v0.8-battery-and-sleep.md index 945f63a..63097d3 100644 --- a/docs/v0.8-battery-and-sleep.md +++ b/docs/v0.8-battery-and-sleep.md @@ -7,6 +7,19 @@ - [ ] Measure idle / typing / push current draw on bench - [ ] 18650 + IP5306 charge board, soft power switch +- [ ] Per-sync Wi-Fi teardown — refactor `git_sync`'s modem ownership so the + radio de-inits after each git op. Today it comes up lazily on the first + op and stays associated for the rest of the session (~15–20 mAh/hr); + TLS session resumption (v0.7) already makes the fresh-connect path cheap + (2.4 s vs 4.0 s). Prerequisite for both sleep modes. Analysis: + [tradeoff-curves/wifi-auto-sync.md](tradeoff-curves/wifi-auto-sync.md). - [ ] Light sleep on idle > 30 s (keyboard interrupt wakes) - [ ] Deep sleep on lid close (reed switch); restore cursor + buffer +- [ ] `auto_sync` runtime — the opportunistic, rate-limited push behind the + v0.5 `.typoena.toml` key (re-homed here 2026-07-14; v0.7 closed with + manual `:gl`/`:gp` only). Push when already awake + dirty (coalesced + into the idle-pause, ≤ once per `auto_sync`), push once on the way into + sleep if dirty, **never wake from deep sleep purely to sync**; min clamp + ~2 min. A clean tick is radio-free via the dirty journal. Policy + curve: + [tradeoff-curves/wifi-auto-sync.md](tradeoff-curves/wifi-auto-sync.md). - [ ] Battery indicator in the side panel