From dfb051bd798f65c2217eea7f95b03dce292e30bf Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sat, 21 Nov 2026 09:46:32 -0300 Subject: layers: `Changes [revset]` pins a revset's changes on a file's pane in this view (bare `@`, bare again off, another replaces; refusals in jj's words) and draws them: what jj says is asked in two recorded answers (Site.jj), `jj log -p --git --context=0` restricted to the file (the pins: id, author, time, the description's first line, and each one's diff, read with diff.zig's walk into hunks and the removed lines' text) and `jj file annotate` at the shown revision (which pin wrote each line), kept as flat arrays in the pane (Pane.changes: replicated, a late joiner has them in the dump, a client never runs jj) and worn by the view whose revset is File.Layers.revset; a pin's lane runs unbroken from a line it wrote to the next while every line between is a newer pin's, so lanes nest, the spine keeping its place and a nested change a level to the right on its rows only, three levels in a gutter the lanes widen (a window two cells, strips of a third of a cell with half that of air: Surface.lanes, drawn by the gui; a terminal three, a `▎` a level), coloured by the theme's accents but its green and red in hue order from the top, one within 15 degrees of the last kept skipped (doom one: magenta, blue, yellow), oldest first; a line a pin added whole (in a run it took away and wrote, past as many as it took away) is green across the line as a diff's added line; with Changes off nothing is drawn and the gutter is as it was; tests: the data through the pane (pins, lines, hunks, removed text, unpin, `@` touching nothing, a refusal), a client replaying it ends equal, the lanes and grounds of a three-deep stack in a terminal's cells and a window's strips; core-test 895/1055 (160 skipped), shell-test 1097/1100 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- core/root.zig | 1 + 1 file changed, 1 insertion(+) (limited to 'core/root.zig') diff --git a/core/root.zig b/core/root.zig index 65f61e0d..de1c44b0 100644 --- a/core/root.zig +++ b/core/root.zig @@ -55,6 +55,7 @@ pub const Facts = @import("surface.zig").Facts; pub const Region = @import("surface.zig").Region; pub const Chrome = @import("surface.zig").Chrome; pub const RailTick = @import("surface.zig").RailTick; +pub const Lane = @import("surface.zig").Lane; pub const MAX_REGIONS = @import("surface.zig").MAX_REGIONS; /// What comes in (Event.zig). pub const Mouse = @import("Event.zig").Mouse; -- cgit v1.3