From e9a641ee2c743fec2fe2505d2e11c96fa36767b8 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 20 Nov 2026 15:13:18 -0300 Subject: core, docs: the docking vocabulary, the family the rename of attached_to to docked_to left (P37): layout.attachFrom -> layout.dockFrom (its five callers: Query.zig x2, Store.zig, its tests), testAttachment -> testDocking, Query.zig's local attached -> docked, the section "Attached panes" -> "Docked panes" (and the three comments that name it), and "attached", "attachment(s)", "unattached", "Attach new pane", "detaches it" where a pane is docked to a pane -> "docked", "docked pane(s)", "undocked", "Dock new pane", "undocks it", through core/layout.zig (two test names with it), core/Handover.zig, core/Store.zig, core/Query.zig, comments in core/panes.zig (4) and core/builtins.zig (2), docs/next-drag.md, docs/search-proto-converge.md and docs/next-daemon.md (1); every attach of a client to a session stays, as do the search prototype's name "attached" and its setting SearchPlace attached|column (docs/search-proto-converge.md:18, :134: names of the past) and the changelog's past entries; no behaviour changes; gate on the stack through this change and the docking vocabulary (load 4-32): tui core-test 871/1028 (157 skipped), shell-test 1070/1073, pane-test 183/184, term-test 17/17, kitty-test 45/45, behaviour-test 275/275 and --replay 275/275, consumer-test passes, addon-test 5/5, process-test 0 of 144 (tty boot: msg failed once at load 32 and passed alone), replicas --clients 5 and --bytes --clients 5: diverged 0, unequal 0, deltas wrong 0, quiet checks differed 0, unlisted stops 0, corpus 22 of 22, no leak; the semantics word a73794ff9e03f814 as on merge40; daemon.py --far, --games, --window-clients pass, plain fails 2 of 4 at "client C agrees with a shell's output" (a timeout), as merge40's build does 3 of 6; the macOS library (x86_64-linux, aarch64-macos, the ABI guard 2/2) and the FreeBSD cross-build build; frames 77/77, gui unit-test 1666/1670 (the perf check's BaselineHarnessMismatch), perfab corpus2x +0.054% (noise 0.054%), the 121 per-operation counts within 0.1% against tree2 (key-down on medium 10,039,720 and render on medium 11,454,636, merge40's gate 10,039,703 and 11,454,619) Co-Authored-By: Claude Opus Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- core/Handover.zig | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'core/Handover.zig') diff --git a/core/Handover.zig b/core/Handover.zig index dde31f8b..6f7340b2 100644 --- a/core/Handover.zig +++ b/core/Handover.zig @@ -33,7 +33,7 @@ const MAX_PANES = pardes.MAX_PANES; /// libc: fork and exec of a window, and file calls in the cancelable carry task that must not see its cancel (its defer's unlink). const libc = std.c; -/// What a grip carries out of its window: one pane with the panes attached +/// What a grip carries out of its window: one pane with the panes docked /// to it, or a whole column. pub const Kind = enum { pane, column }; @@ -46,7 +46,7 @@ const Carried = struct { /// Each pane as dump.savePane makes it, top to bottom. panes: []const []const u8, weights: []const f32, - /// Which of them each one is attached to (layout.zig, "Attached panes"). + /// Which of them each one is docked to (layout.zig, "Docked panes"). owners: []const ?u32, }; pub const carried_magic = "pardes-carried\n"; @@ -84,8 +84,8 @@ pub fn deinit(h: *Handover, gpa: std.mem.Allocator) void { h.bytes = null; } -/// Pane slot `at` (with what is attached to it, or alone when it is itself -/// an attachment), or column `at`, released past the window's edge: dumped, +/// Pane slot `at` (with what is docked to it, or alone when it is itself +/// a docked pane), or column `at`, released past the window's edge: dumped, /// and the host asked to carry it. Only text panes travel: a terminal's /// shell is this process's child and would die with the pane here. pub fn begin(h: *Handover, p: *Pardes, carried: Kind, at: usize) void { @@ -273,7 +273,7 @@ pub fn adopt(p: *Pardes, bytes: []const u8) !usize { n += 1; if (pane.file == null) return error.NotText; } - // An attachment names its owner by its place in the dump. + // A docked pane names its owner by its place in the dump. for (st.owners, 0..) |owner, k| { const at = owner orelse continue; if (at >= n) continue; @@ -299,7 +299,7 @@ pub fn adopt(p: *Pardes, bytes: []const u8) !usize { for (0..p.view().ncol) |c| for (p.view().cols[c].panes[0..p.view().cols[c].n]) |id| { heights[id] = p.view().rects[id].h; }; - // The group under the pointer (a pane with what is attached to it): the + // The group under the pointer (a pane with what is docked to it): the // new panes go under all of it, out of its owner's rows. var after: usize = p.view().cols[tc].n; var root: ?usize = null; @@ -315,7 +315,7 @@ pub fn adopt(p: *Pardes, bytes: []const u8) !usize { } if (root) |owner| { const r = p.view().rects[owner]; - // Down to the pointer's row; let go over one of its attachments, + // Down to the pointer's row; let go over one of its docked panes, // half of it. const keeps = @max(layout.minRows(p, owner), if (y >= r.y and y < r.y + r.h) (y - r.y) + 1 else r.h / 2); const give = heights[owner] -| keeps; -- cgit v1.3