summaryrefslogtreecommitdiff
path: root/src/Query.zig
Commit message (Collapse)AuthorAge
* idioms: the edit surface fails by name: the undo history (Journal.mark, ↵Gabriel Schneider8 days
| | | | | | | Text.remember and step, File's, terminal's and edit's pushUndo and undoStep) returns error{OutOfMemory} instead of dropping an undo point, setEditText, enterInsert and insertTab return edit.Error with try where they reported each failure, Registers.put and setYank return error{OutOfMemory} instead of losing a yank, and their other-file callers decide (try under edit.Error, said on the pane by Undo, Redo, Pipe, Edit, Query, keys, look, completion, Incl and Plumb, ENOMEM or null where a 9P write answers, Ask's false); ctl.get and getFile return GetError (fs.ReadError, now named at fs.zig's surface, and InvalidName) for the *anyerror out-parameter and errno, the 9P get, Get and Edit's e mapping it as before; the OOM undo test pins the error; perf.zig's try relabels its harness hash, the three baselines re-keyed to it (their numbers the base's) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* idioms: the 9P tree's swallows decided: a directory read stages every entry ↵Gabriel Schneider8 days
| | | | | | | or answers ENOMEM (stageDirent and sources.stage return error{OutOfMemory}, readdir's entries made by stageDir, an /os listing whose buffer fills ends there), a pane's tag read through tagOf fails by name (a read or an event write answers ENOMEM, a stat's length and ctl's line say 0), a pane that cannot close (removePane's nine swallowing callers) and a /pager text that cannot go in (fillClosedPagers) are said on their pane, and Queue.push says once why a lost record is not said Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* locality: single-caller helpers beside their caller: File's placeOf and ↵Gabriel Schneider8 days
| | | | | | | restoreName beside undoStep, Query's row makers (clearPlaces, makeAllRows, makeNameRows, feedGrepPlaces) beside produce, look's helpers beside lookAt, lookSpanIn and lookUnresolved, mouse's beside handleMouse and dragUpdate, normal's beside handleNormal and executeNormalAction, and the rest in Core, draw, exec, layout, main, modal, replica, syntax, terminal; Messages.printRight into draw.zig beside joinNotice and edit.spanHas into exec.zig beside operandAt, their only callers Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* locality: caller-led moves: MAX_JUMPS into Jump.zig (Core's unused alias ↵Gabriel Schneider8 days
| | | | | | | goes), RasterPolicy and rasterPolicy beside Kind.viewOf, Names.relative beside Query.startSource, fs.find_skip beside Stream's max_walk_depth, File.drawGutter and drawWrapMarkers beside body_layer.renderBody; each unit's only users are in its new file Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* idioms #20, the bound in the type or the cut handled: of the 166 `catch ↵Gabriel Schneider11 days
| | | | | | | unreachable` the pass kept, 64 stay where a reader checks the bound without arithmetic (an integer's digits, a declared field's size, and now the daemon's pid lists and the clock's two-digit fields written in their types), 69 texts print through Kind.Buf at their old size, 31 handle the failure once (a print into ename cut at its 320, paneText's line cut where its buffer fills, a log record or mouse report dropped rather than cut short, the question's letters that fit), Newcol's and pane/new's refusals are comptime strings, and dropUnsaved's too-long scratch name is null, not an empty sentinel Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* idioms #15, the catch unreachable sites slice b added, re-classified: 29 ↵Gabriel Schneider11 days
| | | | | | | that a word, a path, an id or a function's text could reach go back to a cut through Kind.Buf (or, at echoCommand's and Repl's writers, a failure handled once at the writer), 95 stay because every argument is an integer, a literal, a comptime word or a cut in the same statement (one added to Ask's arg, ctl's why, choices, word and the ids and fields paneText writes, events' records and Edit's names), each with its reason on its line Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* idioms #12, Query and Stream: Stream.query returns OutOfMemory for Query to ↵Gabriel Schneider11 days
| | | | | | | report, walkDir's anyerror is the three errors it has, Query's rows say their counts through buffers proven big enough, its open, produce, noteRows, fillList and land report an allocation that failed (reportError) instead of returning quietly, tagPrefix names its set, and std.fs.path is std.Io.Dir.path Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* client #1, the views indexed: a view's share of the session is Pardes.View ↵Gabriel Schneider11 days
| | | | | | | (the ~42 fields views.fields named: size, cell metrics, columns, rects, focus, jumps, pointer, gestures, prefixes, frontend), one of Pardes.views[4] (null when closed), the live one views[live] through Pardes.view() (index field `view` renamed `live`); going into another view is the index plus the panes' shares, which stay swapped (park and unpark now move only Pane.pv); views.zig loses fields, Part over Pardes, Parked, kept, emptied and the session half of every copy, and a pane closing leaves every view's layout at once (views.gone, at the two places a slot is freed) instead of the serials each parked view kept; drawOne and within put the drawn view's own share back whole; the views are in the digest now (tape's per-field parts name views[k].field), so a fresh view's col_x/col_w default to zeros, not undefined; the dump keeps every open view in the core and the panes' shares of the others under `shares`; an image from before (live view as the core's own fields, the rest under `views`) loads them into views[] once; the ~2,400 references rewritten mechanically from the compiler's errors (p.active is p.view().active, `const v = p.view()` hoisted in 823 places), Kind.zig (4 lines) and addon_test.zig (3) among them, macos.zig by pattern (not compiled here); tape's watched host writes read the live view's frontend and active; perf.zig's accessor lines change its harness hash, the debug baselines re-keyed to it (their numbers the base's); no golden changes; gates: core-test 956/956 both, unit-test 1487/1488 tui and 1530/1531 gui, behaviour-test 248/248 both, pane-test 171/172, snap all 105 ok, process-test 0 of 37 failed tui, replicas ok Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* settings #4, the three ways to place a search go, a query pane attached ↵Gabriel Schneider12 days
| | | | | | | under the pane that asked, eight rows under its line 1 (Query.born_rows), the next search from that pane reusing it: SearchPlace, SearchPane and SearchRows, and with SearchPlace's column the finder column itself, src/Finder.zig and its reads (Core.zig's finder field, pardes.zig's export, views.zig's per-view and laid-out field names, panes.zig's emptied column, exec.placeNew's away column, and layout.zig's compute share, setColumnPairWidth, dropColumnUnannounced's heir and newColumn), with ctl's SearchRows check and the requiresArg and applySettingBuiltin arms; deleted tests: "SearchPlace column: query panes stack in a finder column at the right edge, nothing else moves after it opens, and it goes with its last pane" (Finder.zig) and the SearchPane new half of Query's "* seeds line 1" test; root_ctl's number refusal is Tab's range now; the guide says eight rows; a dump that kept the finder or the three fields loads without them; no golden changes; gates on tui: core-test 963/963, behaviour-test 241/241, unit-test 1479/1480, pane-test 171/172, snap all 105 scripts ok, process-test 0 of 37 failed; gui unit-test 1523/1524 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* fields #38, the jump list, the language servers' question and the core's ↵Gabriel Schneider12 days
| | | | | | | clock are fields of their nouns: Jump.zig is the jump list's type (list, n, cur, force, its own len annotation) and the session's jumps a Jump where it was jumps, njumps, jcur and jump_force; lsp/Ask.zig is the question's (seq, last, wait) and the session's lsp_ask an Ask where it was lsp_seq, lsp_last and lsp_wait; the clock is the session's clock, a Clock (now_ns, stepped_ns, started) where it was now_ns, stepped_ns and clock_started; a view opened still starts with no query's mark on its jumps and one closed leaves the staying view's (views.zig), as when the mark was a field of its own; callers in 26 files read p.jumps.n, p.lsp_ask.wait, p.clock.now_ns (macos.zig's lsp_wait tests by text, built nowhere here; dump.zig, the persistence agent's, only where it names lsp_seq); a dump written before this change loads these as their defaults once: an Upgrade or Restore from it comes back with no jumps, no language question awaited and its clock unstarted (jumps' kind changed, so the decoder says so), and the wire's semantics change; gates on tui: core-test 960/960, behaviour-test 238/238, pane-test 171/172 (1 skipped), snap all 108 scripts ok; gui unit-test 1518/1519 (1 skipped) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* fields #37, a column is one Column: the four parallel arrays a column's own ↵Gabriel Schneider12 days
| | | | | | | state was kept in (col_panes, col_n, col_weight, col_serial) are the session's cols: [MAX_COLS]Column, a struct of panes, n, weight and serial (acme's Column, cols.c), so a column shifted, saved or reset is one assignment where it was four (layout.reorderColumn, dropColumn, insertColumn, firstColumn, joinFits, Finder.open; joinFits and the resets now give back a column's panes beyond its count too, which nothing reads); its tag stays the session's col_tags, as a view opened takes the live one's columns but tags of its own (views.open), and col_x and col_w stay with the rects, worked out each sync; the uses in 20 files read p.cols[c].n for p.col_n[c] and so on, tests that compared the arrays whole compare the columns whole (or their weights, layout.zig's weightsOf); views.zig's per-view fields name cols; a dump written before this change loads its columns as the default once: an Upgrade or Restore from it comes back with its columns empty and its panes in none of them, and the wire's semantics change (the digest walks cols); dump.zig and Handover.zig, the persistence agent's, are edited only where they name these fields; gates on tui: core-test 960/960, behaviour-test 238/238, pane-test 171/172 (1 skipped), snap all 108 scripts ok; gui unit-test 1518/1519 (1 skipped) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* split pardes.zig by noun, panes: the session's pane slots move into ↵Gabriel Schneider12 days
| | | | | | | src/panes.zig, beside the Pane they hold: making a pane (installPane, newShell, emitSpawn, newCommand, newDocPane, the scratches, openTutorView and its tutor text, setTestFile), finding one (freeSlot, paneBySerial, paneIdOf, anyPane, neighbourPane, standIn, paneDir), closing one (removePane, retirePane, teardownPane, reapPanes, deinitPane, detachCwds) and a pane's prompt (startPrompt, promptTarget); the session keeps ten as declaration aliases, the eight called from everywhere (freeSlot, paneBySerial, setTestFile, newShell, newDocPane, newScratchBelow, removePane, paneDir) and the two dump.zig calls (emitSpawn, installPane), so the persistence agent's file is untouched; the rest are panes.x(p, ...) in their callers (21 files, test/panes.zig and test/pdf.zig through pardes.panes); helpers they reach in the session are pub (noteClosed, besideColumn, parkPendingWrite, dropPendingWrite, RetiredPanes.retire); tests moved with them, by name: owned cwd preserves long paths aliases and failed updates; owned cwd close copies are transactional across inherited chains; owned cwd column close allocates every copy before removing any pane; owned cwd EOF failure retains the pane and Del retries its close; owned cwd restore either copies the directory or preserves the old core; owned cwd Save promotion releases the former directory; the Tutor pane is named +Tutor in the session's directory, never a bare path at the root; New opens an empty scratch below the caller, inheriting its directory; a prompt chip is a band with its caret, still on the grid, and only the chip swallows a click; a prompt is typed on its own line in the notice band and leaves the tag row alone; a pure move, no field touched, a dump and the wire as they were; gates: tui core-test 960/960, behaviour-test 238/238, pane-test 171/172 (1 skipped), gui unit-test 1518/1519 (1 skipped) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* store: Recent is a value of the user's state file, `pardes.xitdb` in the ↵Gabriel Schneider12 days
| | | | | | | DumpDir (src/Db.zig: the xitdb database the architecture's §14 puts everything pardes keeps on disk in), which every session shares: read at a session's start (now after the startup config, whose DumpDir says where the file is) and again on use when the file's committed size has moved, written at the end of a step that changed it in one transaction under the file's lock, taken without waiting (busy, the next step tries again), another session's commit read and merged under this one's changes first; not fsynced, as the `recent` file was not (a xitdb commit costs 20 us without fsync and 5.2 ms with its two on this btrfs); a file there that is no database of pardes's is kept aside as `pardes.xitdb.broken` and a new one started; Store.zig keeps the closed panes alone (its file half goes: the path and its inode/size/mtime stamp, load, refresh, read, flush and write, and W4's one-time read of the old `store`, which comes back with the migration), Options.recent_path becomes Options.state (off, disk, memory), main.recentPath goes, a Restore's new core takes the old one's database, and the test host's sessions keep theirs in a `.memory` database, the same code; measured (Debug, 200 files listed): flush after an open 133-135 us (W4's file: 124), refresh after another session's write 239-247 us (198), refresh with nothing new 3 us (1), a session started on it 1144-1194 us (1214), and a Recent change adds 12,325 bytes to the file (its 12,089 bytes of lines and 236 of xitdb's); tests: Store.zig's four Recent tests become Db.zig's three (two windows sharing Recent through a busy lock, the newest 200, a file that is no database kept aside; the old store's migration test goes with that read), the closed-pane test keeps its second window on a state file in its DumpDir, the behaviour suite gains 'two sessions on one state file share Recent', and the process tests and the canary look for the state file where they looked for `recent` Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* effects out, the panel transitions: the eleven Panel words in both tracks ↵Gabriel Schneider12 days
| | | | | | | go, with the core's Presentation (tracks, the frozen previous grid, cell diffs, the acknowledged-geometry pending guard, and the pointer's mapping through a moving pane, so a pointer's cell is the cell it is over), draw.zig's core-composed character effects, animation.zig's transition half, the Surface's tracks and previous grid, the tty's compositor (src/tui/panel_compositor.zig: the glide's rows move into tui.zig) and the window's track groups, frozen old layers, last-frame image snapshot, transition instance fields and shader paths (ui.vert, ui.frag's crossfade, image.vert and image.frag, the transition-<n>.ppm capture); acknowledgePanelPresentation becomes `presented`, which a frontend calls after drawing a frame (a drag's moving end and a look-hover follow what is under the pointer now), and its tape site with it; the pointer tape site goes; GUI golden 18-mid-transition goes, ttyhelp's golden loses the `SPC a` rows (its wait is on `SPC Y` now), the window monkey loses PanelSlide, and the settings behaviour test's floor of on/off words is ten Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* store: Recent is a file of 200 lines under flock, written whole in place at ↵Gabriel Schneider12 days
| | | | | | | 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
* Text, edit, normal, look, Query and their readers: the second selection form ↵Gabriel Schneider12 days
| | | | | | | msel (whole rows r0..r1, for search-result highlights) goes; a visited search result and a query preview's place line are an explicit vsel like any other, back from the line's end (to the result's location start, the line's start for ordinary path:line rows; to the start for a preview line), and every msel branch in the edit ops, the drawing, the terminal's position tracking and the chords goes (visible: the result's highlight covers its line's characters and newline cell instead of the whole row width, with the ordinary selection colours; y, d and c on it act on that range as after x, its newline included, so a yanked result pastes as a line); selections.md and the ; Alt-; X Alt-x rows of helix-keys.md no longer describe msel; Text's walked shape changes (wire semantics) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* modal, normal, pdf_view, Text, syntax, edit: one key layer: an Action is the ↵Gabriel Schneider12 days
| | | | | | | role the key named and what it was given (a count, a literal, ] or [), not a second union of sixteen sub-enums the roles were mapped onto one if at a time; a context's roles are tried in their enum order, the pending prefix and m sub-key are roles too, the text's executor and the PDF's switch flat on the role, and pdf_view.applyNormal(core, pane, action) does what a page cannot (Last, the leader, the tag, a search) instead of handing a seven-value enum back; no key does anything new; Text.normal's walked shape changes (wire semantics); helix-keys.md says how the keys are read Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* layout: four wrappers go to their callers: restoreMinima (ctl.zig's size ↵Gabriel Schneider12 days
| | | | | | | passes restoreMinimaFrom a null), splitRowForExtent (splitAt passes splitRowFor a null), attach (Query.zig and layout's tests pass attachFrom the owner as giver) and columnFitsHalves (exec.zig's first-document column checks the source column's width there) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* Query, Stream, Places: the benchmarks inside unit tests are deleted, as no ↵Gabriel Schneider12 days
| | | | | | | bench step takes them without a rewrite (they reach into Query's and Stream's own helpers, busy, queryPane and TestShell, read a stress file named in the environment, and perf's gate would need baselines for a new op): "zz query timings on the 1.2 MB stress file (QUERY_TIMES=<path>)", "zz stream timings on the stress file with a worker (QUERY_TIMES=<path>)" and "zz grep rows timings: a Grep of about 2000 rows on the stress file, a worker (GREP_TIMES=<path>)" go, and the big-file places test keeps its asserts without its clocks and PLACES_TIMES print; the docs' numbers stay as they are Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* Places: skipped and capped, which nothing read, and wrapped, which only two ↵Gabriel Schneider13 days
| | | | | | | test asserts read, go; restore and settleSeek drop the Pardes they never used; nowNs, FrameStats.nowNs's twin, goes, Tables and the tests calling FrameStats' Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* locations: one appendRow copies a row's path and colours onto a list being ↵Gabriel Schneider13 days
| | | | | | | built, for appendMetadata, hunks' Out.row and Query's writeRow, which each copied, appended and freed on failure by hand Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* Places: one lineOf for the line a byte is on, std.sort.partitionPoint in ↵Gabriel Schneider13 days
| | | | | | | place of five hand-written binary searches (firstFrom, paint's, tickOf's, and Query's lineOfOffset and writePlacesRows', the latter two the same search as tickOf's) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* Query: what the converge left unused goes: of, grep_cap, the write-only ↵Gabriel Schneider13 days
| | | | | | | window (so writePlacesRows returns nothing), makeNameRows' pat and was_current, the q and asked (an anytype) feedGrepPlaces and clearPlaces never read, freeze's empty preview block and its doc's promise that the preview goes, and gpa_free_pager, inlined at its one caller Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
* Query: Enter lands on a current row only while its place is there: a frozen ↵Gabriel Schneider2026-10-31
| | | | | | query pane's rows edited go with the text they were of (setContentSpan's dropped marks) while its items and current stay, and an Esc's `saved` keeps them so, so Enter indexed `location_rows` past its end, on a frozen pane's row (the test) and, in the box soak's window, on line 1 of a live one (Query.land, `index 1, len 0`: its speculated Enter, another view's SPC b b and Esc ordered otherwise than the session's); with none it is as with no current row, the keyboard to the owner Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Query: a +Search's rows recoloured are made again (locations.cloneRows, ↵Gabriel Schneider2026-10-30
| | | | | | Query.save's copy), never written in place: the rows are a blob (File.State location_rows), whose word a digest keeps by address and a replica's rollback copy pins, so a release session kept the word of their colours before a paint landed (recolor's @memcpy); an edit moved them into dropped_marks with the stale word, a replica that hashed them at another time diverged there (fixer 1's soak: `pane 5.file.dropped_marks`), and a client loading the session's dump hashed the colours it carried and loaded "as another session"; dropped_marks stays in the digest, as an undo back to its text reads it; Stream's test, which a Debug build fails before (`the 82-byte blob ... is not what its kept word was: written in place`) Co-Authored-By: Claude Opus 5.5 <[email protected]>
* replica: what only the authority holds, a step reads off the tape ↵Gabriel Schneider2026-10-30
| | | | | | | | | | | | | | | | | (tape.authority): the store's closed panes and Recent, a script's hold on a pane's events, the 9P socket, the session's config directory and startup file; a replica's own are never read, and never put back by a rollback The Panes picker's closed rows, Recent's rows, a closed pane brought back (a Look at @pN, a Panes row), a jump to a closed file and the +Jumps rows read `p.store` and `p.recent`, `.authority` state a replica keeps on its own: its store has no file, its Recent only what it replayed since it joined. The rows made of them went into digested state, so every client of a session diverged together after a Del (H4), every client that joined after one diverged at its first unit forever (H11: trackJump dropped a closed file's jumps at every step when Recent did not know the file), a client's Del of a file the session's Recent knew made the stat the session skipped (H12: noteClosed looked in Recent first), and a client on another machine read its own store (H13). - tape.authority: poison, then a value read: the authority's answer is taped, a replay takes it, a speculation waits for it. One site, `.authority`. - Readers through it: Query's Recent and closed-pane rows, Store.reopen's record, Pardes.recentByHash (jumps, +Jumps), mouse.reportRange's readers check (a script reading a pane's events takes a look or exec: `pane.fs.readers`, the 9P server's), Tty9p's socket check, Pardes.configDir and startupPath (ThemeFile, DumpThemes, Config, DumpConfig, an init file saved), DumpConfig's dump directory. - trackJump no longer reads Recent at every step: a closed file's jump stays; the jump to it drops that file's entries when Recent has forgotten it, as when the file is gone. - noteClosed asks the host (recentKeeps, a taped stat) before it looks in Recent: the same syscall on every side. - The tty toggle, read on every key, is session state: Pardes.tty_toggle, from the options when the core is made, dumped. - The rollback copy no longer saves `store` and `recent` (rollback.zig `unsaved`): their bytes put back pointed at lists the host's heap (recentGpa) had freed, which the epoch never holds. A speculated Del then a Panes listing read a freed name (H8, the segfault). Tests, each failing before: a rollback leaves the store and Recent as a speculation left them; a replica joined after a pane closed has the session's jump to it, its Panes and Recent rows, asked by either (and the variant hunt's Recent written by another window); a replica's Del of a file its session's Recent knows asks the host what the session asked. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* the walker's digest: a blob's hash made once and folded in as a word (a 100 ↵Gabriel Schneider2026-10-30
| | | | | | | | | | MB file was 5 ms a digest, two a unit, on the authority); blob fields annotated `.blob`, which the rollback copy's pins read too walk.zig: a field named in a type's `replica.blob` (a file's text, line index and location rows, an undo snapshot's text, a register's values and joined text, the rows an edit dropped, a query's saved rows) holds immutable blobs. A digest hashes one of 4 KiB or more once, keeps the word by its address and length, and folds the length and word in; `forget` drops the word, from memory.freeRaw and freeUnfilled, through which every such blob is freed raw. Only a Debug build (the tests, the harness, replay) hashes the bytes at every digest all the same and panics where the kept word is not their hash: a blob written in place, or freed past its word. A release build, ReleaseSafe the user's own as well as ReleaseFast, takes the word and never panics on a stale one: at worst a divergence, which a replica records and then stops at (nothing resets or rejoins it yet; the notes say so). File.zig: an edit's free of the old text went to `rawFree` itself and so kept its word; the next text of the same length at the same address folded in the old one (the ReleaseFast harness diverged in 162 of 180 replica runs, in `file.content`), and it goes through freeUnfilled now. Registers.zig: `put` makes a new values array rather than writing the old one. rollback.zig: the copy pins what `.blob` names (`pinned` and `pinnedDeep` gone). Measured, ReleaseFast on the perf cores: with a 100 MB file open (PARDES_DIGEST_BENCH=100, replica.zig's bench), a unit of a key into it went from p50 10.45 ms, p99 41.6 ms to p50 24 us, p99 6.1 ms (the first, which makes the word), a digest from 5.18 ms to 10 us. The harness (20 seeds x 120 inputs x 3 clients): rollback p99 9.5 -> 2.6 ms at 30 ms (1.5 and 1.4 ms at 80 and 207), copy p99 0.27 ms; none diverged, none unequal, no delta wrong. Tests: a blob hashed once, its kept word no longer its hash once written in place, its word gone when freed. docs/next-daemon.md: the follow-up. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* dump: one walker dump of the whole session, by name across builds, for ↵Gabriel Schneider2026-10-29
| | | | | | | | | | | Restore, -l, Handover and the store; dump.zig's hand-written schema gone A dump is walk.zig's walk of the core with a table of every type it reaches (fields, enum and union names, number widths), read back by name; terminals are ghostty's snapshot (screens, history, kitty images); a failed load frees what it made. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* tape: every input the core consumes recorded in turn order, replayed into ↵Gabriel Schneider2026-10-29
| | | | | | | | | | | | | | | | | | replicas that must reach the same digests; the core's leaks of render, clock and host closed The recorder (src/tape.zig) is null unless PARDES_RECORD=<prefix> names a tape (<prefix><pid>.tape); the local path pays a null check a call. It records a tree at the host boundary, both ways: each call the host makes into the core (`Input`: update, serveFs, pump, perform, the shell's acknowledgements and failures, a Restore, ...) with its arguments, and each call the core makes out -- a Host function (the vtable wrapped generically while recording) or a syscall of its own (`tape.site` for every old `turn.yield()`, `tape.value` for a clock or environment read) -- with its result; `done`/`ret` close each, a 9P request served while a step is out lands inside that step's syscall, and fields a host writes between calls (native_images, present_skipped, ...) are found by a diff at every crossing. After each call the host made at the top, the session's digest (src/walk.zig), one per field of the core, its stream and each pane, file and places. `PARDES_REPLAY=<tape> pardes` (main.zig) replays it with the same build into three replicas: two at different addresses (the first's memory held while the second runs) and one that never draws. A host call answers what it answered, a site returns what it returned, nothing is performed and no syscall is made; `turn.yield` panics in a replica, so a syscall no site covers is a stack trace; a call the recording did not make, or a digest that differs, is a divergence that names the fields. The headless replica steps over the presents it does not make, applying what the host told the core inside them. What the replicas found, fixed: - Render wrote core state. The view's geometry (wrap map, context rows, body layer rows) is File.geometry, a lazy cache keyed by a hash of what it is made of (revision, scroll, size, tags, tables read, context declarations, the session's view: wrap, layered context, row metrics, rect); the render makes it afresh, a step reading it makes it on demand (wrapAt, wrapRow, ensureCursorVisible). Context declarations, notice bands and the header's reveal are the step's (sync), the tables' reading the tick's (a first look of 4096 lines, a count, wherever it is asked; the rest a frame's clock budget a tick), and a view's paint-ahead is asked of the host as the frame is drawn rather than queued as an effect. - The clock: advance's wakes are the recording session's (a picture decoding or a fade adds no tick to a replica), as are the budgets of Places, Names and Tables (`tape.over`), a message's time of day (the stamp; msg_said_ms and the unattended expiry use the session clock), File.mtime, and the pump reads its clock whether or not it waits. - The host: the session directory (getcwd, asked once at init), $SHELL and its existence, $HOME for `~`, `Shell` naming one that is not there, a missing interpreter, a directory refused above, a deleted file, a pointer seen through a sliding pane (Pardes.pointerCell). - Worker handles (futures, the Io), the 9P server's state, the store file every window shares (a replica keeps its own in memory) and Recent read from it are authority-only; frames, animations and the render's caches local. Query rows' paints count apart from a view's. Terminals replay from their taped pty bytes and are digested as their active screen, cursor and scroll; kitty images are left out until phase 5's screen-state terminals. tagnav.golden: the header's caret reveal now runs every step, as a pane's does, not once per frame drawn, so after `g l B B` typed in one burst the bar stays scrolled as a human typing it sees it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* query: a row is its place as text, `path:line:col` then its code, the path ↵Gabriel Schneider2026-10-25
| | | | | | | the shortest a Look from the query pane resolves (Query.lookPath: relative, `../` included, when shorter, else absolute, never `@pN` but for a text with no file), aligned per group, the declaration headers `path:line`; its code coloured as its file's language colours it, the file painted whole on the worker (Stream.paintRows, highlightApart, kept in the locations cache, Query.Shades a walk a refill, Query.recolor in place as each lands) with the match tinted over it; the +Preview's places are the query's hits in its file (a Grep searched, a list fed), tinted and ticked, the row's one current and selected, as in a pane that already shows it; tests for B3 on an address, a saved list's Looks, the shortest path, the preview's places and colours, the worker's colours; fsearch, grep, lookrange, lsp-client, lsprelpath (now `../shade.zig`), stepgrain, tagbottom goldens: the address rows; docs/next-searchrows.md: the design and the numbers Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016u3hBPFfja5pK4EBRC1UVD
* query: the current row's mark is its own: a row tint the width of the body ↵Gabriel Schneider2026-10-25
| | | | | | | drawn from Query.current before the row's colours (Query.paintMark, so its match's tint, the places and any selection draw over it), not the pane's line selection; a click, a sweep or a chord never erases it and B2/B3 never borrow it (the operandAt exception goes); fsearch, lookrange, lsprelpath, stepgrain goldens: the current row now marked under its match tint, while typing too Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016u3hBPFfja5pK4EBRC1UVD
* query: B1 on a query pane is acme's B1: it places the caret and selects, ↵Gabriel Schneider2026-10-25
| | | | | | | nothing else (no other pane moves, nothing is previewed, the current row stays); only the keyboard moves the current row: Ctrl-n/Ctrl-p typing, n/N in the pane's normal mode (the caret with them, caretTo), j/k taking the caret onto a row (produce follows the caret on a key step only); Enter lands the current row; the current row's line mark is no selection B2/B3 borrow (exec.operandAt), so a click on it takes the word as on any row Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016u3hBPFfja5pK4EBRC1UVD
* query: a language server's list is answered, not typed: one place lands on ↵Gabriel Schneider2026-10-25
| | | | | | | it (Diagnostics too now), the place fed as the text's places so it is tinted and n/N have it, no query pane; several open the list with the keyboard on its current row in normal mode (showCurrent: the caret on the rows is the current row, n/N take it there), its target shown, Esc in it back to the text as it was; none is a message; line 1 keeps its word as text; Diagnostics keep the keyboard in the text for ]d; lsp-client and lsprelpath step with n, their goldens the caret on the row and no insert marker Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016u3hBPFfja5pK4EBRC1UVD
* Store 2/3: one bounded store every window shares (Store.zig): Recent as ↵Gabriel Schneider2026-10-24
| | | | | | | | | | | | | records read on use, the panes a session closes kept as one-pane dumps; Panes lists them (closed), Enter or a look at @pN brings one back beside the pane that took its rows An append-only log under $XDG_STATE_HOME/pardes/store, framed records with a CRC, flock on store.lock (never blocking a step), a stat on use, garbage passed over and compacted away by the next writer, compaction by rename, 100 MiB cap. dump.dumpPane/restorePane lifted out of dumpState/initDump; layout.giveBack; Options.recent_path is store_path. Host calls yield one at a time; /recent refreshes only when no step is out. Tests: two windows and a busy lock, the cap, garbage/torn/partial records, a closed pane's reopen with the layout invariant; fs.py: two live sessions over 9P.
* Search converge 7/6: a script's Grep or Find that misses opens nothing, a ↵Gabriel Schneider2026-10-24
| | | | dumped query pane restores as plain text; fs.py's Recent and canary to the query pane
* Search converge 6/6: SearchPlace column, the finder column at the right edge ↵Gabriel Schneider2026-10-24
| | | | holding the query panes; n/N in a frozen query pane; the design doc
* Search converge 5/6: the old search pipeline phased out, the notice-band / ↵Gabriel Schneider2026-10-24
| | | | for texts, Find/Grep prompts and walks on the loop, +Recent, n/N as Look-the-next-row; docs, tutor, Help and goldens to the query pane
* Search converge 4/6: the disk engine, Grep and Find's listing on a worker ↵Gabriel Schneider2026-10-24
| | | | (rg when there, else a sorted walk), generation-numbered batches, a debounce, a 2000-line cap and More, and the declarations parse off the loop
* Search converge 3/6: the query pane, line 1 the query and its first word the ↵Gabriel Schneider2026-10-24
source, rows made live like Callstack's, the owner's places showing the set, a +Preview promoted in place, Enter freezes, Esc restores