summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-29 19:36:11 -0300
committerGabriel Schneider <[email protected]>2026-10-29 21:13:33 -0300
commitcc26fe74e092803ac2977801bf6510e05b394c29 (patch)
treeedb5461b54c26269cefbe0407df9bed89d07182d
parent2eb8860b2ca05c426f3962661441aaee13d3be44 (diff)
downloadpardes-cc26fe74e092803ac2977801bf6510e05b394c29.tar.gz
pardes-cc26fe74e092803ac2977801bf6510e05b394c29.zip
web: a dump is a .dump by name everywhere (the download, the embedded fixture, -l's help); the touch check resizes a pane by its grip, there being no rule between panes
Co-Authored-By: Claude Opus 5.5 <[email protected]>
-rw-r--r--build.zig2
-rw-r--r--src/host_io.zig2
-rw-r--r--src/main.zig2
-rw-r--r--src/web.zig4
-rw-r--r--test/web-snapshots/touch.mjs9
5 files changed, 10 insertions, 9 deletions
diff --git a/build.zig b/build.zig
index 097fb1bf..c0235e41 100644
--- a/build.zig
+++ b/build.zig
@@ -1111,7 +1111,7 @@ pub fn build(b: *std.Build) void {
if (is_web) {
const dp = dump_path.?;
- root_mod.addAnonymousImport("embedded.dump.zon", .{
+ root_mod.addAnonymousImport("embedded.dump", .{
.root_source_file = if (std.fs.path.isAbsolute(dp)) .{ .cwd_relative = dp } else b.path(dp),
});
}
diff --git a/src/host_io.zig b/src/host_io.zig
index 99ada59b..7b0fe9a2 100644
--- a/src/host_io.zig
+++ b/src/host_io.zig
@@ -70,7 +70,7 @@ pub fn testClock() ?u64 {
}
pub const Fallback = struct {
- pub const dump_path = "pardes.dump.zon";
+ pub const dump_path = "pardes.dump";
gpa: std.mem.Allocator,
files: std.StringHashMapUnmanaged([]u8) = .empty,
diff --git a/src/main.zig b/src/main.zig
index 0708e9d7..ac2226ae 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -73,7 +73,7 @@ const help_text =
\\ -n <count> initial shell panes: 1 (default) or 3 (classic).
\\ A FILE argument boots just that file instead.
\\ --tty-toggle <key> use Ctrl-<key> to toggle tty/editor mode
- \\ -l <dump.zon> load a dump of another instance (see Dump)
+ \\ -l <dump> load a dump of another instance (see Dump)
\\ -w, --wait inside a pardes pane, hand FILE to the outer
\\ session and return only once the pane it opened
\\ (or already had) is deleted: 0 then, 1 if the
diff --git a/src/web.zig b/src/web.zig
index fd6371c0..5e5a0d74 100644
--- a/src/web.zig
+++ b/src/web.zig
@@ -13,7 +13,7 @@ const pardes = @import("pardes.zig");
const mouse = @import("mouse.zig");
const gpa = std.heap.wasm_allocator;
-const embedded_dump = @embedFile("embedded.dump.zon");
+const embedded_dump = @embedFile("embedded.dump");
const input_capacity = 64 * 1024;
const attr_tagline: u16 = 1 << 7;
@@ -484,7 +484,7 @@ fn writeFile(_: ?*anyopaque, _: u8, path: []const u8, bytes: []const u8) void {
}
fn writeDump(_: ?*anyopaque, bytes: []const u8) void {
- const name = "pardes-dump.zon";
+ const name = "pardes.dump";
host_download(name.ptr, name.len, bytes.ptr, bytes.len);
}
diff --git a/test/web-snapshots/touch.mjs b/test/web-snapshots/touch.mjs
index 3793c0f9..6ced7a29 100644
--- a/test/web-snapshots/touch.mjs
+++ b/test/web-snapshots/touch.mjs
@@ -192,14 +192,15 @@ export default async function ({ grid, touch, wait, stable, delay, evaluate, mou
assert.deepEqual(reflected.lines.slice(0, sharedRows), original.lines.slice(0, sharedRows), "Look must read the source pane body");
const center = Math.floor(frame.cols / 2);
- const separator = Math.max(original.top, reflected.top) - 1;
+ // No rule between panes: the lower one's grip, its tag's gutter, moves it.
+ const separator = Math.max(original.top, reflected.top);
const distance = original.top < reflected.top ? 4 : -4;
- finger = await touch("down", 2, center, separator, null);
+ finger = await touch("down", 2, 0, separator, null);
for (let step = 1; step <= 8; step++) {
- finger = await touch("move", 2, center, separator + distance * step / 8, finger);
+ finger = await touch("move", 2, 0, separator + distance * step / 8, finger);
await delay(20);
}
- await touch("up", 2, center, separator + distance, finger);
+ await touch("up", 2, 0, separator + distance, finger);
await stable(100, 5000);
frame = await grid();
assert.equal(tags(frame).length, 2);