summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-25 05:07:21 -0300
committerGabriel Schneider <[email protected]>2026-11-25 05:18:54 -0300
commit304ea98913c178de9645cad5c3fe45a5f13e25d5 (patch)
tree2b0999db5a343b2a0bc4ee88b2d4933b5cd32f30
parent920aaa6e6c2317aa775937b01f727fa9418b7db2 (diff)
downloadpardes-304ea98913c178de9645cad5c3fe45a5f13e25d5.tar.gz
pardes-304ea98913c178de9645cad5c3fe45a5f13e25d5.zip
draw: no pane dims while a tag is out of rest (walk UI polish P1, UX DESIGN.md D9): the other panes' every cell took `style.dim` while any tag was out of rest (SPEC §3.6's "slightly", built as the faint attribute: fg 12.5:1 to 4.5:1, comments 4.06:1 to 1.96:1 on neonotte84, UX A7), stacked on the user's own InactiveDim, flashed the whole screen at every SPC and repainted every pane per state change; now a tag out of rest changes its own pane and the notice row only, the others keep their look at rest (InactiveDim already applied to unfocused panes); THE CHANGE: render's pass over the other panes' cells and layers is deleted; TagState.previewing keeps its `.full` (the whole window wearing a theme, taken off at rest) and its doc says so: no pane's own bit is read any more, so Pick.unroll no longer sets the landing pane's (the field keeps its type: the wire and the dumps unchanged); TEST FIRST: Band.zig "a pane whose body would drop below four rows ... borrows them": the other pane's tag and body cells are not dim out of rest (on the base: dim, fails); core-test 1062/1232 (170 skipped); process-test: fsearch's golden regenerated and read: its `typing` style snap's left pane (the terminal) loses the `,f` (faint) on every cell, nothing else; a user saw it at every SPC, picker and prompt
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE
-rw-r--r--core/Band.zig5
-rw-r--r--core/Pick.zig3
-rw-r--r--core/TagState.zig6
-rw-r--r--core/draw.zig13
-rw-r--r--test/snapshots/fsearch.golden56
5 files changed, 35 insertions, 48 deletions
diff --git a/core/Band.zig b/core/Band.zig
index 2fcf4a3b..31205d87 100644
--- a/core/Band.zig
+++ b/core/Band.zig
@@ -595,12 +595,13 @@ test "a pane whose body would drop below four rows under its band borrows them f
const r = p.view().rects[low];
try std.testing.expect(r.h > before);
try std.testing.expect(r.h -| pane.tag_rows >= 4);
- // The other panes dim; the one out of rest does not.
+ // No pane dims out of rest (UX D9): the others look as at rest.
var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
defer frame.deinit();
const s = try p.render(frame.allocator());
const other = p.view().rects[top];
- try std.testing.expect(s.at(other.x + 3, other.y).style.dim);
+ try std.testing.expect(!s.at(other.x + 3, other.y).style.dim);
+ try std.testing.expect(!s.at(other.x + 3, other.y + 1).style.dim);
try std.testing.expect(!s.at(r.x + 3, r.y).style.dim);
p.update(.{ .key = .{ .cp = Key.escape } });
try std.testing.expectEqual(before, p.view().rects[low].h);
diff --git a/core/Pick.zig b/core/Pick.zig
index f4e26527..321b16b7 100644
--- a/core/Pick.zig
+++ b/core/Pick.zig
@@ -260,10 +260,9 @@ fn unroll(p: *Pardes, pk: *Pick, query: []const u8) void {
s.rows = .{ .at = @intCast(@min(pk.at, std.math.maxInt(u16))) };
pk.unrolled = true;
pk.shown = no_row;
- // The whole window previews a theme: no pane dimmed (SPEC §3.6).
+ // The whole window previews a theme.
if (pk.source == .themes) s.previewing = .full;
if (p.paneBySerial(pk.landing)) |id| {
- s.previewing.set(id);
const pane = p.panes[id].?;
pk.aside_row = pane.body.cur_row;
pk.aside_col = pane.body.cur_col;
diff --git a/core/TagState.zig b/core/TagState.zig
index 938a45d1..8bead506 100644
--- a/core/TagState.zig
+++ b/core/TagState.zig
@@ -79,9 +79,9 @@ miss: u8 = 0,
/// The leaf each group ran last, by its key (bindings.groups): the cursor
/// starts there and the rolled level underlines it (SPEC §4.3).
used: [bindings.ngroups]u8 = @splat(0),
-/// The panes showing a preview of what the state would do (a picker's
-/// landing pane, a pane an action draws ghosts in), by slot: not dimmed
-/// while the others are (SPEC §3.6). Set by the state that previews.
+/// `.full` while the whole window previews a theme (a themes picker's
+/// row, `:theme `'s): its own again at rest. No pane dims out of rest
+/// (UX D9), so no pane's own bit is read.
previewing: std.StaticBitSet(pardes.MAX_PANES) = .empty,
/// describe-key (SPEC §4.5), in the tag of pane `id`: the next keys are
diff --git a/core/draw.zig b/core/draw.zig
index 179b7cfc..17ac7514 100644
--- a/core/draw.zig
+++ b/core/draw.zig
@@ -361,19 +361,6 @@ pub fn render(p: *Pardes, arena: std.mem.Allocator) !*Surface {
for (s.regionList()) |region| {
if (region.kind == .notice) try joinNotice(p, s, arena, region);
}
- // A tag out of rest: the other panes dim a little so the eye goes to
- // it, but a pane showing a preview (walk UI SPEC §3.6).
- if (TagState.hostOf(p)) |host| for (p.panes, 0..) |slot, id| {
- if (slot == null or id == host or v.tag_state.previewing.isSet(id)) continue;
- const r = v.rects[id];
- for (r.y..r.y + r.h) |y| for (r.x..r.x + r.w) |x| {
- s.at(@intCast(x), @intCast(y)).style.dim = true;
- };
- for ([_]*pardes.Layer{ &s.body_layers[id], &s.tag_layers[id] }) |layer| for (layer.cells[0 .. @as(usize, layer.cols) * layer.rows]) |*cell| {
- cell.style.dim = true;
- };
- };
-
try paintHeaders(p, s);
try paintNoticeRow(p, s);
diff --git a/test/snapshots/fsearch.golden b/test/snapshots/fsearch.golden
index 450ea298..bf8957df 100644
--- a/test/snapshots/fsearch.golden
+++ b/test/snapshots/fsearch.golden
@@ -50,34 +50,34 @@
== style typing grid=180x31
|0: 0-1 d,#1d2824, 2-179 #b2c3b8,#1d2824,
|1: 0-1 d,#887455, 2-89 #b2c3b8,#1d2824, 90-91 #b2c3b8,#887455, 92-179 #becfc4,#314738,
-|2: 0-1 d,#496656,f 2-30 #b2c3b8,#1d2824,f 31-40 #d3b0d9,#1d2824,f 41-89 #b2c3b8,#1d2824,f 90-91 #b2c3b8,#496656,f 92-120 #b2c3b8,#1d2824,f 121-130 #d3b0d9,#1d2824,f 131-179 #b2c3b8,#1d2824,f
-|3: 0-0 d,#608269,f 1-1 d,#0d1410,f 2-89 #e5eee5,#0d1410,f 90-90 #e5eee5,#608269,f 91-179 #e5eee5,#0d1410,f
-|4: 0-0 d,#608269,f 1-1 d,#0d1410,f 2-89 #e5eee5,#0d1410,f 90-90 #e5eee5,#608269,f 91-179 #e5eee5,#0d1410,f
-|5: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269,f 91-179 d,#0d1410,f
-|6: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269,f 91-179 d,#0d1410,f
-|7: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269,f 91-179 d,#0d1410,f
-|8: 0-0 d,#608269,f 1-3 d,#0d1410,f 4-89 #e5eee5,#0d1410,f 90-90 #e5eee5,#608269,f 91-179 #e5eee5,#0d1410,f
-|9: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269,f 91-179 d,#0d1410,f
-|10: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269,f 91-179 d,#0d1410,f
-|11: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269,f 91-179 d,#0d1410,f
-|12: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269,f 91-179 d,#0d1410,f
-|13: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269,f 91-179 d,#0d1410,f
-|14: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269,f 91-179 d,#0d1410,f
-|15: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269,f 91-179 d,#0d1410,f
-|16: 0-1 d,#496656,f 2-30 #b2c3b8,#1d2824,f 31-40 #d3b0d9,#1d2824,f 41-89 #b2c3b8,#1d2824,f 90-91 #000000,#add38a, 92-98 #becfc4,#2c2819, 99-99 #add38a,#2c2819,b 100-100 #add38a,#2c2819, 101-104 #becfc4,#2c2819, 105-112 #becfc4,#2c2819,f 113-138 #becfc4,#2c2819, 139-179 #becfc4,#2c2819,f
-|17: 0-0 d,#608269,f 1-1 d,#0d1410,f 2-89 #e5eee5,#0d1410,f 90-91 #e5eee5,#2c2819, 92-92 #becfc4,#2c2819,f 93-179 #becfc4,#2c2819,
-|18: 0-0 d,#608269,f 1-1 d,#0d1410,f 2-89 #e5eee5,#0d1410,f 90-90 #e5eee5,#e5eee5, 91-94 #e5eee5,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
-|19: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-91 d,#0d1410, 92-94 d,#0d1410,b 95-95 #616f64,#0d1410,b 96-96 #add38a,#0d1410,b 97-100 #f5f7ee,#3c614a, 101-101 #f5f7ee,#0d1410, 102-179 #e5eee5,#0d1410,
-|20: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
-|21: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
-|22: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#5e4923, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
-|23: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-94 d,#0d1410, 95-95 #59675c,#0d1410, 96-96 #add38a,#0d1410, 97-100 #e5eee5,#352e19, 101-179 #e5eee5,#0d1410,
-|24: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
-|25: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
-|26: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
-|27: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#5e4923, 91-93 d,#0d1410, 94-95 #59675c,#0d1410, 96-96 #add38a,#0d1410, 97-100 #e5eee5,#352e19, 101-179 #e5eee5,#0d1410,
-|28: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-93 d,#0d1410, 94-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
-|29: 0-0 d,#608269,f 1-89 d,#0d1410,f 90-90 d,#608269, 91-93 d,#0d1410, 94-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
+|2: 0-1 d,#496656, 2-30 #b2c3b8,#1d2824, 31-40 #d3b0d9,#1d2824, 41-89 #b2c3b8,#1d2824, 90-91 #b2c3b8,#496656, 92-120 #b2c3b8,#1d2824, 121-130 #d3b0d9,#1d2824, 131-179 #b2c3b8,#1d2824,
+|3: 0-0 d,#608269, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 #e5eee5,#608269, 91-179 #e5eee5,#0d1410,
+|4: 0-0 d,#608269, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 #e5eee5,#608269, 91-179 #e5eee5,#0d1410,
+|5: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-179 d,#0d1410,
+|6: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-179 d,#0d1410,
+|7: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-179 d,#0d1410,
+|8: 0-0 d,#608269, 1-3 d,#0d1410, 4-89 #e5eee5,#0d1410, 90-90 #e5eee5,#608269, 91-179 #e5eee5,#0d1410,
+|9: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-179 d,#0d1410,
+|10: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-179 d,#0d1410,
+|11: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-179 d,#0d1410,
+|12: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-179 d,#0d1410,
+|13: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-179 d,#0d1410,
+|14: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-179 d,#0d1410,
+|15: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-179 d,#0d1410,
+|16: 0-1 d,#496656, 2-30 #b2c3b8,#1d2824, 31-40 #d3b0d9,#1d2824, 41-89 #b2c3b8,#1d2824, 90-91 #000000,#add38a, 92-98 #becfc4,#2c2819, 99-99 #add38a,#2c2819,b 100-100 #add38a,#2c2819, 101-104 #becfc4,#2c2819, 105-112 #becfc4,#2c2819,f 113-138 #becfc4,#2c2819, 139-179 #becfc4,#2c2819,f
+|17: 0-0 d,#608269, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-91 #e5eee5,#2c2819, 92-92 #becfc4,#2c2819,f 93-179 #becfc4,#2c2819,
+|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 #e5eee5,#e5eee5, 91-94 #e5eee5,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
+|19: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-91 d,#0d1410, 92-94 d,#0d1410,b 95-95 #616f64,#0d1410,b 96-96 #add38a,#0d1410,b 97-100 #f5f7ee,#3c614a, 101-101 #f5f7ee,#0d1410, 102-179 #e5eee5,#0d1410,
+|20: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
+|21: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
+|22: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#5e4923, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
+|23: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-94 d,#0d1410, 95-95 #59675c,#0d1410, 96-96 #add38a,#0d1410, 97-100 #e5eee5,#352e19, 101-179 #e5eee5,#0d1410,
+|24: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
+|25: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
+|26: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
+|27: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#5e4923, 91-93 d,#0d1410, 94-95 #59675c,#0d1410, 96-96 #add38a,#0d1410, 97-100 #e5eee5,#352e19, 101-179 #e5eee5,#0d1410,
+|28: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-93 d,#0d1410, 94-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
+|29: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-93 d,#0d1410, 94-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410,
|30: 0-1 d,#1d2824, 2-179 #67756e,#1d2824,
== snap list grid=180x31 cursor=110,16
|16: /tmp/pardes-snap/fsearch/cwd Term+bash Save Mode Filter Collapse Del ^ ‹@p1 › ␣ l /MARK/ 1/3