summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-21 06:52:28 -0300
committerGabriel Schneider <[email protected]>2026-11-21 16:04:39 -0300
commit0635ceab26f92836de300fef4066d7e9dc2494c5 (patch)
tree9be97f81b2c7c60d321f4d75fb6def0e99a12c3d
parente29ff73bbb2c198afbb894ee98854da2d9a7be7d (diff)
downloadpardes-0635ceab26f92836de300fef4066d7e9dc2494c5.tar.gz
pardes-0635ceab26f92836de300fef4066d7e9dc2494c5.zip
replica.may_wait: a directory's pane walked and listed: the screen-state soak's 'client 5's input key stopped at dir_listing, which may_wait does not list' (s5-1, seed 1 at 207 ms) was a far client's own step listing a directory (Dir.zig's tape.site(.dir_listing), from a Look of a directory or Get on one), which no row listed because the walk never stood in a directory's pane; FIRST the walk: On.dir, a directory's pane made by Look <cwd>/ on the authority and walked as the others (every word, key, prefix and gesture): 18 inputs stopped unlisted (Enter and Tab, alone and after each prefix); then the rows, right by P14 (the session's disk): Get -> dir_listing, Enter and * Enter -> resolve, Tab and * Tab -> kind; the walk test passes (11/11 under its filter); a user's far client typing those in a directory's pane waited, as it should, but the soak called it a fault
Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
-rw-r--r--core/replica.zig14
1 files changed, 12 insertions, 2 deletions
diff --git a/core/replica.zig b/core/replica.zig
index 56fc4a59..ced4329d 100644
--- a/core/replica.zig
+++ b/core/replica.zig
@@ -6537,7 +6537,7 @@ test "a client's n in a kind's pane is a motion: it steps to the next place a re
/// `addon`: a kind whose state is its own on the session (a PDF's), which
/// the walk does not stand in (its Still has no search, place or word):
/// the soak's (test/replicas.zig) PDF and pictures are, judged by name.
-const On = enum { any, file, kind, shell, shell_normal, addon };
+const On = enum { any, file, kind, shell, shell_normal, addon, dir };
/// What a far client may wait a round trip for (the user's line, P14: a
/// side effect on the system may be slow; motions, edits and layout are
@@ -6558,6 +6558,12 @@ const may_wait = [_]Wait{
.{ .what = "LookPrev", .on = .any, .stop = "resolve", .why = "a Look's walk: each word asked of the disk" },
.{ .what = "Mini *", .on = .any, .stop = "resolve", .why = "a file opened by name, from the session's disk" },
.{ .what = "Get", .on = .any, .stop = "read_file", .why = "the file read again from the session's disk" },
+ .{ .what = "Get", .on = .dir, .stop = "dir_listing", .why = "a directory listed again from the session's disk" },
+ // A directory's pane (Dir.zig): its entries are names on the session's disk.
+ .{ .what = "Enter", .on = .dir, .stop = "resolve", .why = "the entry under the cursor opened, from the session's disk" },
+ .{ .what = "* Enter", .on = .dir, .stop = "resolve", .why = "the entry opened (Enter after a prefix still opens it)" },
+ .{ .what = "Tab", .on = .dir, .stop = "kind", .why = "what the entry under the cursor is, asked of the session's disk" },
+ .{ .what = "* Tab", .on = .dir, .stop = "kind", .why = "what the entry is (Tab after a prefix still asks)" },
.{ .what = "Save", .on = .any, .stop = "write_file", .why = "a save" },
// A program run, a shell opened or closed: the session's processes.
.{ .what = "Exec *", .on = .any, .stop = "kind", .why = "a program run: its name asked of the disk first" },
@@ -6833,12 +6839,16 @@ test "a far client's every word and key, on a file's pane, a kind's and a shell'
_ = try a.local(.{ .command = "Still" });
const kind = a.core.view().active;
try std.testing.expect(file != kind and a.core.panes[file].?.file != null and a.core.panes[kind].?.addon != null);
+ // A directory's pane (Dir.zig), listed from the disk.
+ _ = try a.local(.{ .command = try std.fmt.bufPrint(&line, "Look {s}/", .{dir}) });
+ const listing = a.core.view().active;
+ try std.testing.expect(a.core.panes[listing].?.file.?.listing != null);
var seen: [may_wait.len]bool = @splat(false);
var hit: [may_wait.len]bool = @splat(false);
var unlisted: u32 = 0;
var tried: u32 = 0;
- const stands = [_]struct { On, ?usize }{ .{ .file, file }, .{ .kind, kind }, .{ .shell, shell }, .{ .shell_normal, shell } };
+ const stands = [_]struct { On, ?usize }{ .{ .file, file }, .{ .kind, kind }, .{ .shell, shell }, .{ .shell_normal, shell }, .{ .dir, listing } };
for (stands) |stand| {
const on, const at = stand;
const id = at orelse continue;