diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 10:46:54 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 12:41:12 -0300 |
| commit | c0b2e5d9194ce35b9fbb58d8d6e18de66cb209a8 (patch) | |
| tree | fa4656b6d5e4203b8c52516d6695b8c7677de41d /src/Query.zig | |
| parent | 60a891ce8127c87b55aed1ff71e435cb7fbd28fc (diff) | |
| download | pardes-c0b2e5d9194ce35b9fbb58d8d6e18de66cb209a8.tar.gz pardes-c0b2e5d9194ce35b9fbb58d8d6e18de66cb209a8.zip | |
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 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/Query.zig')
| -rw-r--r-- | src/Query.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Query.zig b/src/Query.zig index cb14df2b..b6c564b1 100644 --- a/src/Query.zig +++ b/src/Query.zig @@ -593,7 +593,7 @@ fn startSource(p: *Pardes, id: usize, q: *Query, source: Source, owner_id: ?usiz // Then the panes this session closed, the latest first, each // `(closed)` and dimmer (makeNameRows): Enter brings one back // where it was. Its name alone is matched, not the word. The - // store's, which a replica has from the authority. + // session's, which a replica has from the authority. for (pardes.tape.authority(Store.closedNames, .{p})) |c| { var buf: [4096 + 48]u8 = undefined; const row = std.fmt.bufPrint(&buf, config.pane_addr ++ "{d} {s}" ++ closed_word, .{ c.serial, Names.relative(c.name, dir) }) catch continue; @@ -626,8 +626,8 @@ fn startSource(p: *Pardes, id: usize, q: *Query, source: Source, owner_id: ?usiz /// What a Panes row of a closed pane ends with. const closed_word = " (closed)"; -/// Every window's files, as a Recent query lists them: what the others -/// wrote since, read first. The store's (`tape.authority`): in `out`. +/// Every session's files, as a Recent query lists them: what the others +/// wrote since, read first. The session's (`tape.authority`): in `out`. fn recentRows(p: *Pardes, out: *std.Io.Writer.Allocating) []const u8 { p.store.refresh(p); Output.recentText(p, &out.writer, true) catch {}; |
