summaryrefslogtreecommitdiff
path: root/src/addon_test.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-06 18:22:04 -0300
committerGabriel Schneider <[email protected]>2026-11-06 20:00:43 -0300
commiteeb59b92295e74b956d32e66c3c318e105a391db (patch)
treed7178f0b87c5740a077119705331efa3d0319547 /src/addon_test.zig
parentb22fa2638bca470bbd8c5ea4768eb0eaaa3e8195 (diff)
downloadpardes-eeb59b92295e74b956d32e66c3c318e105a391db.tar.gz
pardes-eeb59b92295e74b956d32e66c3c318e105a391db.zip
kinds #38, a kind's ticks and views as units of the session's origin (§17.2 B 1): a step of the session's own (a tick, a job's answer, a 9P request, any input no client sends) tells each view whose facts moved and ticks a focus changed or a deadline come, a client's input ticks only the pane its key, click or word went to (which already waits), so a client never guesses a tick and never waits for one; the tick's prefix is in its taped outcome (a Shadow's tag is the authority's from the tape, `told` and the frame's prefix gone, the dump carrying the prefix), Kind.wake says a focus change, the tick wait and Kind.repaint are gone, the post-unit flush stays for the tick after a key; the stall test asserts the replay (0 mispredicted, 0 waited)
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/addon_test.zig')
-rw-r--r--src/addon_test.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/addon_test.zig b/src/addon_test.zig
index 7c9950d7..2e673145 100644
--- a/src/addon_test.zig
+++ b/src/addon_test.zig
@@ -138,13 +138,13 @@ fn run(io: std.Io, gpa: std.mem.Allocator, lib: []const u8, script_path: ?[]cons
if (!p.executeBuiltinLine(at, line)) try out.print("not a word here: {s}\n", .{verb});
}
drain(p);
- // A tick owed (a pane opened or loaded here, outside a step) and a
- // view whose facts a frame's layout changed (its tag wrapped), as
- // a host steps for them.
- if (p.panes[id.?]) |pane| if (window(p, id.?) != null and (pane.addon.?.next_tick == 1 or Kind.viewOwed(p, pane.addon.?, id.?))) {
+ // The session's own steps owed (a tick asked outside a step, a view
+ // whose facts moved, a focus), as a host's pump takes them (17.2).
+ var owed: usize = 0;
+ while (owed < 4 and window(p, id.?) != null and (Kind.wake(p) orelse std.math.maxInt(u64)) <= @max(1, p.clock.stepped_ns)) : (owed += 1) {
p.update(.tick);
drain(p);
- };
+ }
try show(p, gpa, id.?, out, opened or is(verb, "size"));
if (Kind.breach.len > 0 and !said) try out.print("addon-test: {s}\n", .{Kind.breach.slice()});
said = Kind.breach.len > 0;