From 94b282971453849eb567124c12bd801a82908392 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sat, 31 Oct 2026 00:46:29 -0300 Subject: locations: a row's colours are in no digest (a `digest` of Row's own; a dump keeps them): they are painted from what the process has painted, the owner's highlights a frame made and the locations cache, both derived, so a window joined from a dump made a `/` query's rows plain where its session had coloured them (the box soak's `pane 21.file.location_rows` at win207-4's `/r`, unit 4/447); replica.zig's test, main fails it at `pane 1.file.location_rows` Co-Authored-By: Claude Opus 5.5 --- src/locations.zig | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/locations.zig') diff --git a/src/locations.zig b/src/locations.zig index d0904607..b14b3a2c 100644 --- a/src/locations.zig +++ b/src/locations.zig @@ -24,6 +24,19 @@ pub const Row = struct { location_end: usize, code_start: usize, colors: []u8 = &.{}, + + /// The replay digest's (src/walk.zig): all of it but its colours. They + /// are painted from what this process has painted (the owner's + /// highlights a frame made, the locations cache: both derived), so a + /// client joined from a dump, or one that drew another view, colours a + /// row its session left plain. They are how a row looks, not where it + /// points; a dump keeps them. + pub fn digest(r: *const Row, h: *pardes.walk.Hasher) void { + inline for (@typeInfo(Row).@"struct".field_names) |name| { + if (comptime std.mem.eql(u8, name, "colors")) continue; + pardes.walk.hash(@FieldType(Row, name), &@field(r, name), h); + } + } }; /// Raw (no safe build's overwrite): a replica's rollback copy pins a row -- cgit v1.3