summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-08 23:37:38 -0300
committerGabriel Schneider <[email protected]>2026-11-09 01:28:28 -0300
commitb1769aba4a7c1984ab09bd3c90b69177b14c42d8 (patch)
treecd04a96f003658b654244fffb137f483e2ff3384
parent2c13f29da2441d0e0fb11f11bb7a180054030cc9 (diff)
downloadpardes-b1769aba4a7c1984ab09bd3c90b69177b14c42d8.tar.gz
pardes-b1769aba4a7c1984ab09bd3c90b69177b14c42d8.zip
tests: the columns and layout snapshot scripts (14: colgrip collapse cornerdrag cornerdrag-left delask emptycol layout-close layout-open shrinktag tagalign tagalign2col windownav windowops wheeldrift) are process cases, test/process/tty_layout.zig, their goldens unchanged; checked against the old runner by the tty reading a drag as a motion (the same 7 fail in both); three core breaks (splitBelow at a third, minRows one more, a dropped column's width to its right) fail neither
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
-rw-r--r--test/process/tty_layout.zig783
-rw-r--r--test/snapshots/colgrip.snap35
-rw-r--r--test/snapshots/collapse.snap41
-rw-r--r--test/snapshots/cornerdrag-left.snap39
-rw-r--r--test/snapshots/cornerdrag.snap52
-rw-r--r--test/snapshots/delask.snap75
-rw-r--r--test/snapshots/emptycol.snap22
-rw-r--r--test/snapshots/layout-close.snap62
-rw-r--r--test/snapshots/layout-open.snap56
-rw-r--r--test/snapshots/shrinktag.snap52
-rw-r--r--test/snapshots/tagalign.snap41
-rw-r--r--test/snapshots/tagalign2col.snap25
-rw-r--r--test/snapshots/wheeldrift.snap50
-rw-r--r--test/snapshots/windownav.snap74
-rw-r--r--test/snapshots/windowops.snap56
15 files changed, 782 insertions, 681 deletions
diff --git a/test/process/tty_layout.zig b/test/process/tty_layout.zig
index bd551013..84f76be7 100644
--- a/test/process/tty_layout.zig
+++ b/test/process/tty_layout.zig
@@ -1,3 +1,784 @@
//! The tty frontend's own cases (test/tty.zig), columns, panes and tags: placement, grips, drags, collapse, the window ops.
+const std = @import("std");
+const Tty = @import("../tty.zig").Tty;
-pub const cases = .{};
+pub const cases = .{
+ .{ "tty layout: colgrip", colgrip },
+ .{ "tty layout: collapse", collapse },
+ .{ "tty layout: cornerdrag", cornerdrag },
+ .{ "tty layout: cornerdrag-left", cornerdrag_left },
+ .{ "tty layout: delask", delask },
+ .{ "tty layout: emptycol", emptycol },
+ .{ "tty layout: layout-close", layout_close },
+ .{ "tty layout: layout-open", layout_open },
+ .{ "tty layout: shrinktag", shrinktag },
+ .{ "tty layout: tagalign", tagalign },
+ .{ "tty layout: tagalign2col", tagalign2col },
+ .{ "tty layout: windownav", windownav },
+ .{ "tty layout: windowops", windowops },
+ .{ "tty layout: wheeldrift", wheeldrift },
+};
+
+// Column grips: the two cells left of a column tag carry the column. A grabbed
+// grip lights, and a rail in its color stands where the column will land.
+// The right column is at x 50; its grip is cells 51-52 (1-based) on row 2.
+fn colgrip(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
+ var t = try Tty.init(gpa, exe, "colgrip");
+ defer t.deinit();
+ try t.file("w.txt", "x");
+ try t.start(24, 100, &.{"w.txt"});
+ try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "w.txt");
+ try t.stable(700, 20000);
+ try t.key("a-n");
+ try t.key("a-c");
+ try t.stable(700, 15000);
+ try t.style("rest");
+ // held on its own grip: lit, and no rail, since it lands where it is
+ try t.press("left", "51", 2);
+ try t.stable(400, 5000);
+ try t.style("held");
+ // dropped short of the left column's middle, the left edge moves: the rail is
+ // in the seam cell left of where the column's rule will be
+ try t.drag("left", "41", 2);
+ try t.stable(400, 5000);
+ try t.snap("resize-drag");
+ try t.style("resize-drag");
+ try t.release("left", "41", 2);
+ try t.stable(700, 15000);
+ try t.snap("resize-done");
+ // carried over the left column's left half it goes first; the window edge
+ // has no seam, so the rail runs in the gutter's last cell
+ try t.press("left", "41", 2);
+ try t.drag("left", "10", 2);
+ try t.stable(400, 5000);
+ try t.snap("reorder-drag");
+ try t.style("reorder-drag");
+ try t.release("left", "10", 2);
+ try t.stable(700, 15000);
+ try t.snap("reorder-done");
+ try t.done();
+}
+
+// A default pane-tag command collapses to one row and restores the body.
+// Exercise real middle clicks twice, then the tag's own execute key twice: a
+// click types into the tag, Esc is its normal mode, and Tab executes there.
+fn collapse(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
+ var t = try Tty.init(gpa, exe, "collapse");
+ defer t.deinit();
+ try t.file("kept.txt", "KEEP-FIRST\nKEEP-SECOND\nKEEP-THIRD");
+ try t.start(25, 160, &.{"kept.txt"});
+ try t.wait(8000, "KEEP-THIRD");
+ try t.stable(500, 15000);
+ try t.snap("before");
+ try t.press("middle", "@Collapse", 3);
+ try t.release("middle", "@Collapse", 3);
+ try t.stable(500, 8000);
+ try t.snap("middle-collapsed");
+ // The terminal remembers its last cursor position even when hidden. The core
+ // screen explicitly reports null, guarding against a leaked body caret.
+ try t.snap9p("middle-collapsed-cursor");
+ try t.press("middle", "@Collapse", 3);
+ try t.release("middle", "@Collapse", 3);
+ try t.wait(8000, "KEEP-THIRD");
+ try t.stable(500, 8000);
+ try t.snap("middle-restored");
+ try t.press("left", "@Collapse", 3);
+ try t.release("left", "@Collapse", 3);
+ try t.key("esc");
+ try t.settle(100);
+ try t.key("tab");
+ try t.stable(500, 8000);
+ try t.snap("tab-collapsed");
+ try t.snap9p("tab-collapsed-cursor");
+ try t.press("left", "@Collapse", 3);
+ try t.release("left", "@Collapse", 3);
+ try t.key("esc");
+ try t.settle(100);
+ try t.key("tab");
+ try t.wait(8000, "KEEP-THIRD");
+ try t.stable(500, 8000);
+ try t.snap("tab-restored");
+ // Save via the visible tag; the original bytes must survive all four toggles.
+ try t.press("middle", "@Save", 3);
+ try t.release("middle", "@Save", 3);
+ try t.stable(500, 8000);
+ try t.snapFile("unchanged", "kept.txt");
+ try t.done();
+}
+
+// corner grabs: where a column edge crosses a pane edge, ONE drag moves both.
+// Only the left column's h-splits make a corner — the v handle IS that column's
+// last cell, so that is the only pane pair whose horizontal hint runs through
+// it, and a corner therefore sits exactly where the two lines visibly cross.
+// The layout is windowops': col 0 (x 0, w 50) holds panes 0 (rows 1-15) and 1
+// (rows 16-29), col 1 holds one pane. The corner is col 49, row 15.
+fn cornerdrag(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
+ var t = try Tty.init(gpa, exe, "cornerdrag");
+ defer t.deinit();
+ try t.file("w.txt", "x");
+ try t.start(31, 100, &.{ "-n", "3" });
+ try t.wait(8000, "w.txt");
+ try t.stable(700, 20000);
+ // hover the corner: no hints (columns resize by their grips); the frame
+ // stays empty
+ try t.motion("50", 16);
+ try t.stable(400, 5000);
+ try t.snap("hover-corner");
+ // CONTROL: the same vertical edge ten rows off the crossing is a plain edge.
+ // The identical diagonal drag moves the column and nothing else — pane 0 still
+ // ends on row 15, and the preview is one dash, not two
+ try t.press("left", "50", 7);
+ try t.drag("left", "30", 25);
+ try t.stable(400, 5000);
+ try t.snap("edge-drag");
+ try t.release("left", "30", 25);
+ try t.motion("45", 25);
+ try t.stable(500, 8000);
+ try t.snap("edge-done");
+ // the corner itself, now at col 0's new last col (29) and still row 15: drag it
+ // up and to the right and both boundaries follow the one mouse
+ try t.press("left", "30", 17);
+ try t.drag("left", "60", 9);
+ try t.stable(400, 5000);
+ try t.snap("corner-drag");
+ try t.release("left", "60", 9);
+ try t.motion("45", 25);
+ try t.stable(500, 8000);
+ try t.snap("corner-done");
+ // clamp interaction, half one: shove the corner off the right edge while
+ // staying mid-height. The column preview parks at its MINW stop; the row
+ // preview keeps tracking the mouse exactly
+ try t.press("left", "60", 9);
+ try t.drag("left", "99", 21);
+ try t.stable(400, 5000);
+ try t.snap("clamp-x");
+ // half two, the mirror: below the bottom at mid-width. Now the ROW preview
+ // parks (the lower pane keeps its tag row) and the COLUMN keeps tracking
+ try t.drag("left", "60", 31);
+ try t.stable(400, 5000);
+ try t.snap("clamp-y");
+ try t.release("left", "60", 31);
+ try t.motion("45", 25);
+ try t.stable(500, 8000);
+ try t.snap("clamp-done");
+ try t.done();
+}
+
+// corner grabs on the RIGHT column's side of the v border. The v handle is the
+// LEFT column's last cell, so that column's own h hint runs THROUGH it while the
+// right column's hints start one cell further right — the crossing there reads as
+// a T butting into the junction rather than a full cross, and it is grabbable all
+// the same: one drag moves the column edge and the RIGHT column's pane edge.
+// Layout: windowops' -n 3 (col 0 x 0 w 50, panes on rows 1-15 and 16-29; col 1
+// x 50 w 50), then focus right and Alt-n so col 1 holds two panes as well, split
+// at ITS own row. The two corners on col 49 are then row 16 (col 0's seam, the
+// one that already worked) and row 5 (col 1's, the one this script is about).
+fn cornerdrag_left(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
+ var t = try Tty.init(gpa, exe, "cornerdrag-left");
+ defer t.deinit();
+ try t.file("w.txt", "x");
+ try t.start(31, 100, &.{ "-n", "3" });
+ try t.wait(8000, "w.txt");
+ try t.stable(700, 20000);
+ // a second pane in the RIGHT column
+ try t.key("c-w l enter");
+ try t.stable(400, 5000);
+ try t.key("a-n");
+ try t.stable(700, 15000);
+ try t.snap("right-split");
+ // hover col 1's corner: hovering draws no hints any more, so the frame is
+ // empty; the drags below still show their previews
+ try t.motion("50", 5);
+ try t.stable(400, 5000);
+ try t.snap("hover-corner");
+ // CONTROL: col 0's own seam, hovered: no hint either
+ try t.motion("50", 16);
+ try t.stable(400, 5000);
+ try t.snap("hover-left-corner");
+ // grab col 1's corner and drag down-left: the column preview and col 1's row
+ // preview both follow the one mouse, the row dashes lying to the RIGHT of the v
+ // line because they are the right column's
+ try t.press("left", "50", 6);
+ try t.drag("left", "30", 13);
+ try t.stable(400, 5000);
+ try t.snap("corner-drag");
+ try t.release("left", "30", 13);
+ try t.motion("45", 25);
+ try t.stable(500, 8000);
+ try t.snap("corner-done");
+ try t.done();
+}
+
+// Del from the keyboard on a pane with open panes above AND below asks, on the
+// pane's notice band, which one takes its rows: k above, j below, anything else
+// keeps the pane. A click, and DelAbove/DelBelow (Del k / Del j), never ask.
+fn delask(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
+ var t = try Tty.init(gpa, exe, "delask");
+ defer t.deinit();
+ try t.file("top.txt", "top-marker");
+ try t.start(36, 100, &.{"top.txt"});
+ try t.wait(8000, "top-marker");
+ try t.stable(700, 20000);
+ // two scratch panes below the file, each saying which it is, then focus the
+ // middle one
+ try t.key("space f n");
+ try t.stable(400, 5000);
+ try t.key("i");
+ try t.send("middle-pane");
+ try t.key("esc");
+ try t.settle(100);
+ try t.key("space f n");
+ try t.stable(400, 5000);
+ try t.key("i");
+ try t.send("bottom-pane");
+ try t.key("esc");
+ try t.settle(100);
+ try t.key("c-w k enter");
+ try t.stable(400, 5000);
+ try t.snap("three");
+ // asked, and nothing closes yet; the question goes up on the band only after
+ // config.del_question_delay_ns (400 ms) with no answer, a hint
+ try t.key("space d");
+ try t.settle(700);
+ try t.stable(400, 5000);
+ try t.snap("asked");
+ // Esc takes the question back: the pane stays
+ try t.key("esc");
+ try t.settle(100);
+ try t.stable(400, 5000);
+ try t.snap("kept");
+ // j: the pane below grows over the middle one's rows, the file keeps its own
+ try t.key("space d");
+ try t.stable(400, 5000);
+ try t.key("j");
+ try t.stable(700, 10000);
+ try t.snap("below-took");
+ // a pane under it, and DelBelow (Del j) appended to the middle one's text and
+ // executed with a click: no question, the pane below takes the rows
+ try t.key("space f n");
+ try t.stable(400, 5000);
+ try t.key("i");
+ try t.send("third-pane");
+ try t.key("esc");
+ try t.settle(100);
+ try t.key("c-w k enter");
+ try t.stable(400, 5000);
+ try t.key("A");
+ try t.send(" DelBelow");
+ try t.key("esc");
+ try t.settle(100);
+ try t.stable(400, 5000);
+ try t.snap("typed");
+ try t.press("middle", "@DelBelow", 21);
+ try t.release("middle", "@DelBelow", 21);
+ try t.stable(700, 10000);
+ try t.snap("below-took-click");
+ // a fresh pane at the foot of the column (acme's New takes the bottom half of
+ // the last pane), and the third one, now between the file and it, closed by a
+ // middle click on its tag's Del: no question, and the rows go up as they
+ // always have
+ try t.press("left", "10", 5);
+ try t.release("left", "10", 5);
+ try t.stable(400, 5000);
+ try t.key("space f n");
+ try t.stable(400, 5000);
+ try t.snap("four");
+ try t.press("middle", "@Del", 20);
+ try t.release("middle", "@Del", 20);
+ try t.stable(700, 10000);
+ try t.snap("mouse-del");
+ try t.done();
+}
+
+// A column can hold no pane, as acme's can (cols.c:186). Newcol makes one
+// empty, its tag over blank space and holding the keyboard; the next pane
+// made while it is the active column fills it whole (makenewwindow,
+// util.c:468-469); and a shell that exits there leaves it empty again, the
+// keyboard back on its tag.
+fn emptycol(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
+ var t = try Tty.init(gpa, exe, "emptycol");
+ defer t.deinit();
+ try t.file("notes.txt", "one\ntwo");
+ try t.config("Verbose off");
+ try t.start(24, 100, &.{"notes.txt"});
+ try t.wait(8000, "notes.txt");
+ try t.stable(700, 20000);
+ try t.key("space c n");
+ try t.stable(400, 5000);
+ try t.snap("newcol");
+ try t.key("a-n");
+ try t.stable(700, 15000);
+ try t.snap("filled");
+ try t.key("c-b");
+ try t.stable(400, 5000);
+ try t.send("exit");
+ try t.key("enter");
+ try t.stable(700, 10000);
+ try t.snap("emptied");
+ try t.done();
+}
+
+// every pane close hands its space to ONE sibling, the rest of the column
+// keeps its sizes: Alt-c move-out, tag Del, and shell exit (pty EOF); an
+// emptied column stays, as acme's does, its tag over blank space
+fn layout_close(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
+ var t = try Tty.init(gpa, exe, "layout-close");
+ defer t.deinit();
+ try t.file("marker.txt", "x");
+ try t.start(41, 140, &.{ "-n", "3" });
+ try t.wait(8000, "marker.txt");
+ try t.stable(700, 20000);
+ // build a left column of five: Alt-n three times from pane 0 (active follows
+ // the new pane, each split takes from the freshly split pane only)
+ try t.press("left", "5", 9);
+ try t.release("left", "5", 9);
+ try t.stable(400, 5000);
+ try t.key("a-n");
+ try t.stable(700, 15000);
+ try t.key("a-n");
+ try t.stable(700, 15000);
+ try t.key("a-n");
+ try t.stable(700, 15000);
+ try t.snap("built");
+ // Alt-c: the active (4th) pane moves to a fresh column; the pane above it
+ // absorbs its rows, the other three keep theirs (columns reflow horizontally)
+ try t.key("a-c");
+ try t.stable(700, 15000);
+ try t.snap("altc");
+ // Del the 2nd pane: source-local column insertion makes this column too narrow
+ // to expose its tag words, so focus its body and invoke the same pane-scoped
+ // builtin by chord. With panes above and below, the chord asks which one
+ // takes the rows: k, the pane above, which also takes the focus. The other
+ // panes keep their rows.
+ try t.press("left", "5", 9);
+ try t.release("left", "5", 9);
+ try t.stable(400, 5000);
+ try t.key("space d");
+ try t.key("k");
+ try t.stable(700, 10000);
+ try t.snap("del");
+ // exit the (now) 2nd shell through its real tty: pty EOF, again only the pane
+ // above absorbs — and takes the focus too, not the pane that had it before
+ // this one (the moved-out column)
+ try t.press("left", "40", 9);
+ try t.release("left", "40", 9);
+ try t.stable(400, 5000);
+ try t.press("left", "5", 24);
+ try t.release("left", "5", 24);
+ try t.stable(400, 5000);
+ try t.key("c-b");
+ try t.stable(400, 5000);
+ try t.send("exit");
+ try t.key("enter");
+ try t.stable(700, 10000);
+ try t.snap("exit");
+ // exit the moved-out pane's shell: its column stays where it was, empty, the
+ // keyboard on its tag; the other columns keep their widths
+ try t.press("left", "40", 9);
+ try t.release("left", "40", 9);
+ try t.stable(400, 5000);
+ try t.key("c-b");
+ try t.stable(400, 5000);
+ try t.send("exit");
+ try t.key("enter");
+ try t.stable(700, 10000);
+ try t.snap("colclose");
+ try t.done();
+}
+
+// every pane open splits ONE existing pane, the rest of the column keeps its
+// sizes: Alt-n splits the active pane, an execute-spawned command pane for a file's
+// dir splits only the bottom pane of the rightmost column. At this narrow
+// width the first looked-up file also splits below its source, leaving every
+// unrelated pane (including the ones above the source) at its exact rectangle.
+fn layout_open(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
+ var t = try Tty.init(gpa, exe, "layout-open");
+ defer t.deinit();
+ try t.dir("sub");
+ try t.file("sub/f.txt", "echo 'TTY'OK");
+ try t.start(31, 100, &.{ "-n", "3" });
+ try t.wait(8000, "sub");
+ try t.stable(700, 20000);
+ // give pane 0 (top-left) some content so its content-height split is visible
+ try t.press("left", "5", 9);
+ try t.release("left", "5", 9);
+ try t.stable(400, 5000);
+ try t.key("i");
+ try t.send("echo one; echo two");
+ try t.key("enter");
+ try t.key("esc");
+ try t.settle(100);
+ try t.stable(400, 5000);
+ try t.snap("before");
+ // Alt-n: new shell below pane 0 — the bottom pane's boundary must not move
+ try t.key("a-n");
+ try t.stable(700, 15000);
+ try t.snap("altn-left");
+ // make the right column two panes (Alt-n in a fresh column, trivial split)
+ try t.press("left", "70", 9);
+ try t.release("left", "70", 9);
+ try t.stable(400, 5000);
+ try t.key("a-n");
+ try t.stable(700, 15000);
+ try t.snap("altn-right");
+ // look sub/f.txt from the bottom-left shell: the first doc splits this shell,
+ // not the top-left pane. Both panes above it and the entire right column stay put.
+ try t.press("left", "5", 28);
+ try t.release("left", "5", 28);
+ try t.stable(400, 5000);
+ try t.key("i");
+ try t.send("sub/f.txt");
+ try t.key("esc");
+ try t.settle(100);
+ try t.stable(400, 5000);
+ try t.press("right", "7", 28);
+ try t.release("right", "7", 28);
+ try t.stable(700, 15000);
+ try t.snap("file-open");
+ // execute the file's command (middle drag over line 1): it runs as a command
+ // pane for sub/, forked at the bottom of the rightmost column, splitting only
+ // the pane above it
+ try t.press("middle", "8", 25);
+ try t.drag("middle", "19", 25);
+ try t.release("middle", "19", 25);
+ try t.wait(10000, "TTYOK");
+ try t.motion("40", 27);
+ try t.stable(700, 10000);
+ try t.snap("ttydir");
+ try t.done();
+}
+
+// a terminal shrinks only to its tag and 2 body rows (a text pane would go
+// to its tag alone): the pane below dragged by its grip up to the tag row
+// stops there -- a terminal has no rule between panes, so the grip is the
+// handle, as acme's button is -- the gutter box still grabs a move, and
+// dragging back down restores the body intact
+fn shrinktag(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
+ var t = try Tty.init(gpa, exe, "shrinktag");
+ defer t.deinit();
+ try t.file("w.txt", "x");
+ try t.start(31, 100, &.{ "-n", "3" });
+ try t.wait(8000, "w.txt");
+ try t.stable(700, 20000);
+ // content in pane 0 so the restored body is provably intact
+ try t.press("left", "5", 9);
+ try t.release("left", "5", 9);
+ try t.stable(400, 5000);
+ try t.key("i");
+ try t.send("echo one; echo two");
+ try t.key("enter");
+ try t.key("esc");
+ try t.settle(100);
+ try t.stable(400, 5000);
+ try t.snap("before");
+ // drag the lower pane's grip up under pane 0's tag row: it keeps 2 body rows
+ try t.press("left", "1", 18);
+ try t.drag("left", "1", 3);
+ try t.release("left", "1", 3);
+ try t.motion("40", 25);
+ try t.stable(500, 8000);
+ try t.snap("shrunk");
+ // the shrunk pane's gutter box grabs a move: preview one into the right
+ // column, abort by releasing over the pane itself
+ try t.press("left", "1", 3);
+ try t.drag("left", "70", 9);
+ try t.stable(400, 5000);
+ try t.snap("move-preview");
+ try t.drag("left", "20", 3);
+ try t.release("left", "20", 3);
+ try t.stable(400, 5000);
+ // re-enlarge: the lower pane's grip, now under pane 0's 2 body rows, pulled
+ // back down
+ try t.press("left", "1", 7);
+ try t.drag("left", "1", 18);
+ try t.release("left", "1", 18);
+ try t.motion("40", 25);
+ try t.stable(500, 8000);
+ try t.snap("restored");
+ // the bottom pane stops at ITS tag and 2 rows too: its grip dragged past the
+ // bottom
+ try t.press("left", "1", 18);
+ try t.drag("left", "1", 31);
+ try t.release("left", "1", 31);
+ try t.motion("40", 25);
+ try t.stable(500, 8000);
+ try t.snap("bottom-shrunk");
+ try t.done();
+}
+
+// Compact commands stay beside their own prefix regardless of sibling length.
+fn tagalign(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
+ var t = try Tty.init(gpa, exe, "tagalign");
+ defer t.deinit();
+ try t.dir("deep");
+ try t.dir("deep/nested-project-directory");
+ try t.file("deep/nested-project-directory/document.txt", "alpha\nbeta\ngamma");
+ try t.start(31, 100, &.{"deep/nested-project-directory/document.txt"});
+ try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "document.txt");
+ try t.stable(700, 20000);
+ try t.key("a-n");
+ try t.stable(700, 15000);
+ try t.snap("aligned");
+ // Clipping never changes underlying tag text or shorter siblings' positions.
+ try t.resize(31, 87);
+ try t.stable(400, 5000);
+ try t.snap("fits");
+ try t.resize(31, 86);
+ try t.stable(400, 5000);
+ try t.snap("overby1");
+ try t.resize(31, 100);
+ try t.stable(700, 15000);
+ try t.press("left", "12", 3);
+ try t.release("left", "12", 3);
+ try t.stable(400, 5000);
+ try t.snap("clicked");
+ // The click was on the path, so it drafted a name; Esc keeps it pending and
+ // a second Esc drops the draft. `:`
+ // then `A` puts the caret after the tag's end, which reveals the complete
+ // command suffix; a scrolled Del still executes.
+ try t.resize(31, 70);
+ try t.key("esc");
+ try t.settle(100);
+ try t.key("esc");
+ try t.settle(100);
+ try t.key(":");
+ try t.key("A");
+ try t.stable(400, 5000);
+ try t.snap("revealed");
+ try t.press("middle", "@Del", 4);
+ try t.release("middle", "@Del", 4);
+ try t.stable(700, 15000);
+ try t.snap("alone");
+ try t.done();
+}
+
+// Each compact command run follows its own prefix, never a neighboring path.
+fn tagalign2col(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
+ var t = try Tty.init(gpa, exe, "tagalign2col");
+ defer t.deinit();
+ try t.dir("deep");
+ try t.dir("deep/proj");
+ try t.file("deep/proj/document.txt", "alpha\nbeta\ngamma");
+ try t.start(31, 160, &.{"deep/proj/document.txt"});
+ try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "document.txt");
+ try t.stable(700, 20000);
+ // A shell in a separate right-hand column.
+ try t.key("a-n");
+ try t.key("a-c");
+ try t.stable(700, 15000);
+ try t.key("space w h enter");
+ try t.stable(400, 5000);
+ try t.snap("onecol");
+ // A left sibling does not move either existing tag's command text.
+ try t.key("a-n");
+ try t.stable(700, 15000);
+ try t.snap("aligned");
+ // Resizing moves the right column as a whole and clips without hidden spaces.
+ try t.press("left", "80", 11);
+ try t.drag("left", "100", 11);
+ try t.release("left", "100", 11);
+ try t.stable(700, 15000);
+ try t.snap("widened");
+ try t.done();
+}
+
+// RULE: moving focus is a BUILTIN like any other, so there is ONE
+// implementation and every route reaches it. SPC w (as Ctrl-w) is window mode:
+// h/j/k/l move an outline by the same geometric nearest pane Left/Down/Up/Right
+// use and Enter focuses it — and SPC j j
+// plus body-normal Esc run Last, the hop to the pane you were in BEFORE this
+// one, whichever kind it was. It reads the focus history the core already keeps
+// to hand focus back when a pane closes, and going somewhere is itself recorded,
+// which is what makes the hop back the same key. Focus shows up in the golden's
+// `cursor=` header: that is the
+// ACTIVE pane's cursor, so each snap is named by the pane it should land in.
+fn windownav(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
+ var t = try Tty.init(gpa, exe, "windownav");
+ defer t.deinit();
+ try t.file("w.txt", "alpha\nbeta\ngamma");
+ try t.start(31, 100, &.{"w.txt"});
+ try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "w.txt");
+ try t.stable(700, 20000);
+ // A FILE boots alone now, so the terminal every hop below needs is opened here:
+ // Alt-n opens it and focuses it, Alt-c puts it in a column of its own on the
+ // right, SPC w h Enter comes straight back — which also puts the shell on the stack,
+ // and Last only ever names a pane that is on it. (`New`/`Newcol` open an empty
+ // +New scratch now, not a shell.)
+ try t.key("a-n");
+ try t.key("a-c");
+ try t.stable(700, 15000);
+ try t.key("space w h enter");
+ try t.stable(400, 5000);
+ // left column = the file, right column = that shell; the file has focus
+ try t.snap("start");
+ // SPC j j: the pane before this one, which is the shell just opened
+ try t.key("space j j");
+ try t.stable(400, 5000);
+ try t.snap("to-term");
+ // ...and back, because going there made the file the pane before THAT
+ try t.key("space j j");
+ try t.stable(400, 5000);
+ try t.snap("back-to-file");
+ // A bare Esc from a body in normal mode dispatches that SAME builtin: file to
+ // terminal, then the same key on the normal-mode terminal returns to the file.
+ try t.key("esc");
+ try t.settle(100);
+ try t.stable(400, 5000);
+ try t.snap("esc-to-term");
+ try t.key("esc");
+ try t.settle(100);
+ try t.stable(400, 5000);
+ try t.snap("esc-back-to-file");
+ // Alt-n: a second shell, below the file — the left column now has two rows
+ try t.key("a-n");
+ try t.stable(700, 15000);
+ try t.snap("altn");
+ // SPC w k Enter: up out of that new shell into the file above it
+ try t.key("space w k enter");
+ try t.stable(400, 5000);
+ try t.snap("up");
+ // SPC w l Enter: right, into the launch shell
+ try t.key("space w l enter");
+ try t.stable(400, 5000);
+ try t.snap("right");
+ // SPC w h Enter: left, back into the file column
+ try t.key("space w h enter");
+ try t.stable(400, 5000);
+ try t.snap("left");
+ // SPC w j Enter: down, into the shell under the file
+ try t.key("space w j enter");
+ try t.stable(400, 5000);
+ try t.snap("down");
+ // SPC j j from a terminal: the file, which is where SPC w h Enter left off
+ try t.key("space j j");
+ try t.stable(400, 5000);
+ try t.snap("toggle-doc");
+ // ...and back to the shell just left, not the launch shell in the right column,
+ // which was focused earlier
+ try t.key("space j j");
+ try t.stable(400, 5000);
+ try t.snap("toggle-back");
+ try t.done();
+}
+
+// hover (no hints), border drags, grip resize, move drag, Alt-n, Ctrl-w focus (window mode), Debug box
+fn windowops(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
+ var t = try Tty.init(gpa, exe, "windowops");
+ defer t.deinit();
+ try t.file("w.txt", "x");
+ try t.start(31, 100, &.{ "-n", "3" });
+ try t.wait(8000, "w.txt");
+ try t.stable(700, 20000);
+ // hover over the left column's last col: no hint, columns resize by their grips
+ try t.motion("50", 10);
+ try t.stable(400, 5000);
+ try t.snap("hover-v");
+ // hover over the top-left pane's last row: no hint, a row of text is no handle
+ try t.motion("20", 16);
+ try t.stable(400, 5000);
+ try t.snap("hover-h");
+ // drag the vertical border 10 cols left
+ try t.press("left", "50", 11);
+ try t.drag("left", "40", 11);
+ try t.stable(400, 5000);
+ try t.snap("border-drag");
+ try t.release("left", "40", 11);
+ try t.stable(500, 8000);
+ try t.snap("border-done");
+ // resize the left pair by the lower pane's grip, 4 rows up (a terminal has no
+ // rule between panes; pane 0's last row is now 13)
+ try t.press("left", "1", 18);
+ try t.drag("left", "1", 14);
+ try t.release("left", "1", 14);
+ try t.stable(500, 8000);
+ try t.snap("hborder-done");
+ // move pane 1 (its gutter box) into the right column
+ try t.press("left", "1", 18);
+ try t.drag("left", "70", 9);
+ try t.stable(400, 5000);
+ try t.snap("move-preview");
+ try t.release("left", "70", 9);
+ try t.stable(500, 8000);
+ try t.snap("moved");
+ // Alt-n: a new shell below the active pane
+ try t.key("a-n");
+ try t.stable(700, 15000);
+ try t.snap("altn");
+ // Ctrl-w l Enter: window mode, the outline right, into the pane just moved to
+ // the right column, and Enter focuses it (windownav covers the leader side,
+ // SPC w); `h` from here would have nothing to its left to prove.
+ try t.key("c-w l enter");
+ try t.stable(400, 5000);
+ try t.snap("focus-right");
+ // Debug overlay on (topbar middle-click on Debug), then off
+ try t.press("middle", "@Debug", 1);
+ try t.release("middle", "@Debug", 1);
+ try t.stable(400, 8000);
+ try t.snap("debug-on");
+ try t.style("debug-on");
+ try t.press("middle", "@Debug", 1);
+ try t.release("middle", "@Debug", 1);
+ try t.stable(400, 8000);
+ try t.snap("debug-off");
+ try t.done();
+}
+
+// the touchpad drift guard (config.wheel_guard_ticks). A two-finger swipe that
+// is MEANT to be vertical carries a little sideways drift and the pad turns it
+// into wheel_left/wheel_right, so the view used to slide sideways under a plain
+// scroll. Every vertical tick re-arms the guard; a horizontal tick spends one
+// instead of scrolling. SGR codes are vaxis's: 64/65 = wheel up/down (the
+// `wheel` command), 66/67 = wheel RIGHT/left, sent raw as hscroll.snap does.
+// The drift ticks here are all rightward on purpose: leftward drift at column 0
+// is clamped away and would prove nothing.
+fn wheeldrift(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
+ var t = try Tty.init(gpa, exe, "wheeldrift");
+ defer t.deinit();
+ try t.lines("drift.txt", 20, "_0123456789_abcdefghij_ZEND");
+ try t.start(17, 70, &.{"drift.txt"});
+ try t.wait(8000, "drift.txt");
+ try t.stable(700, 20000);
+ // the guard protects HSCROLL, and hscroll only exists with soft wrap off (a
+ // wrapped body has nothing off to the right to drift towards), so turn it off
+ // first — otherwise every sideways tick is a no-op and the test proves nothing
+ try t.key("space t w");
+ try t.stable(400, 5000);
+ try t.snap("home");
+ // a drifting swipe: five ticks down with three sideways ones mixed in. The
+ // view scrolls DOWN five lines and does not move one column sideways.
+ try t.wheel("down", "10", 5);
+ try t.wheel("down", "10", 5);
+ try t.send("\x1b[<66;10;6M");
+ try t.wheel("down", "10", 5);
+ try t.send("\x1b[<66;10;6M");
+ try t.send("\x1b[<66;10;6M");
+ try t.wheel("down", "10", 5);
+ try t.wheel("down", "10", 5);
+ try t.stable(400, 5000);
+ try t.snap("drifted");
+ // the guard is armed at 3 now, so a DELIBERATE horizontal swipe pays it off
+ // first: these three ticks still move nothing (without the guard they would
+ // have shifted the text 12 columns)
+ try t.send("\x1b[<66;10;6M");
+ try t.send("\x1b[<66;10;6M");
+ try t.send("\x1b[<66;10;6M");
+ try t.stable(400, 5000);
+ try t.snap("paying");
+ // ...and from the fourth tick on it scrolls freely: two ticks, 8 columns
+ try t.send("\x1b[<66;10;6M");
+ try t.send("\x1b[<66;10;6M");
+ try t.stable(400, 5000);
+ try t.snap("moved");
+ // vertical again re-arms the guard, so drift is swallowed once more even
+ // though horizontal was just running
+ try t.wheel("up", "10", 5);
+ try t.send("\x1b[<66;10;6M");
+ try t.send("\x1b[<66;10;6M");
+ try t.stable(400, 5000);
+ try t.snap("rearmed");
+ try t.done();
+}
diff --git a/test/snapshots/colgrip.snap b/test/snapshots/colgrip.snap
deleted file mode 100644
index c2b403ed..00000000
--- a/test/snapshots/colgrip.snap
+++ /dev/null
@@ -1,35 +0,0 @@
-# Column grips: the two cells left of a column tag carry the column. A grabbed
-# grip lights, and a rail in its color stands where the column will land.
-# The right column is at x 50; its grip is cells 51-52 (1-based) on row 2.
-file w.txt x
-start 24 100 w.txt
-wait 8000 Newcol Joincol
-wait 8000 w.txt
-stable 700 20000
-key a-n
-key a-c
-stable 700 15000
-snapstyle rest
-# held on its own grip: lit, and no rail, since it lands where it is
-press left 51 2
-stable 400 5000
-snapstyle held
-# dropped short of the left column's middle, the left edge moves: the rail is
-# in the seam cell left of where the column's rule will be
-drag left 41 2
-stable 400 5000
-snap resize-drag
-snapstyle resize-drag
-release left 41 2
-stable 700 15000
-snap resize-done
-# carried over the left column's left half it goes first; the window edge
-# has no seam, so the rail runs in the gutter's last cell
-press left 41 2
-drag left 10 2
-stable 400 5000
-snap reorder-drag
-snapstyle reorder-drag
-release left 10 2
-stable 700 15000
-snap reorder-done
diff --git a/test/snapshots/collapse.snap b/test/snapshots/collapse.snap
deleted file mode 100644
index 83872855..00000000
--- a/test/snapshots/collapse.snap
+++ /dev/null
@@ -1,41 +0,0 @@
-# A default pane-tag command collapses to one row and restores the body.
-# Exercise real middle clicks twice, then the tag's own execute key twice: a
-# click types into the tag, Esc is its normal mode, and Tab executes there.
-file kept.txt KEEP-FIRST\nKEEP-SECOND\nKEEP-THIRD
-start 25 160 kept.txt
-wait 8000 KEEP-THIRD
-stable 500 15000
-snap before
-press middle @Collapse 3
-release middle @Collapse 3
-stable 500 8000
-snap middle-collapsed
-# The terminal remembers its last cursor position even when hidden. The core
-# screen explicitly reports null, guarding against a leaked body caret.
-snap9p middle-collapsed-cursor
-press middle @Collapse 3
-release middle @Collapse 3
-wait 8000 KEEP-THIRD
-stable 500 8000
-snap middle-restored
-press left @Collapse 3
-release left @Collapse 3
-key esc
-settle 100
-key tab
-stable 500 8000
-snap tab-collapsed
-snap9p tab-collapsed-cursor
-press left @Collapse 3
-release left @Collapse 3
-key esc
-settle 100
-key tab
-wait 8000 KEEP-THIRD
-stable 500 8000
-snap tab-restored
-# Save via the visible tag; the original bytes must survive all four toggles.
-press middle @Save 3
-release middle @Save 3
-stable 500 8000
-snapfile unchanged kept.txt
diff --git a/test/snapshots/cornerdrag-left.snap b/test/snapshots/cornerdrag-left.snap
deleted file mode 100644
index 124f6351..00000000
--- a/test/snapshots/cornerdrag-left.snap
+++ /dev/null
@@ -1,39 +0,0 @@
-# corner grabs on the RIGHT column's side of the v border. The v handle is the
-# LEFT column's last cell, so that column's own h hint runs THROUGH it while the
-# right column's hints start one cell further right — the crossing there reads as
-# a T butting into the junction rather than a full cross, and it is grabbable all
-# the same: one drag moves the column edge and the RIGHT column's pane edge.
-# Layout: windowops' -n 3 (col 0 x 0 w 50, panes on rows 1-15 and 16-29; col 1
-# x 50 w 50), then focus right and Alt-n so col 1 holds two panes as well, split
-# at ITS own row. The two corners on col 49 are then row 16 (col 0's seam, the
-# one that already worked) and row 5 (col 1's, the one this script is about).
-file w.txt x
-start 31 100 -n 3
-wait 8000 w.txt
-stable 700 20000
-# a second pane in the RIGHT column
-key c-w l enter
-stable 400 5000
-key a-n
-stable 700 15000
-snap right-split
-# hover col 1's corner: hovering draws no hints any more, so the frame is
-# empty; the drags below still show their previews
-motion 50 5
-stable 400 5000
-snap hover-corner
-# CONTROL: col 0's own seam, hovered: no hint either
-motion 50 16
-stable 400 5000
-snap hover-left-corner
-# grab col 1's corner and drag down-left: the column preview and col 1's row
-# preview both follow the one mouse, the row dashes lying to the RIGHT of the v
-# line because they are the right column's
-press left 50 6
-drag left 30 13
-stable 400 5000
-snap corner-drag
-release left 30 13
-motion 45 25
-stable 500 8000
-snap corner-done
diff --git a/test/snapshots/cornerdrag.snap b/test/snapshots/cornerdrag.snap
deleted file mode 100644
index 69140c17..00000000
--- a/test/snapshots/cornerdrag.snap
+++ /dev/null
@@ -1,52 +0,0 @@
-# corner grabs: where a column edge crosses a pane edge, ONE drag moves both.
-# Only the left column's h-splits make a corner — the v handle IS that column's
-# last cell, so that is the only pane pair whose horizontal hint runs through
-# it, and a corner therefore sits exactly where the two lines visibly cross.
-# The layout is windowops': col 0 (x 0, w 50) holds panes 0 (rows 1-15) and 1
-# (rows 16-29), col 1 holds one pane. The corner is col 49, row 15.
-file w.txt x
-start 31 100 -n 3
-wait 8000 w.txt
-stable 700 20000
-# hover the corner: no hints (columns resize by their grips); the frame
-# stays empty
-motion 50 16
-stable 400 5000
-snap hover-corner
-# CONTROL: the same vertical edge ten rows off the crossing is a plain edge.
-# The identical diagonal drag moves the column and nothing else — pane 0 still
-# ends on row 15, and the preview is one dash, not two
-press left 50 7
-drag left 30 25
-stable 400 5000
-snap edge-drag
-release left 30 25
-motion 45 25
-stable 500 8000
-snap edge-done
-# the corner itself, now at col 0's new last col (29) and still row 15: drag it
-# up and to the right and both boundaries follow the one mouse
-press left 30 17
-drag left 60 9
-stable 400 5000
-snap corner-drag
-release left 60 9
-motion 45 25
-stable 500 8000
-snap corner-done
-# clamp interaction, half one: shove the corner off the right edge while
-# staying mid-height. The column preview parks at its MINW stop; the row
-# preview keeps tracking the mouse exactly
-press left 60 9
-drag left 99 21
-stable 400 5000
-snap clamp-x
-# half two, the mirror: below the bottom at mid-width. Now the ROW preview
-# parks (the lower pane keeps its tag row) and the COLUMN keeps tracking
-drag left 60 31
-stable 400 5000
-snap clamp-y
-release left 60 31
-motion 45 25
-stable 500 8000
-snap clamp-done
diff --git a/test/snapshots/delask.snap b/test/snapshots/delask.snap
deleted file mode 100644
index 1e1ff72f..00000000
--- a/test/snapshots/delask.snap
+++ /dev/null
@@ -1,75 +0,0 @@
-# Del from the keyboard on a pane with open panes above AND below asks, on the
-# pane's notice band, which one takes its rows: k above, j below, anything else
-# keeps the pane. A click, and DelAbove/DelBelow (Del k / Del j), never ask.
-file top.txt top-marker
-start 36 100 top.txt
-wait 8000 top-marker
-stable 700 20000
-# two scratch panes below the file, each saying which it is, then focus the
-# middle one
-key space f n
-stable 400 5000
-key i
-text middle-pane
-key esc
-settle 100
-key space f n
-stable 400 5000
-key i
-text bottom-pane
-key esc
-settle 100
-key c-w k enter
-stable 400 5000
-snap three
-# asked, and nothing closes yet; the question goes up on the band only after
-# config.del_question_delay_ns (400 ms) with no answer, a hint
-key space d
-settle 700
-stable 400 5000
-snap asked
-# Esc takes the question back: the pane stays
-key esc
-settle 100
-stable 400 5000
-snap kept
-# j: the pane below grows over the middle one's rows, the file keeps its own
-key space d
-stable 400 5000
-key j
-stable 700 10000
-snap below-took
-# a pane under it, and DelBelow (Del j) appended to the middle one's text and
-# executed with a click: no question, the pane below takes the rows
-key space f n
-stable 400 5000
-key i
-text third-pane
-key esc
-settle 100
-key c-w k enter
-stable 400 5000
-key A
-send \x20DelBelow
-key esc
-settle 100
-stable 400 5000
-snap typed
-press middle @DelBelow 21
-release middle @DelBelow 21
-stable 700 10000
-snap below-took-click
-# a fresh pane at the foot of the column (acme's New takes the bottom half of
-# the last pane), and the third one, now between the file and it, closed by a
-# middle click on its tag's Del: no question, and the rows go up as they
-# always have
-press left 10 5
-release left 10 5
-stable 400 5000
-key space f n
-stable 400 5000
-snap four
-press middle @Del 20
-release middle @Del 20
-stable 700 10000
-snap mouse-del
diff --git a/test/snapshots/emptycol.snap b/test/snapshots/emptycol.snap
deleted file mode 100644
index edf61eed..00000000
--- a/test/snapshots/emptycol.snap
+++ /dev/null
@@ -1,22 +0,0 @@
-# A column can hold no pane, as acme's can (cols.c:186). Newcol makes one
-# empty, its tag over blank space and holding the keyboard; the next pane
-# made while it is the active column fills it whole (makenewwindow,
-# util.c:468-469); and a shell that exits there leaves it empty again, the
-# keyboard back on its tag.
-file notes.txt one\ntwo
-config Verbose off
-start 24 100 notes.txt
-wait 8000 notes.txt
-stable 700 20000
-key space c n
-stable 400 5000
-snap newcol
-key a-n
-stable 700 15000
-snap filled
-key c-b
-stable 400 5000
-text exit
-key enter
-stable 700 10000
-snap emptied
diff --git a/test/snapshots/layout-close.snap b/test/snapshots/layout-close.snap
deleted file mode 100644
index 3218cfdb..00000000
--- a/test/snapshots/layout-close.snap
+++ /dev/null
@@ -1,62 +0,0 @@
-# every pane close hands its space to ONE sibling, the rest of the column
-# keeps its sizes: Alt-c move-out, tag Del, and shell exit (pty EOF); an
-# emptied column stays, as acme's does, its tag over blank space
-file marker.txt x
-start 41 140 -n 3
-wait 8000 marker.txt
-stable 700 20000
-# build a left column of five: Alt-n three times from pane 0 (active follows
-# the new pane, each split takes from the freshly split pane only)
-press left 5 9
-release left 5 9
-stable 400 5000
-key a-n
-stable 700 15000
-key a-n
-stable 700 15000
-key a-n
-stable 700 15000
-snap built
-# Alt-c: the active (4th) pane moves to a fresh column; the pane above it
-# absorbs its rows, the other three keep theirs (columns reflow horizontally)
-key a-c
-stable 700 15000
-snap altc
-# Del the 2nd pane: source-local column insertion makes this column too narrow
-# to expose its tag words, so focus its body and invoke the same pane-scoped
-# builtin by chord. With panes above and below, the chord asks which one
-# takes the rows: k, the pane above, which also takes the focus. The other
-# panes keep their rows.
-press left 5 9
-release left 5 9
-stable 400 5000
-key space d
-key k
-stable 700 10000
-snap del
-# exit the (now) 2nd shell through its real tty: pty EOF, again only the pane
-# above absorbs — and takes the focus too, not the pane that had it before
-# this one (the moved-out column)
-press left 40 9
-release left 40 9
-stable 400 5000
-press left 5 24
-release left 5 24
-stable 400 5000
-key c-b
-stable 400 5000
-text exit
-key enter
-stable 700 10000
-snap exit
-# exit the moved-out pane's shell: its column stays where it was, empty, the
-# keyboard on its tag; the other columns keep their widths
-press left 40 9
-release left 40 9
-stable 400 5000
-key c-b
-stable 400 5000
-text exit
-key enter
-stable 700 10000
-snap colclose
diff --git a/test/snapshots/layout-open.snap b/test/snapshots/layout-open.snap
deleted file mode 100644
index 43cf56dd..00000000
--- a/test/snapshots/layout-open.snap
+++ /dev/null
@@ -1,56 +0,0 @@
-# every pane open splits ONE existing pane, the rest of the column keeps its
-# sizes: Alt-n splits the active pane, an execute-spawned command pane for a file's
-# dir splits only the bottom pane of the rightmost column. At this narrow
-# width the first looked-up file also splits below its source, leaving every
-# unrelated pane (including the ones above the source) at its exact rectangle.
-dirmk sub
-file sub/f.txt echo 'TTY'OK
-start 31 100 -n 3
-wait 8000 sub
-stable 700 20000
-# give pane 0 (top-left) some content so its content-height split is visible
-press left 5 9
-release left 5 9
-stable 400 5000
-key i
-text echo one; echo two
-key enter
-key esc
-settle 100
-stable 400 5000
-snap before
-# Alt-n: new shell below pane 0 — the bottom pane's boundary must not move
-key a-n
-stable 700 15000
-snap altn-left
-# make the right column two panes (Alt-n in a fresh column, trivial split)
-press left 70 9
-release left 70 9
-stable 400 5000
-key a-n
-stable 700 15000
-snap altn-right
-# look sub/f.txt from the bottom-left shell: the first doc splits this shell,
-# not the top-left pane. Both panes above it and the entire right column stay put.
-press left 5 28
-release left 5 28
-stable 400 5000
-key i
-text sub/f.txt
-key esc
-settle 100
-stable 400 5000
-press right 7 28
-release right 7 28
-stable 700 15000
-snap file-open
-# execute the file's command (middle drag over line 1): it runs as a command
-# pane for sub/, forked at the bottom of the rightmost column, splitting only
-# the pane above it
-press middle 8 25
-drag middle 19 25
-release middle 19 25
-wait 10000 TTYOK
-motion 40 27
-stable 700 10000
-snap ttydir
diff --git a/test/snapshots/shrinktag.snap b/test/snapshots/shrinktag.snap
deleted file mode 100644
index 5264be74..00000000
--- a/test/snapshots/shrinktag.snap
+++ /dev/null
@@ -1,52 +0,0 @@
-# a terminal shrinks only to its tag and 2 body rows (a text pane would go
-# to its tag alone): the pane below dragged by its grip up to the tag row
-# stops there -- a terminal has no rule between panes, so the grip is the
-# handle, as acme's button is -- the gutter box still grabs a move, and
-# dragging back down restores the body intact
-file w.txt x
-start 31 100 -n 3
-wait 8000 w.txt
-stable 700 20000
-# content in pane 0 so the restored body is provably intact
-press left 5 9
-release left 5 9
-stable 400 5000
-key i
-text echo one; echo two
-key enter
-key esc
-settle 100
-stable 400 5000
-snap before
-# drag the lower pane's grip up under pane 0's tag row: it keeps 2 body rows
-press left 1 18
-drag left 1 3
-release left 1 3
-motion 40 25
-stable 500 8000
-snap shrunk
-# the shrunk pane's gutter box grabs a move: preview one into the right
-# column, abort by releasing over the pane itself
-press left 1 3
-drag left 70 9
-stable 400 5000
-snap move-preview
-drag left 20 3
-release left 20 3
-stable 400 5000
-# re-enlarge: the lower pane's grip, now under pane 0's 2 body rows, pulled
-# back down
-press left 1 7
-drag left 1 18
-release left 1 18
-motion 40 25
-stable 500 8000
-snap restored
-# the bottom pane stops at ITS tag and 2 rows too: its grip dragged past the
-# bottom
-press left 1 18
-drag left 1 31
-release left 1 31
-motion 40 25
-stable 500 8000
-snap bottom-shrunk
diff --git a/test/snapshots/tagalign.snap b/test/snapshots/tagalign.snap
deleted file mode 100644
index 7237167a..00000000
--- a/test/snapshots/tagalign.snap
+++ /dev/null
@@ -1,41 +0,0 @@
-# Compact commands stay beside their own prefix regardless of sibling length.
-dirmk deep
-dirmk deep/nested-project-directory
-file deep/nested-project-directory/document.txt alpha\nbeta\ngamma
-start 31 100 deep/nested-project-directory/document.txt
-wait 8000 Newcol Joincol
-wait 8000 document.txt
-stable 700 20000
-key a-n
-stable 700 15000
-snap aligned
-# Clipping never changes underlying tag text or shorter siblings' positions.
-resize 31 87
-stable 400 5000
-snap fits
-resize 31 86
-stable 400 5000
-snap overby1
-resize 31 100
-stable 700 15000
-press left 12 3
-release left 12 3
-stable 400 5000
-snap clicked
-# The click was on the path, so it drafted a name; Esc keeps it pending and
-# a second Esc drops the draft. `:`
-# then `A` puts the caret after the tag's end, which reveals the complete
-# command suffix; a scrolled Del still executes.
-resize 31 70
-key esc
-settle 100
-key esc
-settle 100
-key :
-key A
-stable 400 5000
-snap revealed
-press middle @Del 4
-release middle @Del 4
-stable 700 15000
-snap alone
diff --git a/test/snapshots/tagalign2col.snap b/test/snapshots/tagalign2col.snap
deleted file mode 100644
index 7bd99ff5..00000000
--- a/test/snapshots/tagalign2col.snap
+++ /dev/null
@@ -1,25 +0,0 @@
-# Each compact command run follows its own prefix, never a neighboring path.
-dirmk deep
-dirmk deep/proj
-file deep/proj/document.txt alpha\nbeta\ngamma
-start 31 160 deep/proj/document.txt
-wait 8000 Newcol Joincol
-wait 8000 document.txt
-stable 700 20000
-# A shell in a separate right-hand column.
-key a-n
-key a-c
-stable 700 15000
-key space w h enter
-stable 400 5000
-snap onecol
-# A left sibling does not move either existing tag's command text.
-key a-n
-stable 700 15000
-snap aligned
-# Resizing moves the right column as a whole and clips without hidden spaces.
-press left 80 11
-drag left 100 11
-release left 100 11
-stable 700 15000
-snap widened
diff --git a/test/snapshots/wheeldrift.snap b/test/snapshots/wheeldrift.snap
deleted file mode 100644
index 48d3c627..00000000
--- a/test/snapshots/wheeldrift.snap
+++ /dev/null
@@ -1,50 +0,0 @@
-# the touchpad drift guard (config.wheel_guard_ticks). A two-finger swipe that
-# is MEANT to be vertical carries a little sideways drift and the pad turns it
-# into wheel_left/wheel_right, so the view used to slide sideways under a plain
-# scroll. Every vertical tick re-arms the guard; a horizontal tick spends one
-# instead of scrolling. SGR codes are vaxis's: 64/65 = wheel up/down (the
-# `wheel` command), 66/67 = wheel RIGHT/left, sent raw as hscroll.snap does.
-# The drift ticks here are all rightward on purpose: leftward drift at column 0
-# is clamped away and would prove nothing.
-lines drift.txt 20 _0123456789_abcdefghij_ZEND
-start 17 70 drift.txt
-wait 8000 drift.txt
-stable 700 20000
-# the guard protects HSCROLL, and hscroll only exists with soft wrap off (a
-# wrapped body has nothing off to the right to drift towards), so turn it off
-# first — otherwise every sideways tick is a no-op and the test proves nothing
-key space t w
-stable 400 5000
-snap home
-# a drifting swipe: five ticks down with three sideways ones mixed in. The
-# view scrolls DOWN five lines and does not move one column sideways.
-wheel down 10 5
-wheel down 10 5
-send \x1b[<66;10;6M
-wheel down 10 5
-send \x1b[<66;10;6M
-send \x1b[<66;10;6M
-wheel down 10 5
-wheel down 10 5
-stable 400 5000
-snap drifted
-# the guard is armed at 3 now, so a DELIBERATE horizontal swipe pays it off
-# first: these three ticks still move nothing (without the guard they would
-# have shifted the text 12 columns)
-send \x1b[<66;10;6M
-send \x1b[<66;10;6M
-send \x1b[<66;10;6M
-stable 400 5000
-snap paying
-# ...and from the fourth tick on it scrolls freely: two ticks, 8 columns
-send \x1b[<66;10;6M
-send \x1b[<66;10;6M
-stable 400 5000
-snap moved
-# vertical again re-arms the guard, so drift is swallowed once more even
-# though horizontal was just running
-wheel up 10 5
-send \x1b[<66;10;6M
-send \x1b[<66;10;6M
-stable 400 5000
-snap rearmed
diff --git a/test/snapshots/windownav.snap b/test/snapshots/windownav.snap
deleted file mode 100644
index d929bb6f..00000000
--- a/test/snapshots/windownav.snap
+++ /dev/null
@@ -1,74 +0,0 @@
-# RULE: moving focus is a BUILTIN like any other, so there is ONE
-# implementation and every route reaches it. SPC w (as Ctrl-w) is window mode:
-# h/j/k/l move an outline by the same geometric nearest pane Left/Down/Up/Right
-# use and Enter focuses it — and SPC j j
-# plus body-normal Esc run Last, the hop to the pane you were in BEFORE this
-# one, whichever kind it was. It reads the focus history the core already keeps
-# to hand focus back when a pane closes, and going somewhere is itself recorded,
-# which is what makes the hop back the same key. Focus shows up in the golden's
-# `cursor=` header: that is the
-# ACTIVE pane's cursor, so each snap is named by the pane it should land in.
-file w.txt alpha\nbeta\ngamma
-start 31 100 w.txt
-wait 8000 Newcol Joincol
-wait 8000 w.txt
-stable 700 20000
-# A FILE boots alone now, so the terminal every hop below needs is opened here:
-# Alt-n opens it and focuses it, Alt-c puts it in a column of its own on the
-# right, SPC w h Enter comes straight back — which also puts the shell on the stack,
-# and Last only ever names a pane that is on it. (`New`/`Newcol` open an empty
-# +New scratch now, not a shell.)
-key a-n
-key a-c
-stable 700 15000
-key space w h enter
-stable 400 5000
-# left column = the file, right column = that shell; the file has focus
-snap start
-# SPC j j: the pane before this one, which is the shell just opened
-key space j j
-stable 400 5000
-snap to-term
-# ...and back, because going there made the file the pane before THAT
-key space j j
-stable 400 5000
-snap back-to-file
-# A bare Esc from a body in normal mode dispatches that SAME builtin: file to
-# terminal, then the same key on the normal-mode terminal returns to the file.
-key esc
-settle 100
-stable 400 5000
-snap esc-to-term
-key esc
-settle 100
-stable 400 5000
-snap esc-back-to-file
-# Alt-n: a second shell, below the file — the left column now has two rows
-key a-n
-stable 700 15000
-snap altn
-# SPC w k Enter: up out of that new shell into the file above it
-key space w k enter
-stable 400 5000
-snap up
-# SPC w l Enter: right, into the launch shell
-key space w l enter
-stable 400 5000
-snap right
-# SPC w h Enter: left, back into the file column
-key space w h enter
-stable 400 5000
-snap left
-# SPC w j Enter: down, into the shell under the file
-key space w j enter
-stable 400 5000
-snap down
-# SPC j j from a terminal: the file, which is where SPC w h Enter left off
-key space j j
-stable 400 5000
-snap toggle-doc
-# ...and back to the shell just left, not the launch shell in the right column,
-# which was focused earlier
-key space j j
-stable 400 5000
-snap toggle-back
diff --git a/test/snapshots/windowops.snap b/test/snapshots/windowops.snap
deleted file mode 100644
index 7eb82148..00000000
--- a/test/snapshots/windowops.snap
+++ /dev/null
@@ -1,56 +0,0 @@
-# hover (no hints), border drags, grip resize, move drag, Alt-n, Ctrl-w focus (window mode), Debug box
-file w.txt x
-start 31 100 -n 3
-wait 8000 w.txt
-stable 700 20000
-# hover over the left column's last col: no hint, columns resize by their grips
-motion 50 10
-stable 400 5000
-snap hover-v
-# hover over the top-left pane's last row: no hint, a row of text is no handle
-motion 20 16
-stable 400 5000
-snap hover-h
-# drag the vertical border 10 cols left
-press left 50 11
-drag left 40 11
-stable 400 5000
-snap border-drag
-release left 40 11
-stable 500 8000
-snap border-done
-# resize the left pair by the lower pane's grip, 4 rows up (a terminal has no
-# rule between panes; pane 0's last row is now 13)
-press left 1 18
-drag left 1 14
-release left 1 14
-stable 500 8000
-snap hborder-done
-# move pane 1 (its gutter box) into the right column
-press left 1 18
-drag left 70 9
-stable 400 5000
-snap move-preview
-release left 70 9
-stable 500 8000
-snap moved
-# Alt-n: a new shell below the active pane
-key a-n
-stable 700 15000
-snap altn
-# Ctrl-w l Enter: window mode, the outline right, into the pane just moved to
-# the right column, and Enter focuses it (windownav covers the leader side,
-# SPC w); `h` from here would have nothing to its left to prove.
-key c-w l enter
-stable 400 5000
-snap focus-right
-# Debug overlay on (topbar middle-click on Debug), then off
-press middle @Debug 1
-release middle @Debug 1
-stable 400 8000
-snap debug-on
-snapstyle debug-on
-press middle @Debug 1
-release middle @Debug 1
-stable 400 8000
-snap debug-off