From c0b2e5d9194ce35b9fbb58d8d6e18de66cb209a8 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 5 Nov 2026 10:46:54 -0300 Subject: store: Recent is a file of 200 lines under flock, written whole in place at the end of a step that changed it and read back under a session's own changes when another session wrote it since, and the panes a session closes are kept in its memory, the newest 64 within 64 MiB; the append-only CRC log with its resync and compaction, and the closed panes' self-describing dumps in it (only the session that closed one ever listed it), go; Options.store_path is recent_path ($XDG_STATE_HOME/pardes/recent), and the old store is read once while it is the newer of the two; tests: the store's four rewritten through the same windows (the 200 newest, a foreign file, a closed pane's way back from memory), the old store read once, 64 closed panes kept, recent.zig's merge; the process cases read Recent's file; docs/next-store.md is the decision Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/dump.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/dump.zig') diff --git a/src/dump.zig b/src/dump.zig index 2cff503a..153e4a82 100644 --- a/src/dump.zig +++ b/src/dump.zig @@ -499,8 +499,8 @@ fn revivePane(p: *Pardes, id: usize, pane: *pardes.panes.Pane, was_on_disk: bool /// Pane `pane` alone as a dump (`gpa`'s): what it shares with another /// pane is its own in it (a directory it follows), and nothing says where /// it was. `slim`: without a terminal's history, a file's undo, or a clean -/// file's text, which is read from its file again (a store's record past -/// its bound). +/// file's text, which is read from its file again (a closed pane's dump +/// past its bound, Store.zig). pub fn savePane(gpa: std.mem.Allocator, pane: *pardes.panes.Pane, slim: bool) ![]u8 { // The fields it changes put back after, not the whole pane (88 KB) kept // aside: a store record is made at every close. -- cgit v1.3