From 8d90edcec1ba432d0f67ecc3a79eb6bf193369ff Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 26 Nov 2026 09:40:17 -0300 Subject: TagState, tagline, Band, draw, layout, mouse, Pick, Trail, Core: out of rest a pane's tag stays exactly as at rest and what the keyboard drives hangs under it, the head on the row under the tag's rows, then the band (UX DESIGN M, binding; the user, looking at a picker started in an empty pane whose tag had become `^ ␣ f Find ascii 1/1`: "doesn't it make sense to the search just show below the tagline instead of being search tagline then results?", then "Keep consistent, idk, yes"): for every state the keyboard drives (rolled and unrolled levels, `"`, Help, describe-key, every picker, every text prompt, `:`, rename, code actions) the tag keeps its mark, owner, trail, path, Keep, computed words and own text, its rows and its wrapping, the box alone saying `^` while typing; THE WAY IT WAS: the head (TagState.head) was the tag's text after a cut-down prefix (D1's owner and newest step, tagline.pathPrefix's out-of-rest branch, Trail's `.newest` part), so the path, Keep and the user's text left the screen while you typed, the key cells sat on the tag's row for a level and jumped with it, and a picker's preview in a reading pane would have named the previewed file had the path stayed; THE CHANGE: TagState.head is the head alone, laid out from the tag's text column on rows of its own (Builder's `lead` gone), and TagState.asking the question a tag says, which stays in the tag (UX D13, M1: questions unchanged); tagline.shownTail is the question or the own text in every state, pathPrefix the path in every state (the out-of-rest branch and Trail's `.newest` part, `newest_cells` and the `cut` buffers deleted); a pane a picker previews in names its own file, the one Pick.showText set aside (tagline.named, tagWords, and Trail.reading asking the same file, so its tint, Keep and words are the rest ones); a pane made for the picker (it has no rest) shows its owner's word alone, `‹@pN ›` (M3; P1's reading 2 reversed); Band.covered is the tag's rows at rest, then the head's rows, then the band's, `over` = head + band (no rows the head reused: M4), layout.headRows the head's own rows and floorRows the tag's rows plus the head's and the band's (a head that does not fit borrows from its column as a band does); draw.zig joinBand paints the head's rows as the band layer's first rows (its spans' inks moved there from paintPaneTag, its caret the band layer's cursor), the band's under them, the spines from the head's key cells on its own row; render draws the host's tag with its rest rows; mouse: a press on a tag out of rest ends its state as Esc does and then does what it does at rest (M3; a pane made for a picker goes with it and the press with it), bandPoint reads the head's rows as the band layer's first, and B1 in the head's field puts the field's caret there; edit.zig refuses an edit of a tag only while it asks; RUN (TEST FIRST): five new tests, each failing on the base (M2, 8959b031dc33) and passing now: TagState "out of rest a tag is drawn as at rest, the head hanging under it ..." (a `.list` picker in a reading pane that walked near.txt -> far.txt: the tag's rows cell for cell as at rest but the box, its path far.txt while the body previews near.txt, the head `␣ l Refs ... 1/1` on the next row, its count the row's last cells, the band under it; Esc, the rows as before: failed on the base at the tag text, `near.txt:2 › ␣ l Refs ...`), TagState "the key cells are one thing growing on the row under the tag ..." (`␣`, `␣ f`, `␣ f Find` in the same cells of the row under a two-row tag: failed on the base, `␣` on the tag's row), TagState "a click that gives the keyboard to another pane ends a level ...; one in the level's own tag ends it too, then does what it does there at rest ..." (was "... one in the level's own tag keeps it"; B1 on the tag's own word ends SPC's level and gives the tag the keyboard, B2 on `Wrap` ends Help and toggles wrap: failed on the base, the level kept), Pick "a pane made for a picker has no rest: its tag is its owner's word alone, `‹@pN ›` ..." (B3 on it: the picker ends, the made pane goes, nothing under the press looked at: failed on the base, its tag `␣ f Find ...`), Command ": hangs its field under the tag, which stays as at rest; `:` on the empty field gives the keyboard to that tag's own text right above it ..." (failed on the base, the tag text `: ...`); the expectations that read the head through the tag's text read it from TagState.head now (TagState's testTag, Prompt's and Command's headOf, Pick's headOf; bindings, Messages, lsp/Ask, Trail, Band, draw, views: ~40), and the ones that read a body's first row while a prompt is up read the rows under the head's (Prompt's `/`, `s`, `|` tests, body_layer's current-place test, Ask's rename); views' short-column picker test runs at 15 rows (the head's row is one more covered row: at 12 the band had none left); the process test msg waits for the second reload by the notice row's `×2` (the pane's one line is under the `s` prompt's head now); AND A FAULT THIS MADE VISIBLE: code actions drew their edit's ghost lines from the body's top under a band drawn over it (Pick.previewing was a place's preview alone), so an edit on the first rows of a file was under the band; with the head's row one more covered row, test/behaviour/language_servers.zig's "SPC l a lists the server's code actions ..." failed (`let x = sum(1, 2);` at line 4 under the head and a 4-row band, not on the screen); THE FIX: code actions' body is their preview from the first (UX DESIGN I1: "a picker and code actions (whose body is the preview) keep D6"): Pick.previewing is true for them, so the body starts under the head and the band as a picker's preview does; the behaviour test passes now; GATES (Debug tui, this change): core-test 1166/1340 (174 skipped; M2's gate 1155/1329), shell-test 1381/1384 (3 skipped), behaviour-test 287/287 and --replay 287/287, pane-test 184/185 (1 skipped), term-test 17/17, kitty-test 45/45 (these three before the code-actions fix and two renames), process-test 8 of 149 failed (3 skipped): exactly the goldens with a frame out of rest (find, fsearch, leader, lsp, msg, pipe, selregex, ttyhelp), re-recorded and explained by the next change; the dump does not change (no pane or view field); no frame or perf gate (the user's rule of 2026-11-26); load 4.2 to 14.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE --- test/behaviour/keys.zig | 8 +++----- test/process/tty_boot.zig | 4 +++- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/behaviour/keys.zig b/test/behaviour/keys.zig index 241468ac..6af3d1ad 100644 --- a/test/behaviour/keys.zig +++ b/test/behaviour/keys.zig @@ -24,13 +24,11 @@ test "keys: a prompt's entry and cancellation leave the tag, the body and its cu }) |case| { try s.write(dot, "6 6"); try s.keys(case.keys); - // The answer is typed into the tag's head (walk UI), shown in place - // of the tag's own text, which it never touches; out of rest the - // path is hidden too (UX D1): the head starts the tag. + // The answer is typed into the head, on the row under the tag, + // which stays as at rest, its own text untouched (UX DESIGN M1, M2). try s.keys("zq"); _ = try s.where(case.shown); - const head = try s.read(tag); - try std.testing.expect(std.mem.startsWith(u8, head, case.shown[1..])); + try std.testing.expectEqualStrings("/test.txt Del keep", try s.read(tag)); try s.keys("\x1b"); try std.testing.expectError(error.NotOnScreen, s.where(case.shown)); try std.testing.expect(std.mem.endsWith(u8, try s.read(s.at("/pane/{d}/ctl", .{n})), " mode:normal ")); diff --git a/test/process/tty_boot.zig b/test/process/tty_boot.zig index 2a4fea00..09311e8f 100644 --- a/test/process/tty_boot.zig +++ b/test/process/tty_boot.zig @@ -854,7 +854,9 @@ fn msg(gpa: std.mem.Allocator, exe: [:0]const u8) !void { // ...and a message arriving UNDER an armed prompt does not disturb it: a second // external write reloads the pane and posts one, the row stays the prompt's. try t.run("printf 'AGAIN\\n' > a.txt"); - try t.wait(10000, "AGAIN"); + // (The pane's one line is under the prompt's head, on the row under the + // tag (UX DESIGN M2): the notice row's count says the second reload.) + try t.wait(10000, "×2"); try t.stable(700, 15000); try t.snap("prompt-wins"); // Esc abandons the input, and the very key that abandoned it is also the key -- cgit v1.3 From 5bfea157e191f2ce8442ddfa9af0955c345d1623 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 26 Nov 2026 10:31:24 -0300 Subject: test/snapshots: the eight goldens with a frame out of rest re-recorded under UX DESIGN M (the change before: the tag stays as at rest, the head on the row under it, then the band), read snap by snap against their recording on M2 (8959b031dc33) with .scratch/walkui/W5/gdiff.py (M2's gcmp.py parser: each label's changed rows, its cursor, the rows whose styles moved); every moved row is one of five classes, none other: (1) A LEVEL ROLLED (leader's spc, spc-h, unmapped; find's group): the tag's row is the rest tag again (`/…/cmds.txt Keep Del`, `/…/here.txt Keep Del`), the level's rows one row down from the row under it (`␣ ▸ b buffer…` row 1 -> 2, its continuation rows 2-3 -> 3-4), over the body's first row; spc-h's and group's caret, on line 1, hidden while it is covered (`cursor 7,2 -> hidden`: UX DESIGN I1, the caret's line may be covered while a level is up); (2) A TEXT PROMPT (pipe's prompt; selregex's prompt-armed, preview, narrowed; msg's prompt, prompt-wins; fsearch's slash, typing, nomatch): the tag's row the rest tag (selregex's narrowed `Edit x/const/ › /…/m.zig Keep Del`, its recipe word in the trail as at rest; fsearch's `‹@p1 › /…/g.txt Keep Del`), the head (`| tr a-z A-Z = Exec Edit |tr a-z A-Z … 1 line → 1`, `s const = Exec Edit x/const/ … 3 selections in 3 lines`, `/ MARK = Look /MARK/ … 1/3 · 3 lines`, `s EXT … 0`) on the row under it over the body's first line, the field's caret one row down; the styles that moved are those two rows' alone (selregex preview and narrowed: 219 cells on rows 1-2; fsearch typing: 152 cells on rows 16-17); (3) A PICKER IN A READING PANE (find's armed, typing, next, nomatch, topbar; lsp's symbols, step, nothing; fsearch's list, ctrln): the tag's row the rest tag (lsp's `a.zig:8 › /…/a.zig Keep Del`, where its head followed `a.zig:8 › `), the head `␣ f Find … 1/5` / `␣ l Symbols …` from the tag's text column on the row under it, the act row and the list's rows one row down, their spines under the head's key cells at columns 2 and 4 (lsp's were after the prefix, at 12 and 14), the field's caret one row down; the preview under them a row lower; (4) A PICKER'S BORROWED ROWS (fsearch's list, ctrln): the landing pane holds a body of 60 % under its tag, head and band (UX D6, M4), and the head's row is one more row above that body: its floor goes from 15 rows to 18 (tag 1 + head 2 + band 4 = 7, then 11), so the pane above gives three more rows and the landing pane's tag is three rows higher (row 15 -> 12); and at rest after the landing (fsearch's landed) the view is a line less scrolled (line 1 at its top, `6 MARK b` on row 22, was 21): the landing put the place at a third of the preview's body, two rows taller now; (5) HELP IN A +Help (ttyhelp's leaderworks): the tag's row `/…/+Help Del`, `Help tutor 1/1` on the row under it, the rows and the doc one row down; no golden at rest moved (the 94 others, and every rest frame of these eight but fsearch's landed, the same byte for byte); the dump format did not change (no pane or view field), so no fuzz and no soak; GATES: process-test 0 of 149 failed (3 skipped; the eight failed on the change before, each its golden); pane-test 184/185 (1 skipped), term-test 17/17, kitty-test 45/45 (this tree, the code-actions fix in); load 3.3 to 6.9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE --- test/snapshots/find.golden | 81 ++++++++++++++++++++----------------- test/snapshots/fsearch.golden | 92 +++++++++++++++++++++--------------------- test/snapshots/leader.golden | 17 ++++---- test/snapshots/lsp.golden | 55 ++++++++++++------------- test/snapshots/msg.golden | 9 +++-- test/snapshots/pipe.golden | 6 +-- test/snapshots/selregex.golden | 24 +++++------ test/snapshots/ttyhelp.golden | 13 +++--- 8 files changed, 151 insertions(+), 146 deletions(-) (limited to 'test') diff --git a/test/snapshots/find.golden b/test/snapshots/find.golden index 50b57e11..97b9e00a 100644 --- a/test/snapshots/find.golden +++ b/test/snapshots/find.golden @@ -1,7 +1,7 @@ -== snap group grid=120x41 cursor=7,2 +== snap group grid=120x41 cursor=hidden | New Term Find Grep Newcol Help Exit +| /tmp/pardes-snap/find/cwd/here.txt Keep Del | ␣ f ▸ c Config f Find g Grep h History l Lists n New r Recent s Save ↓ unroll · ? help -| 1 Find zqm | | | @@ -40,29 +40,30 @@ | | | /tmp/pardes-snap/find/cwd/here.txt:1 -== snap armed grid=120x41 cursor=11,1 -|1: ^ ␣ f Find 1/5 -|2: │ │ Walk Look Split Newcol Grep Edit Copy Keep Drop | Grep Recent Panes Symbols All Jumplist -|3: │ │ ▶ here.txt -|4: │ │ other.txt +== snap armed grid=120x41 cursor=11,2 +|1: ^ /tmp/pardes-snap/find/cwd/here.txt Keep Del +|2: ␣ f Find 1/5 +|3: │ │ Walk Look Split Newcol Grep Edit Copy Keep Drop | Grep Recent Panes Symbols All Jumplist +|4: │ │ ▶ here.txt +|5: │ │ other.txt +|6: │ │ sub/ZQMARK-beta.txt +|7: │ │ sub/nest/zqmark-gamma.txt +|8: │ │ zqmark-alpha.txt +|9: 1▸Find zqm +|40: ⏎ lands here · its text is the preview · S-⏎ a new pane 1 message · SPC h m +== snap typing grid=120x41 cursor=14,2 +|2: ␣ f Find zqm 1/3 +|4: │ │ ▶ zqmark-alpha.txt |5: │ │ sub/ZQMARK-beta.txt |6: │ │ sub/nest/zqmark-gamma.txt -|7: │ │ zqmark-alpha.txt -|8: 1▸Find zqm -|40: ⏎ lands here · its text is the preview · S-⏎ a new pane 1 message · SPC h m -== snap typing grid=120x41 cursor=14,1 -|1: ^ ␣ f Find zqm 1/3 -|3: │ │ ▶ zqmark-alpha.txt -|4: │ │ sub/ZQMARK-beta.txt -|5: │ │ sub/nest/zqmark-gamma.txt -|6: │ │ |7: │ │ -|8: 1▸alpha body -== snap next grid=120x41 cursor=14,1 -|1: ^ ␣ f Find zqm 2/3 -|3: │ │ zqmark-alpha.txt -|4: │ │ ▶ sub/ZQMARK-beta.txt -|8: 1▸beta body +|8: │ │ +|9: 1▸alpha body +== snap next grid=120x41 cursor=14,2 +|2: ␣ f Find zqm 2/3 +|4: │ │ zqmark-alpha.txt +|5: │ │ ▶ sub/ZQMARK-beta.txt +|9: 1▸beta body == snap promoted grid=120x41 cursor=7,2 |1: here.txt:1 › Find zqm 2/3 › /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Keep Del |2: 1 beta body @@ -72,15 +73,17 @@ |6: |7: |8: +|9: |40: ✓ C-o back to Find zqm 2/3 1 message · SPC h m -== snap nomatch grid=120x41 cursor=30,1 -|1: ^ Find zqm 2/3 › ␣ f Find zzqq 0 -|2: │ │ Walk Look Split Newcol Grep Edit Copy Keep Drop | Grep Recent Panes Symbols All Jumplist -|3: │ │ nothing matches -|4: │ │ -|5: │ │ -|6: │ │ -|7: │ │ +== snap nomatch grid=120x41 cursor=15,2 +|1: ^ here.txt:1 › Find zqm 2/3 › /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Keep Del +|2: ␣ f Find zzqq 0 +|3: │ │ Walk Look Split Newcol Grep Edit Copy Keep Drop | Grep Recent Panes Symbols All Jumplist +|4: │ │ nothing matches +|5: │ │ +|6: │ │ +|7: │ │ +|8: │ │ |40: ⏎ lands here · its text is the preview · S-⏎ a new pane 1 message · SPC h m == snap cancel grid=120x41 cursor=7,2 |1: here.txt:1 › Find zqm 2/3 › /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Keep Del @@ -90,13 +93,15 @@ |5: |6: |7: +|8: |40: ✓ /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Find 1 message · SPC h m -== snap topbar grid=120x41 cursor=29,1 -|1: ^ Find zqm 2/3 › ␣ f Find bod 0 -|2: │ │ Walk Look Split Newcol Grep Edit Copy Keep Drop | Grep Recent Panes Symbols All Jumplist -|3: │ │ nothing matches -|4: │ │ -|5: │ │ -|6: │ │ -|7: │ │ +== snap topbar grid=120x41 cursor=14,2 +|1: ^ here.txt:1 › Find zqm 2/3 › /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Keep Del +|2: ␣ f Find bod 0 +|3: │ │ Walk Look Split Newcol Grep Edit Copy Keep Drop | Grep Recent Panes Symbols All Jumplist +|4: │ │ nothing matches +|5: │ │ +|6: │ │ +|7: │ │ +|8: │ │ |40: ⏎ lands here · its text is the preview · S-⏎ a new pane 1 message · SPC h m diff --git a/test/snapshots/fsearch.golden b/test/snapshots/fsearch.golden index 834c95af..a2367418 100644 --- a/test/snapshots/fsearch.golden +++ b/test/snapshots/fsearch.golden @@ -30,10 +30,11 @@ | 12 l12 | | · @p1 a copy of the terminal's text: Tab or B2 runs it; what the program draws next replaces it (Ctrl-b types to the program) 1 message · SPC h m -== snap slash grid=180x31 cursor=101,16 -|16: /tmp/pardes-snap/fsearch/cwd Del Term+bash ^ ‹@p1 › / ⏎ land · M-⏎ as a list · C-r history · esc -== snap typing grid=180x31 cursor=105,16 -|16: /tmp/pardes-snap/fsearch/cwd Del Term+bash ^ ‹@p1 › / MARK = Look /MARK/ 1/3 · 3 lines ⏎ land · M-⏎ as a list · C-r history · esc +== snap slash grid=180x31 cursor=94,17 +|16: /tmp/pardes-snap/fsearch/cwd Del Term+bash ^ ‹@p1 › /tmp/pardes-snap/fsearch/cwd/g.txt Keep Del +|17: ls / ⏎ land · M-⏎ as a list · C-r history · esc +== snap typing grid=180x31 cursor=98,17 +|17: ls / MARK = Look /MARK/ 1/3 · 3 lines ⏎ land · M-⏎ as a list · C-r history · esc |18: g.txt 2▸MARK a == style typing grid=180x31 |0: 0-151 d,#1d2824, 152-179 #b2c3b8,#1d2824, @@ -52,8 +53,8 @@ |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,#465a43, 2-34 #b2c3b8,#1d2824, 35-89 #d3b0d9,#1d2824, 90-91 #000000,#add38a, 92-98 #becfc4,#2c2c0f, 99-99 #bada9d,#2c2c0f,b 100-100 #bada9d,#2c2c0f, 101-106 #becfc4,#2c2c0f, 107-113 #79836f,#2c2c0f, 114-126 #becfc4,#2c2c0f, 127-179 #79836f,#2c2c0f, -|17: 0-0 d,#608269, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 #e5eee5,#608269, 91-94 #e5eee5,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410, +|16: 0-1 d,#465a43, 2-34 #b2c3b8,#1d2824, 35-89 #d3b0d9,#1d2824, 90-91 #000000,#add38a, 92-127 #becfc4,#2c2c0f, 128-133 #ecc8f2,#2c2c0f, 134-179 #becfc4,#2c2c0f, +|17: 0-0 d,#608269, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-91 #e5eee5,#2c2c0f, 92-92 #bada9d,#2c2c0f,b 93-93 #bada9d,#2c2c0f, 94-99 #becfc4,#2c2c0f, 100-106 #79836f,#2c2c0f, 107-126 #becfc4,#2c2c0f, 127-179 #79836f,#2c2c0f, |18: 0-0 d,#608269, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 #e5eee5,#e5eee5, 91-91 #e5eee5,#0d1410, 92-94 #e5eee5,#0d1410,b 95-95 #616f64,#0d1410,b 96-96 #add38a,#0d1410,b 97-100 #0d1410,#917a53, 101-101 #0d1410,#0d1410, 102-179 #e5eee5,#0d1410, |19: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-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, @@ -67,55 +68,47 @@ |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-179 d,#0d1410, |30: 0-1 d,#1d2824, 2-179 #6f7d75,#1d2824, -== snap list grid=180x31 cursor=110,15 -|15: ^ ‹@p1 › ␣ l /MARK/ 1/3 -|16: /tmp/pardes-snap/fsearch/cwd Del Term+bash │ │ Walk Look Split Newcol Grep Edit Copy Keep Drop | Find Grep Recent Panes … -|17: ls │ │ ▶ /tmp/pardes-snap/fsearch/cwd/g.txt:2:1: MARK a -|18: g.txt │ │ /tmp/pardes-snap/fsearch/cwd/g.txt:6:1: MARK b -|19: │ │ /tmp/pardes-snap/fsearch/cwd/g.txt:10:1: MARK c -|20: │ │ -|21: 1 l1 -|22: 2▸MARK a -|23: 3 l3 -|24: 4 l4 -|25: 5 l5 -|26: 6 MARK b -|27: 7 l7 -|28: 8 l8 -|29: 9 l9 -|30: ⏎ lands here · its text is the preview · S-⏎ a new pane 1 message · SPC h m -== snap ctrln grid=180x31 cursor=110,15 -|15: ^ ‹@p1 › ␣ l /MARK/ 2/3 -|17: ls │ │ /tmp/pardes-snap/fsearch/cwd/g.txt:2:1: MARK a -|18: g.txt │ │ ▶ /tmp/pardes-snap/fsearch/cwd/g.txt:6:1: MARK b +== snap list grid=180x31 cursor=103,13 +|12: ^ ‹@p1 › /tmp/pardes-snap/fsearch/cwd/g.txt Keep Del +|13: ␣ l /MARK/ 1/3 +|14: │ │ Walk Look Split Newcol Grep Edit Copy Keep Drop | Find Grep Recent Panes Symbols … +|15: │ │ ▶ /tmp/pardes-snap/fsearch/cwd/g.txt:2:1: MARK a +|16: /tmp/pardes-snap/fsearch/cwd Del Term+bash │ │ /tmp/pardes-snap/fsearch/cwd/g.txt:6:1: MARK b +|17: ls │ │ /tmp/pardes-snap/fsearch/cwd/g.txt:10:1: MARK c +|18: g.txt │ │ +|19: 1 l1 +|20: 2▸MARK a |21: 3 l3 |22: 4 l4 |23: 5 l5 -|24: 6▸MARK b +|24: 6 MARK b |25: 7 l7 |26: 8 l8 |27: 9 l9 |28: 10 MARK c |29: 11 l11 -== snap landed grid=180x31 cursor=97,21 +|30: ⏎ lands here · its text is the preview · S-⏎ a new pane 1 message · SPC h m +== snap ctrln grid=180x31 cursor=103,13 +|13: ␣ l /MARK/ 2/3 +|15: │ │ /tmp/pardes-snap/fsearch/cwd/g.txt:2:1: MARK a +|16: /tmp/pardes-snap/fsearch/cwd Del Term+bash │ │ ▶ /tmp/pardes-snap/fsearch/cwd/g.txt:6:1: MARK b +|19: 2 MARK a +|20: 3 l3 +|21: 4 l4 +|22: 5 l5 +|23: 6▸MARK b +|24: 7 l7 +|25: 8 l8 +|26: 9 l9 +|27: 10 MARK c +|28: 11 l11 +|29: 12 l12 +== snap landed grid=180x31 cursor=97,22 +|12: +|13: +|14: |15: |16: /tmp/pardes-snap/fsearch/cwd Del Term+bash ‹@p1 › g.txt:1 › /MARK/ 2/3 › /tmp/pardes-snap/fsearch/cwd/g.txt Keep Del -|17: ls 2 MARK a -|18: g.txt 3 l3 -|19: 4 l4 -|20: 5 l5 -|21: 6 MARK b -|22: 7 l7 -|23: 8 l8 -|24: 9 l9 -|25: 10 MARK c -|26: 11 l11 -|27: 12 l12 -|28: -|29: -|30: ✓ C-o back to /MARK/ 2/3 1 message · SPC h m -== snap n grid=180x31 cursor=97,26 -|16: /tmp/pardes-snap/fsearch/cwd Del Term+bash ‹@p1 › g.txt:1 › /MARK/ 3/3 › /tmp/pardes-snap/fsearch/cwd/g.txt Keep Del |17: ls 1 l1 |18: g.txt 2 MARK a |19: 3 l3 @@ -128,8 +121,13 @@ |26: 10 MARK c |27: 11 l11 |28: 12 l12 +|29: +|30: ✓ C-o back to /MARK/ 2/3 1 message · SPC h m +== snap n grid=180x31 cursor=97,26 +|16: /tmp/pardes-snap/fsearch/cwd Del Term+bash ‹@p1 › g.txt:1 › /MARK/ 3/3 › /tmp/pardes-snap/fsearch/cwd/g.txt Keep Del == snap N grid=180x31 cursor=97,22 |16: /tmp/pardes-snap/fsearch/cwd Del Term+bash ‹@p1 › g.txt:1 › /MARK/ 2/3 › /tmp/pardes-snap/fsearch/cwd/g.txt Keep Del == snap cancel grid=180x31 cursor=97,22 -== snap nomatch grid=180x31 cursor=118,16 -|16: /tmp/pardes-snap/fsearch/cwd Del Term+bash ^ ‹@p1 › /MARK/ 2/3 › / zzqq = Look /zzqq/ 0 ⏎ land · M-⏎ as a list · C-r history · esc +== snap nomatch grid=180x31 cursor=98,17 +|16: /tmp/pardes-snap/fsearch/cwd Del Term+bash ^ ‹@p1 › g.txt:1 › /MARK/ 2/3 › /tmp/pardes-snap/fsearch/cwd/g.txt Keep Del +|17: ls / zzqq = Look /zzqq/ 0 ⏎ land · M-⏎ as a list · C-r history · esc diff --git a/test/snapshots/leader.golden b/test/snapshots/leader.golden index 02cacea2..fbd96933 100644 --- a/test/snapshots/leader.golden +++ b/test/snapshots/leader.golden @@ -1,5 +1,6 @@ == snap spc grid=100x41 cursor=hidden | New Term Find Grep Newcol Help Exit +| /tmp/pardes-snap/leader/cwd/cmds.txt Keep Del | ␣ ▸ b buffer… c column… f file… h help… j jump… l lsp… n new… s session… t view… ' Resume | │ / All ? Help d Del e Message p ClipPaste P ClipPasteBefore q Exit R ClipReplace | │ w Window y ClipYank Y ClipYankMain ↓ unroll · ? help @@ -38,20 +39,18 @@ | | | -| | /tmp/pardes-snap/leader/cwd/cmds.txt:1 -== snap spc-h grid=100x41 cursor=7,2 -|1: ␣ h ▸ b Build c Changelog k Keys m Messages t Tutor ↓ unroll · ? help -|2: 1 Help Help h Help t Help c Help l +== snap spc-h grid=100x41 cursor=hidden +|2: ␣ h ▸ b Build c Changelog k Keys m Messages t Tutor ↓ unroll · ? help |3: +|4: == snap abandoned grid=100x41 cursor=7,2 -|1: /tmp/pardes-snap/leader/cwd/cmds.txt Keep Del +|2: 1 Help Help h Help t Help c Help l == snap unmapped grid=100x41 cursor=hidden -|1: ␣ ▸ b buffer… c column… f file… h help… j jump… l lsp… n new… s session… t view… ' Resume -|2: │ / All ? Help d Del e Message p ClipPaste P ClipPasteBefore q Exit R ClipReplace -|3: │ w Window y ClipYank Y ClipYankMain x ↓ unroll · ? help +|2: ␣ ▸ b buffer… c column… f file… h help… j jump… l lsp… n new… s session… t view… ' Resume +|3: │ / All ? Help d Del e Message p ClipPaste P ClipPasteBefore q Exit R ClipReplace +|4: │ w Window y ClipYank Y ClipYankMain x ↓ unroll · ? help == snap help-group grid=100x41 cursor=7,5 -|1: /tmp/pardes-snap/leader/cwd/cmds.txt Keep Del |2: 1 Help Help h Help t Help c Help l |3: |4: /tmp/pardes-snap/leader/cwd/+Help Del diff --git a/test/snapshots/lsp.golden b/test/snapshots/lsp.golden index ba9eb781..5f0720a9 100644 --- a/test/snapshots/lsp.golden +++ b/test/snapshots/lsp.golden @@ -57,31 +57,32 @@ |12: 9 } |13: ~ |40: ✓ /tmp/pardes-snap/lsp/cwd/a.zig Hover 1 message · SPC h m -== snap symbols grid=120x41 cursor=24,1 -|1: ^ a.zig:8 › ␣ l Symbols 1/3 -|2: │ │ Walk Look Split Newcol Grep Edit Copy Keep Drop | Find Grep Recent Panes Symbols All Jumplist -|3: │ │ ▶ a.zig:3:4-9 f helper -|4: │ │ a.zig:7:8-11 f main -|5: │ │ a.zig:1:7-9 c std -|6: │ │ -|7: 1 const std = @import("std"); -|8: 2 -|9: 3▸fn helper(x: u32) u32 { -|10: fn helper(x: u32) u32 -|11: (fn (u32) u32) -|12: 4 return x + 1; -|13: 5 } -|14: 6 -|15: 7 pub fn main() void { -|16: 8 _ = helper(41); -|17: 9 } -|18: ~ +== snap symbols grid=120x41 cursor=14,2 +|1: ^ a.zig:8 › /tmp/pardes-snap/lsp/cwd/a.zig Keep Del +|2: ␣ l Symbols 1/3 +|3: │ │ Walk Look Split Newcol Grep Edit Copy Keep Drop | Find Grep Recent Panes Symbols All Jumplist +|4: │ │ ▶ a.zig:3:4-9 f helper +|5: │ │ a.zig:7:8-11 f main +|6: │ │ a.zig:1:7-9 c std +|7: │ │ +|8: 1 const std = @import("std"); +|9: 2 +|10: 3▸fn helper(x: u32) u32 { +|11: fn helper(x: u32) u32 +|12: (fn (u32) u32) +|13: 4 return x + 1; +|14: 5 } +|15: 6 +|16: 7 pub fn main() void { +|17: 8 _ = helper(41); +|18: 9 } +|19: ~ |40: ⏎ lands here · its text is the preview · S-⏎ a new pane 2 messages · SPC h m -== snap step grid=120x41 cursor=27,1 -|1: ^ a.zig:8 › ␣ l Symbols jn 0 -|3: │ │ nothing matches -|4: │ │ -|5: │ │ -|9: 3 fn helper(x: u32) u32 { -== snap nothing grid=120x41 cursor=29,1 -|1: ^ a.zig:8 › ␣ l Symbols jngd 0 +== snap step grid=120x41 cursor=17,2 +|2: ␣ l Symbols jn 0 +|4: │ │ nothing matches +|5: │ │ +|6: │ │ +|10: 3 fn helper(x: u32) u32 { +== snap nothing grid=120x41 cursor=19,2 +|2: ␣ l Symbols jngd 0 diff --git a/test/snapshots/msg.golden b/test/snapshots/msg.golden index 09249970..506f4603 100644 --- a/test/snapshots/msg.golden +++ b/test/snapshots/msg.golden @@ -48,13 +48,14 @@ |7: |8: |16: · reloaded /tmp/pardes-snap/msg/cwd/a.txt 5 messages · SPC h m -== snap prompt grid=70x17 cursor=7,1 -|1: ^ s EXT = Exec Edit x/EXT/ 0 -== snap prompt-wins grid=70x17 cursor=7,1 -|2: 1 AGAIN +== snap prompt grid=70x17 cursor=7,2 +|1: ^ /tmp/pardes-snap/msg/cwd/a.txt Keep Undo Del +|2: s EXT = Exec Edit x/EXT/ 0 +== snap prompt-wins grid=70x17 cursor=7,2 |16: · reloaded /tmp/pardes-snap/msg/cwd/a.txt ×2 5 messages · SPC h m == snap esc grid=70x17 cursor=7,3 |1: /tmp/pardes-snap/msg/cwd/a.txt Keep Undo Del +|2: 1 AGAIN == snap msgbuiltin grid=70x17 cursor=29,4 |1: */tmp/pardes-snap/msg/cwd/a.txt Save Undo Del |3: 2 diff --git a/test/snapshots/pipe.golden b/test/snapshots/pipe.golden index ff3092d8..e9fc165a 100644 --- a/test/snapshots/pipe.golden +++ b/test/snapshots/pipe.golden @@ -1,7 +1,7 @@ -== snap prompt grid=180x13 cursor=14,1 +== snap prompt grid=180x13 cursor=14,2 | New Term Find Grep Newcol Help Exit -|^ | tr a-z A-Z = Exec Edit |tr a-z A-Z 1 line → 1 · exit 0 ⏎ replace · C-r history · esc -| 1 alpha beta +|^ /tmp/pardes-snap/pipe/cwd/pipe.txt Keep Del +| | tr a-z A-Z = Exec Edit |tr a-z A-Z 1 line → 1 · exit 0 ⏎ replace · C-r history · esc | ALPHA BETA | 2 gamma delta | diff --git a/test/snapshots/selregex.golden b/test/snapshots/selregex.golden index 664c8cca..4b704ee9 100644 --- a/test/snapshots/selregex.golden +++ b/test/snapshots/selregex.golden @@ -1,7 +1,7 @@ -== snap prompt-armed grid=160x25 cursor=4,1 +== snap prompt-armed grid=160x25 cursor=4,2 | New Term Find Grep Newcol Help Exit -|^ s ⏎ select · M-⏎ as a list · C-r history · esc -| 1┃const one = 1; +|^ /tmp/pardes-snap/selregex/cwd/m.zig Keep Del +| s ⏎ select · M-⏎ as a list · C-r history · esc | 2┃const two = 2; | 3┃const three = 3; | ~ @@ -24,13 +24,13 @@ | | | /tmp/pardes-snap/selregex/cwd/m.zig:3 -== snap preview grid=160x25 cursor=9,1 -|1: ^ s const = Exec Edit x/const/ 3 selections in 3 lines ⏎ select · M-⏎ as a list · C-r history · esc +== snap preview grid=160x25 cursor=9,2 +|2: s const = Exec Edit x/const/ 3 selections in 3 lines ⏎ select · M-⏎ as a list · C-r history · esc |24: /tmp/pardes-snap/selregex/cwd/m.zig:1 == style preview grid=160x25 |0: 0-1 d,#1d2824, 2-159 #b2c3b8,#1d2824, -|1: 0-1 #000000,#add38a, 2-2 #bada9d,#2c2c0f,b 3-3 #bada9d,#2c2c0f, 4-10 #becfc4,#2c2c0f, 11-17 #79836f,#2c2c0f, 18-115 #becfc4,#2c2c0f, 116-159 #79836f,#2c2c0f, -|2: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-5 #616f64,#0d1410,b 6-6 #add38a,#0d1410,b 7-10 #f5f7ee,#3c614a, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410, +|1: 0-1 #000000,#add38a, 2-31 #becfc4,#2c2c0f, 32-37 #ecc8f2,#2c2c0f, 38-159 #becfc4,#2c2c0f, +|2: 0-1 d,#2c2c0f, 2-2 #bada9d,#2c2c0f,b 3-3 #bada9d,#2c2c0f, 4-10 #becfc4,#2c2c0f, 11-17 #79836f,#2c2c0f, 18-115 #becfc4,#2c2c0f, 116-159 #79836f,#2c2c0f, |3: 0-0 d,#608269, 1-4 d,#0d1410, 5-5 #59675c,#0d1410, 6-6 #add38a,#0d1410, 7-10 #e5eee5,#24382c, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410, |4: 0-0 d,#608269, 1-4 d,#0d1410, 5-5 #59675c,#0d1410, 6-6 #add38a,#0d1410, 7-10 #e5eee5,#24382c, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-20 #e5eee5,#0d1410, 21-21 #f8c082,#0d1410, 22-159 #e5eee5,#0d1410, |5: 0-0 d,#608269, 1-4 d,#0d1410, 5-159 #59675c,#0d1410, @@ -63,14 +63,14 @@ |2: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-11 #f5f7ee,#3c614a, 12-12 #f5f7ee,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410, |3: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #e5eee5,#24382c, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410, |4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #e5eee5,#24382c, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-20 #e5eee5,#0d1410, 21-21 #f8c082,#0d1410, 22-159 #e5eee5,#0d1410, -== snap narrowed grid=160x25 cursor=21,1 -|1: ^ Edit x/const/ › s t = Exec Edit x/t/ 3 selections in 3 lines ⏎ select · M-⏎ as a list · C-r history · esc -|2: 1┃const one = 1; +== snap narrowed grid=160x25 cursor=5,2 +|1: ^ Edit x/const/ › /tmp/pardes-snap/selregex/cwd/m.zig Keep Del +|2: s t = Exec Edit x/t/ 3 selections in 3 lines ⏎ select · M-⏎ as a list · C-r history · esc |3: 2┃const two = 2; |4: 3┃const three = 3; == style narrowed grid=160x25 -|1: 0-1 #000000,#add38a, 2-17 #becfc4,#2c2c0f, 18-18 #bada9d,#2c2c0f,b 19-19 #bada9d,#2c2c0f, 20-22 #becfc4,#2c2c0f, 23-29 #79836f,#2c2c0f, 30-115 #becfc4,#2c2c0f, 116-159 #79836f,#2c2c0f, -|2: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-5 #616f64,#0d1410,b 6-6 #add38a,#0d1410,b 7-10 #e5eee5,#0d1410, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410, +|1: 0-1 #000000,#add38a, 2-47 #becfc4,#2c2c0f, 48-53 #ecc8f2,#2c2c0f, 54-159 #becfc4,#2c2c0f, +|2: 0-1 d,#2c2c0f, 2-2 #bada9d,#2c2c0f,b 3-3 #bada9d,#2c2c0f, 4-6 #becfc4,#2c2c0f, 7-13 #79836f,#2c2c0f, 14-115 #becfc4,#2c2c0f, 116-159 #79836f,#2c2c0f, |3: 0-0 d,#608269, 1-4 d,#0d1410, 5-5 #59675c,#0d1410, 6-6 #add38a,#0d1410, 7-10 #e5eee5,#0d1410, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410, |4: 0-0 d,#608269, 1-4 d,#0d1410, 5-5 #59675c,#0d1410, 6-6 #add38a,#0d1410, 7-10 #e5eee5,#0d1410, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-20 #e5eee5,#0d1410, 21-21 #f8c082,#0d1410, 22-159 #e5eee5,#0d1410, == snap esc-restores grid=160x25 cursor=11,2 diff --git a/test/snapshots/ttyhelp.golden b/test/snapshots/ttyhelp.golden index ce70e204..4b6e10d0 100644 --- a/test/snapshots/ttyhelp.golden +++ b/test/snapshots/ttyhelp.golden @@ -42,9 +42,10 @@ |28: 5 In the tag of the pane its Enter lands in from this one: this pane if it reads, else its rea↩ |29: der. `SPC '`; again after its Esc, nothing typed between, the one before it; Ctrl-o and Ctrl |30: ✓ @p1 Help 1 message · SPC h m -== snap leaderworks grid=100x31 cursor=12,20 -|20: ^ Help tutor 1/1 -|21: ▶ SPC h t Tutor help │ t Tutor -|22: │ Open the tutor, a document to work through. -|23: │ keys SPC h t -|24: │ +== snap leaderworks grid=100x31 cursor=12,21 +|20: ^ /tmp/pardes-snap/ttyhelp/cwd/+Help Del +|21: Help tutor 1/1 +|22: ▶ SPC h t Tutor help │ t Tutor +|23: │ Open the tutor, a document to work through. +|24: │ keys SPC h t +|25: │ -- cgit v1.3 From 75534de566388fe8dcb17b8257d535c680ae4b7d Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 26 Nov 2026 11:54:48 -0300 Subject: Pick, Prompt, TagState, test/process: the act/source row goes, and every head row ends with its count and at most one dim hint, the one key to what the head and the band do not show; a list known at open is exactly its rows tall (UX DESIGN O4, binding; the user, on W5's field under the tag: "why so many builtins are shown below still? most of them don't make much sence in the picker context right? also why other pickers names are there? that's wayyyyy to crowded, we only want to keep the absolute necessary there"); THE WAY IT WAS: Pick.head put a second row under every picker's head, under the spines, `Walk Look Split Newcol Grep Edit Copy Keep Drop | Grep Recent Panes Symbols All Jumplist …` (the acts, then the other sources' words, cut with `…`), the head row's right block carried up to 43 cells of hints (`⏎ land · M-⏎ as a list · C-r history · esc`, `↑ roll up · ? field · esc`, `⏎ wear it · esc`, `⏎ or 1-9 apply it · esc`, `⏎ rename · esc`, `⏎ run · esc`), and Pick.bandRows held 4 rows at least (D6's 4 counted the act row), a Grep's and All's 11 from the first frame whatever they found; THE CHANGE: Pick.head is one row, the count and `M-l acts` (dim, dropped first when the row is narrow; none for Themes, code actions and Lists, which have no acts); the acts stay on their keys and in the act step (M-l, M-Enter), each source on its own leader key, M-h's spine switching with the query kept, and any word typed into a tag still runs (Pick.execWord: `Grep`, `Split`); every text prompt and `:` hints `C-r history` (Prompt's table loses its `hint` column: one const), a rolled or unrolled level and the registers `? help`, describe-key keeps its question `press a key or a sequence` (its `· esc` and a found key's `⏎ run · esc` go), rename none; Pick.bandRows: a list known at open (Panes, Recent, Jumplist, a list, Messages, Themes, code actions, Lists) exactly its rows (1 at least, 11 and the cap at most), one whose rows come later (Find, Grep, All, Symbols) 3 at least and growing as they come, never shrinking while it is up: `tall`, a picker's most rows since it unrolled (a new field, reset by unroll, raised in produceAll a step at a time: in the dump and the digest), so typing a Grep's query never moves the body; RUN (TEST FIRST): Pick "a picker's head is one row: the count and one dim hint at its right end, `M-l acts`; no row of acts and sources, the list's rows right under it; Themes hints nothing" (replaces the act-row test; fails on the change before at Pick.zig:3979, the head two rows) and Pick "a picker's band is its list's rows (UX DESIGN O4, D6): a list whose rows come later (Find) holds 3 at open, never moved by typing; a list known at open exactly its rows: SPC b b with two panes covers its head and 2 rows" (was "… 4 rows at least …"; fails on the change before, 4 rows for 3), pass now; the tests that read the old hints read the new ones (TagState's right block, at 14 columns now where `? help` no longer fits, its rolled-level and wrapping tests, Band's SPC Down, draw's dim-hint ink, Prompt's `/ ? s K |` heads, Command's `:`), Pick's 40 % test lets the Grep's lines come (the clock to the pause's end: 40 lines, the band from 3 to its cap), and views' short-column test runs at 40x14 (at 40x15 the band, a row shorter, now fits whole); a user saw the crowded row under every picker and the long hints on every head; the process cases that wait for a rolled level wait for its `? help` (tty_boot leader twice, tty_editing find; they waited for `↓ unroll`); GATES (Debug tui): core-test 1172/1346 (174 skipped; one program's 7 cached), shell-test 1387/1390 (3 skipped); process-test 7 of 149 failed (3 skipped): pipe, msg, selregex, fsearch, lsp on their goldens, leader and find on the old wait, the goldens re-recorded by the next change; the dump changes (Pick.tall, and the change before's TagState.waits): the dump fuzz and the soak with the next change; load 1.4 to 4.7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE --- core/Band.zig | 2 +- core/Command.zig | 2 +- core/Pick.zig | 138 +++++++++++++++++++++---------------------- core/Prompt.zig | 58 +++++++++--------- core/TagState.zig | 26 ++++---- core/draw.zig | 4 +- core/views.zig | 10 ++-- test/process/tty_boot.zig | 4 +- test/process/tty_editing.zig | 2 +- 9 files changed, 121 insertions(+), 125 deletions(-) (limited to 'test') diff --git a/core/Band.zig b/core/Band.zig index 5efe1a36..1a1a9b48 100644 --- a/core/Band.zig +++ b/core/Band.zig @@ -894,7 +894,7 @@ test "SPC Down unrolls the level into a band under the tag's text, drawn over th // The head, the layer's first row, names the level and says how to roll // it up. const head = (try TagState.head(p, frame.allocator(), pane)).?.text; - try std.testing.expect(std.mem.startsWith(u8, head, "␣ SPC ") and std.mem.endsWith(u8, head, " ↑ roll up · ? field · esc")); + try std.testing.expect(std.mem.startsWith(u8, head, "␣ SPC ") and std.mem.endsWith(u8, head, " ? help")); try std.testing.expect(std.mem.startsWith(u8, try layerRow(frame.allocator(), layer, 0), "␣ SPC ")); // Down moves the cursor; Up back to the first row, then rolls up. p.update(.{ .key = .{ .cp = Key.down } }); diff --git a/core/Command.zig b/core/Command.zig index 691f7dfa..afc3790d 100644 --- a/core/Command.zig +++ b/core/Command.zig @@ -759,7 +759,7 @@ test ": opens a field in the tag after its key cell: the tag's own words first, try std.testing.expectEqual(Prompt.Op.command, s.prompt.op); try std.testing.expectEqual(panes.Pane.Focus.body, pane.focus); // The head: its key cell, the field, the count, the hints. - try std.testing.expect(has(try headOf(p), ": 18 commands Tab complete · ⏎ run · C-r history · esc")); + try std.testing.expect(has(try headOf(p), "18 commands C-r history")); // The rows: the tag's words in its order, `in the tag`, the last ruled // off; then the commands, each what it takes. try std.testing.expect(has(try bandRow(p, a, 0), "▶ Save ")); diff --git a/core/Pick.zig b/core/Pick.zig index 7bceab39..2637bb1d 100644 --- a/core/Pick.zig +++ b/core/Pick.zig @@ -106,6 +106,10 @@ made: bool = false, cap: u16 = 0, /// Unrolled in a view's tag now. unrolled: bool = false, +/// The most rows its list has had since it unrolled, eleven at most: its +/// band grows with a list whose rows come later and never shrinks while it +/// is up (bandRows, UX D6). +tall: u8 = 0, names: Names = .{}, /// A Grep's lines, as the disk engine sends them (Query.take). found: std.ArrayList(Query.Found) = .empty, @@ -414,6 +418,7 @@ fn unroll(p: *Pardes, pk: *Pick, query: []const u8) void { s.field.set(query); s.rows = .{ .at = @intCast(@min(pk.at, std.math.maxInt(u16))) }; pk.unrolled = true; + pk.tall = 0; pk.shown = no_row; pk.previewed = false; // The whole window previews a theme. @@ -595,6 +600,7 @@ fn toBest(p: *Pardes, pk: *Pick) void { /// current row. pub fn produceAll(p: *Pardes, tick: bool) void { for (p.picks) |slot| if (slot) |pk| if (pk.unrolled) { + pk.tall = @intCast(@max(pk.tall, @min(have(p, pk), Band.Cursor.shown))); if (pk.names.busy()) { // A cursor on the best match follows it while the rest are // scored. @@ -608,6 +614,12 @@ pub fn produceAll(p: *Pardes, tick: bool) void { }; } +/// The rows a picker's source has: every name it scores (not what the +/// query keeps), a Grep's lines and All's places for this query. +fn have(p: *const Pardes, pk: *const Pick) usize { + return if (fuzzy(pk)) pk.names.cands.items.len else count(p, pk); +} + /// The frames a live picker still owes: scoring, a preview (nextWake's). pub fn busy(p: *const Pardes) bool { for (p.picks) |slot| if (slot) |pk| if (pk.unrolled) { @@ -813,10 +825,11 @@ fn rowAt(p: *Pardes, pk: *const Pick, arena: std.mem.Allocator, i: usize) std.me // ---- the tag ---- -/// The head under the landing pane's tag (SPEC §5.3, UX DESIGN M2): the +/// The head under the asking pane's tag (SPEC §5.3, UX DESIGN M2, O1): the /// key cells, the source's word, the query, the count `cursor/total` and -/// `•marked`; on a second row the acts and the other sources' words, under -/// spines from the key cells. +/// `•marked`, and one hint, `M-l acts`, the key to the acts (UX DESIGN O4: +/// no row of acts and sources; each source has its own key, M-h switches +/// keeping the query). pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !?TagState.Head { const pk = live(p) orelse return null; const s = &p.view().tag_state; @@ -839,65 +852,29 @@ pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !?TagState.Head { if (n == 0) try text.append(arena, '0') else try text.print(arena, "{d}/{d}", .{ s.rows.at + 1, n }); if (pk.marks.items.len > 0) try text.print(arena, " •{d}", .{pk.marks.items.len}); if (pk.names.busy() or p.stream.busyFor(pk.id)) try text.appendSlice(arena, " ⋯"); - // Themes, actions and Lists have no acts and no other sources: no - // second row. - if (pk.source == .themes or pk.source == .actions or pk.source == .lists) { - const hints = text.items.len; - try b.styled(switch (pk.source) { - .themes => "⏎ wear it · esc", - .lists => "⏎ reopen it · esc", - else => "⏎ or 1-9 apply it · esc", - }, .dim); - try b.right(counted, hints); - var h = b.done(); - h.caret = caret; - return h; - } - try b.right(counted, text.items.len); - // The second row, one row (UX D2): under the spines from the key - // cells, from two cells right of the last, the acts, `|`, the other - // sources' words, each switching to it, the `|` and the sources dim - // (UX D4); what does not fit is dropped from the right (the sources - // first) and the row ends in a dim `…` (M-l and M-h reach them all). - try b.row(if (b.ncols > 0) b.cols[b.ncols - 1] + 2 else 0); - var offer: [acts.len + 1 + std.enums.values(Source).len][]const u8 = undefined; - var nw: usize = 0; - for (acts) |act| if (offered(pk, act)) { - offer[nw] = act.word; - nw += 1; - }; - const nacts = nw; - offer[nw] = "|"; - nw += 1; - inline for (comptime std.enums.values(Source)) |src| if (src != .list and src != .messages and src != .themes and src != .actions and src != .lists and src != pk.source) { - offer[nw] = words.get(src).word; - nw += 1; - }; - for (offer[0..nw], 0..) |word, i| { - const gap: usize = @intFromBool(i > 0); - const rest: usize = if (i + 1 < nw) 2 else 0; - if (b.col() + gap + File.displayWidth(p.settings.tab, word) + rest > b.width) { - try b.put(if (gap > 0) " " else ""); - try b.styled("…", .dim); - break; - } - try b.put(if (gap > 0) " " else ""); - if (i >= nacts) try b.styled(word, .dim) else try b.put(word); - } + // Themes, code actions and Lists have no acts: no hint. + const hints = text.items.len; + if (pk.source != .themes and pk.source != .actions and pk.source != .lists) try b.styled("M-l acts", .dim); + try b.right(counted, hints); var h = b.done(); h.caret = caret; return h; } -/// The band's rows (UX D6): as many as the list will show, from what the -/// source has (not what the query keeps: typing never moves the body), -/// four at least, eleven at most, and its `cap` at most (the host pane's -/// 40 % at open: the layout asks this while it lays the column out, when -/// no pane has its rows yet). +/// The band's rows (UX D6, DESIGN O4): as many as the list will show, from +/// what the source has (not what the query keeps: typing never moves the +/// body) and the most it has had (`tall`): a list known at open exactly its +/// rows, one whose rows come later (Find, Grep, All, Symbols) three at +/// least, growing as they come; eleven at most, and its `cap` at most (the +/// asking pane's 40 % at open: the layout asks this while it lays the +/// column out, when no pane has its rows yet). pub fn bandRows(p: *const Pardes) u16 { const pk = live(p) orelse return 0; - const have = if (!fuzzy(pk)) Band.Cursor.shown else pk.names.cands.items.len; - const rows: usize = @max(1, @min(Band.Cursor.shown, @max(4, have), pk.cap)); + const later: usize = switch (pk.source) { + .find, .grep, .all, .symbols => 3, + else => 1, + }; + const rows: usize = @max(1, @min(Band.Cursor.shown, @max(later, pk.tall, have(p, pk)), pk.cap)); // Its second step's rows too: the sources, the acts and what they act on. return @intCast(switch (pk.spine) { .sources => @max(rows, spine_rows.len), @@ -2326,7 +2303,7 @@ test "a picker from a held pane hangs under that pane's tag, which keeps the key try std.testing.expectEqualStrings("pick", pk.query.slice()); } -test "a picker's act row is one row under the spines, two cells right of the last: what does not fit dropped from the right, the sources first, a dim `…` ending it" { +test "a picker's head is one row: the count and one dim hint at its right end, `M-l acts`; no row of acts and sources, the list's rows right under it; Themes hints nothing (UX DESIGN O4)" { const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 60, .rows = 40 }); defer p.deinit(); p.settings.jumps = .walk; @@ -2337,25 +2314,31 @@ test "a picker's act row is one row under the spines, two cells right of the las _ = try p.setTestFile("held\n"); const asker = p.view().active; Trail.keep(p.panes[asker].?); + p.gpa.free(p.panes[asker].?.file.?.path); + p.panes[asker].?.file.?.path = try std.Io.Dir.path.join(p.gpa, &.{ std.Io.Dir.path.dirname(a_path).?, "held.txt" }); p.stream.engine = .walk; open(p, asker, .find, "", "", ""); - const reader = asker; + settle(p); var frame = std.heap.ArenaAllocator.init(std.testing.allocator); defer frame.deinit(); const a = frame.allocator(); - const tag = try headOf(p, a, reader); - var rows = std.mem.splitScalar(u8, tag, '\n'); - try std.testing.expect(std.mem.startsWith(u8, rows.next().?, "␣ f Find ")); - const acts_row = rows.next().?; - try std.testing.expect(rows.next() == null); - try std.testing.expect(std.mem.startsWith(u8, acts_row, "│ │ Walk Look ")); - try std.testing.expect(std.mem.endsWith(u8, acts_row, " …")); - try std.testing.expect(File.displayWidth(p.settings.tab, acts_row) <= pardes.tagline.tagWidth(p, reader)); - const h = (try head(p, a, p.panes[reader].?)).?; + const tag = try headOf(p, a, asker); + try std.testing.expect(std.mem.indexOfScalar(u8, tag, '\n') == null); + try std.testing.expect(std.mem.startsWith(u8, tag, "␣ f Find ") and std.mem.endsWith(u8, tag, "1/1 M-l acts")); + try std.testing.expectEqual(@as(usize, pardes.tagline.tagWidth(p, asker)), File.displayWidth(p.settings.tab, tag)); + const h = (try head(p, a, p.panes[asker].?)).?; try std.testing.expect(h.spans[h.spans.len - 1].style == .dim); + // The band's first row the list's first. + const band = (try Band.of(p, a, p.panes[asker].?, asker)).?; + try std.testing.expect(std.mem.indexOf(u8, (try band.line(a, p.settings.tab, 0)).text, "▶ alpha.zig") != null); + p.update(.{ .key = .{ .cp = Key.escape } }); + open(p, asker, .themes, "", "", ""); + const themes = try headOf(p, a, asker); + try std.testing.expect(std.mem.indexOf(u8, themes, "esc") == null and std.mem.indexOf(u8, themes, "M-l") == null and std.mem.indexOf(u8, themes, "⏎") == null); + p.update(.{ .key = .{ .cp = Key.escape } }); } -test "a picker's band is sized from its list at open, 4 rows at least, and typing never moves it" { +test "a picker's band is its list's rows (UX DESIGN O4, D6): a list whose rows come later (Find) holds 3 at open, never moved by typing; a list known at open exactly its rows: SPC b b with two panes covers its head and 2 rows" { const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 40 }); defer p.deinit(); p.settings.jumps = .walk; @@ -2375,13 +2358,23 @@ test "a picker's band is sized from its list at open, 4 rows at least, and typin const reader = asker; p.sync(); const rows = Band.covered(p, p.panes[reader].?, reader).band; - // One or two files listed: four rows, ground under them. - try std.testing.expectEqual(@as(u16, 4), rows); + // One file listed: three rows, ground under it. + try std.testing.expectEqual(@as(u16, 3), rows); for ("zzq") |c| p.update(.{ .key = .{ .cp = c, .text = &[_]u8{c} } }); settle(p); p.sync(); try std.testing.expectEqual(@as(usize, 0), count(p, live(p).?)); try std.testing.expectEqual(rows, Band.covered(p, p.panes[reader].?, reader).band); + p.update(.{ .key = .{ .cp = Key.escape } }); + // Two panes: SPC b b's band two rows. + p.newScratchBelow(asker); + p.view().active = asker; + p.sync(); + for (" bb") |c| p.update(.{ .key = .{ .cp = c, .text = &[_]u8{c} } }); + p.sync(); + try std.testing.expectEqual(Source.panes, live(p).?.source); + const at = Band.covered(p, p.panes[asker].?, asker); + try std.testing.expect(at.head == 1 and at.band == 2); } test "a picker's band is capped once at open at 40 % of its asking pane's rows; the pane it previews in borrows from its column for a body of 60 %: a Grep from a held pane at 100x30 previews 8 rows at least, in a reader made under it (UX D6, DESIGN O1)" { @@ -2407,7 +2400,10 @@ test "a picker's band is capped once at open at 40 % of its asking pane's rows; const reader = p.paneBySerial(live(p).?.landing).?; try std.testing.expect(reader != asker); for ("pub fn") |c| p.update(.{ .key = .{ .cp = c, .text = &[_]u8{c} } }); + // Its lines after the typing's pause: the band from 3 rows to its cap. + if (p.stream.due_ns) |due| p.clock.now_ns = due; settle(p); + try std.testing.expectEqual(@as(usize, 40), count(p, live(p).?)); p.update(.{ .key = .{ .cp = Key.down } }); p.update(.tick); p.sync(); @@ -2447,7 +2443,7 @@ test "a picker's keys: Tab marks and moves, M-a all and none, C-SPC refines and var frame = std.heap.ArenaAllocator.init(std.testing.allocator); defer frame.deinit(); const refs = try headOf(p, frame.allocator(), id); - try std.testing.expect(std.mem.indexOf(u8, refs, " Refs ") != null and std.mem.indexOf(u8, refs, " 3/4 •1\n") != null); + try std.testing.expect(std.mem.indexOf(u8, refs, " Refs ") != null and std.mem.endsWith(u8, refs, " 3/4 •1 M-l acts")); p.update(.{ .key = .{ .cp = 'a', .alt = true } }); try std.testing.expectEqual(@as(usize, 4), pk.marks.items.len); p.update(.{ .key = .{ .cp = 'a', .alt = true } }); @@ -2466,7 +2462,7 @@ test "a picker's keys: Tab marks and moves, M-a all and none, C-SPC refines and try std.testing.expectEqual(@as(usize, 1), count(p, pk)); _ = frame.reset(.retain_capacity); const refined = try headOf(p, frame.allocator(), id); - try std.testing.expect(std.mem.indexOf(u8, refined, " Refs alpha | w ") != null and std.mem.indexOf(u8, refined, " 1/1\n") != null); + try std.testing.expect(std.mem.indexOf(u8, refined, " Refs alpha | w ") != null and std.mem.endsWith(u8, refined, " 1/1 M-l acts")); // Backspace twice: the `w` goes, then the refinement, its query back. p.update(.{ .key = .{ .cp = Key.backspace } }); p.update(.{ .key = .{ .cp = Key.backspace } }); diff --git a/core/Prompt.zig b/core/Prompt.zig index e9c231da..d5f9a374 100644 --- a/core/Prompt.zig +++ b/core/Prompt.zig @@ -124,24 +124,28 @@ pub const Ring = struct { const Info = struct { /// Its key cell. cell: []const u8, - hint: []const u8, }; const info = std.EnumArray(Op, Info).init(.{ - .search = .{ .cell = "/", .hint = "⏎ land · M-⏎ as a list · C-r history · esc" }, - .search_back = .{ .cell = "?", .hint = "⏎ land · M-⏎ as a list · C-r history · esc" }, - .select = .{ .cell = "s", .hint = "⏎ select · M-⏎ as a list · C-r history · esc" }, - .split = .{ .cell = "S", .hint = "⏎ select · M-⏎ as a list · C-r history · esc" }, - .keep = .{ .cell = "K", .hint = "⏎ keep · M-⏎ as a list · C-r history · esc" }, - .remove = .{ .cell = "A-K", .hint = "⏎ keep · M-⏎ as a list · C-r history · esc" }, - .pipe = .{ .cell = "|", .hint = "⏎ replace · C-r history · esc" }, - .pipe_to = .{ .cell = "A-|", .hint = "⏎ run · C-r history · esc" }, - .insert = .{ .cell = "!", .hint = "⏎ insert · C-r history · esc" }, - .append = .{ .cell = "A-!", .hint = "⏎ append · C-r history · esc" }, - .keep_pipe = .{ .cell = "$", .hint = "⏎ keep · C-r history · esc" }, - .command = .{ .cell = ":", .hint = "Tab complete · ⏎ run · C-r history · esc" }, + .search = .{ .cell = "/" }, + .search_back = .{ .cell = "?" }, + .select = .{ .cell = "s" }, + .split = .{ .cell = "S" }, + .keep = .{ .cell = "K" }, + .remove = .{ .cell = "A-K" }, + .pipe = .{ .cell = "|" }, + .pipe_to = .{ .cell = "A-|" }, + .insert = .{ .cell = "!" }, + .append = .{ .cell = "A-!" }, + .keep_pipe = .{ .cell = "$" }, + .command = .{ .cell = ":" }, }); +/// Every prompt's one hint (UX DESIGN O4): the key to what its head and +/// band do not show. Enter's verb is the head's own `= Look /dirty/`; +/// M-Enter and Tab are in Help; Esc is never hinted. +const hint = "C-r history"; + /// The history `op` reads and Enter adds to. fn ring(p: *Pardes, op: Op) *Ring { return switch (op) { @@ -1097,7 +1101,7 @@ fn strike(p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, line: i32, lo_: } /// The head of the prompt's tag: `s self▌ = Exec Edit x/self/ 4 -/// selections in 6 lines ⏎ select · M-⏎ as a list · C-r history · esc`. +/// selections in 6 lines C-r history`. pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !TagState.Head { const s = &p.view().tag_state; const pr = &s.prompt; @@ -1139,7 +1143,6 @@ pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !TagState.Head { } if (pr.op == .command) try Command.count(p, arena, text); const hints = text.items.len; - const hint = info.get(pr.op).hint; if (tail) |t| { // Both beside the count, or neither: as much room as the right // block asks for its two gaps (Builder.right drops the hints alone). @@ -1402,9 +1405,10 @@ test "s asks in the tag's head: its key cell, the field, the plain word and the try std.testing.expectEqual(TagState.Kind.prompt, p.view().tag_state.kind); // No chip on the notice band: the prompt is the tag's. try std.testing.expectEqual(Pane.Prompt.none, pane.prompt); - try std.testing.expect(has(try headOf(p), "s ⏎ select · M-⏎ as a list · C-r history · esc")); + // Its one hint at the row's end (UX DESIGN O4). + try std.testing.expect(std.mem.startsWith(u8, try headOf(p), "s ") and std.mem.endsWith(u8, try headOf(p), " C-r history")); typeKeys(p, "self"); - try std.testing.expect(has(try headOf(p), "s self = Exec Edit x/self/ 2 selections in 3 lines ⏎ select")); + try std.testing.expect(has(try headOf(p), "s self = Exec Edit x/self/ ") and has(try headOf(p), "2 selections in 3 lines C-r history")); try std.testing.expectEqual(@as(u16, 1), pane.body.nsel); try std.testing.expect(selecting(p, pane).?.dim == false); // No match: 0, and the selection it began with. @@ -1447,7 +1451,7 @@ test "Enter keeps what s found, the pattern in / and in the history Up brings ba try std.testing.expect(has(try headOf(p), "K self.. = Exec Edit g/self../ keeps 2 of 2")); p.update(.{ .key = .{ .cp = Key.down } }); typeKeys(p, "b"); - try std.testing.expect(has(try headOf(p), "K b = Exec Edit g/b/ keeps 1 of 2 ⏎ keep")); + try std.testing.expect(has(try headOf(p), "K b = Exec Edit g/b/ ") and has(try headOf(p), "keeps 1 of 2 C-r history")); // Ctrl-r: the history under the tag, a row a line. p.update(.{ .key = .{ .cp = 'r', .ctrl = true } }); try std.testing.expectEqual(@as(u16, 1), Band.takes(p, p.view().active)); @@ -1459,7 +1463,7 @@ test "Enter keeps what s found, the pattern in / and in the history Up brings ba typeKeys(p, "|"); try std.testing.expectEqual(Pane.Prompt.none, pane.prompt); p.update(.{ .key = .{ .cp = 't', .text = "tr a-z A-Z" } }); - try std.testing.expect(has(try headOf(p), "| tr a-z A-Z = Exec Edit |tr a-z A-Z ⋯ ⏎ replace")); + try std.testing.expect(has(try headOf(p), "| tr a-z A-Z = Exec Edit |tr a-z A-Z ") and has(try headOf(p), "⋯ C-r history")); p.update(.{ .key = .{ .cp = Key.enter } }); try std.testing.expectEqualStrings("tr a-z A-Z", p.registers.value('|', 0).?); var asked: ?u32 = null; @@ -1496,7 +1500,7 @@ test "/ searches the body as it is typed: the current place selected, `▸` in t pane.body.cur_row = 2; pane.body.cur_col = 6; typeKeys(p, "/dirty"); - try std.testing.expect(has(try headOf(p), "/ dirty = Look /dirty/ 3/7 · 5 lines ⏎ land · M-⏎ as a list")); + try std.testing.expect(has(try headOf(p), "/ dirty = Look /dirty/ ") and has(try headOf(p), "3/7 · 5 lines C-r history")); try std.testing.expectEqual(@as(?usize, 2), pane.places.current); // (Its first row under the head's, UX DESIGN M2.) try std.testing.expectEqualStrings(" ", try gutterAt(p, frame.allocator(), 1)); @@ -1554,9 +1558,9 @@ test "? searches back from the caret; no match is 0; a pattern that is no regex pane.body.cur_col = 6; const was = pane.body.primaryRange(pane.file.?.content, 0); typeKeys(p, "?dirty"); - try std.testing.expect(has(try headOf(p), "? dirty = Look ?dirty? 2/7 · 5 lines ⏎ land")); + try std.testing.expect(has(try headOf(p), "? dirty = Look ?dirty? ") and has(try headOf(p), "2/7 · 5 lines C-r history")); typeKeys(p, "x"); - try std.testing.expect(has(try headOf(p), "= Look ?dirtyx? 0 ⏎ land")); + try std.testing.expect(has(try headOf(p), "= Look ?dirtyx? ") and has(try headOf(p), "0 C-r history")); try std.testing.expectEqualDeep(was, pane.body.primaryRange(pane.file.?.content, 0)); p.update(.{ .key = .{ .cp = Key.backspace } }); typeKeys(p, "("); @@ -1643,13 +1647,13 @@ test "a pipe prompt runs a known filter live, a run a selection: the outputs gho p.update(.{ .key = .{ .cp = Key.enter } }); typeKeys(p, "|"); p.update(.{ .key = .{ .cp = 't', .text = "tr a-z A-Z" } }); - try std.testing.expect(has(try headOf(p), "| tr a-z A-Z = Exec Edit |tr a-z A-Z ⋯ ⏎ replace")); + try std.testing.expect(has(try headOf(p), "| tr a-z A-Z = Exec Edit |tr a-z A-Z ") and has(try headOf(p), "⋯ C-r history")); const first = lastPipe(p) orelse return error.MissingLiveRun; const asked = p.pipe.pipeRequest(first).?; try std.testing.expectEqual(@as(usize, 2), asked.inputs.len); try std.testing.expect(has(asked.command, "tr a-z A-Z") and has(asked.command, "\\036")); p.update(.{ .pipe_resp = .{ .id = first, .success = true, .outputs = &.{ "B\x1e\x1e0", "A\x1e\x1e0" } } }); - try std.testing.expect(has(try headOf(p), " 2 lines → 2 · exit 0 ⏎ replace")); + try std.testing.expect(has(try headOf(p), "2 lines → 2 · exit 0 C-r history")); // The body: each output a ghost line under the line it replaces, the // rows below pushed down; the text as it was; its first row under the // head's (UX DESIGN M2). @@ -1791,7 +1795,7 @@ test "a search's count keeps ` · N lines` after it in the dim ink, and drops it const h = try head(p, p.scratch.allocator(), pane); const lines = std.mem.indexOf(u8, h.text, " \u{b7} 5 lines"); if (cols == 200) { - try std.testing.expect(has(h.text, "3/7 \u{b7} 5 lines \u{23ce} land")); + try std.testing.expect(has(h.text, "3/7 \u{b7} 5 lines C-r history")); const dim = for (h.spans) |span| { if (span.lo == lines.? and span.style == .dim) break span; } else return error.TestUnexpectedResult; @@ -1799,7 +1803,7 @@ test "a search's count keeps ` · N lines` after it in the dim ink, and drops it } else { // No room for the hints: the count alone, at the row's end. try std.testing.expect(lines == null); - try std.testing.expect(std.mem.indexOf(u8, h.text, "\u{23ce} land") == null); + try std.testing.expect(std.mem.indexOf(u8, h.text, "C-r history") == null); try std.testing.expect(std.mem.endsWith(u8, h.text, "3/7")); } } @@ -1810,7 +1814,7 @@ test "a search's count keeps ` · N lines` after it in the dim ink, and drops it pane.body.cur_row = 7; pane.body.cur_col = 6; typeKeys(p, "/dirty"); - try std.testing.expect(has(try headOf(p), "1/7 \u{21bb} \u{b7} 5 lines \u{23ce} land")); + try std.testing.expect(has(try headOf(p), "1/7 \u{21bb} \u{b7} 5 lines C-r history")); } test "C-r's history has the band's cursor like any list (UX D5): `▶` on its newest line, Down and C-n, Up and C-p move it, Enter takes the line under it" { diff --git a/core/TagState.zig b/core/TagState.zig index 622cb949..9be689c0 100644 --- a/core/TagState.zig +++ b/core/TagState.zig @@ -730,14 +730,12 @@ pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !?Head { try b.put(" "); try b.put(c.label); }; - const hints = b.text.items.len; - try b.styled("⏎ run · esc", .dim); - try b.right(hints, hints); } else try b.put("…"); } else { + // The state's question, not a hint (UX DESIGN O4). try b.put("…"); const hints = b.text.items.len; - try b.styled("press a key or a sequence · esc", .dim); + try b.styled("press a key or a sequence", .dim); try b.right(hints, hints); } return b.done(); @@ -745,7 +743,7 @@ pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !?Head { .pick => return @import("Pick.zig").head(p, arena, pane), .prompt => return try Prompt.head(p, arena, pane), // `Rename`, the name under the caret struck, the new one typed: - // `Rename best → top▌ ⏎ rename · esc` (SPEC §3.5). + // `Rename best → top▌` (SPEC §3.5), no hint (UX DESIGN O4). .rename => { try b.put("Rename "); try b.styled(Ask.renamedWord(pane) orelse "", .strike); @@ -753,9 +751,6 @@ pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !?Head { var h = b.done(); h.caret = @intCast(b.text.items.len + s.field.caret); try b.put(s.field.text()); - const hints = b.text.items.len; - try b.styled("⏎ rename · esc", .dim); - try b.right(hints, hints); h.text = b.text.items; h.spans = b.spans.items; return h; @@ -764,10 +759,12 @@ pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !?Head { const cur = current(p, v) orelse return null; try b.keyCells(cur.root, cur.path); const node = bindings.nodeAt(cur.root, cur.path) orelse return b.done(); + // One hint, a level's and the registers' (UX DESIGN O4): `? help`. + const hint = "? help"; if (s.unrolled) { try b.put(if (cur.path.len == 0) bindings.info.get(cur.root).label else node.label); const hints = b.text.items.len; - try b.styled("↑ roll up · ? field · esc", .dim); + try b.styled(hint, .dim); try b.right(hints, hints); return b.done(); } @@ -801,7 +798,6 @@ pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !?Head { // level that wraps gives them its spare row, its last child going to // it to leave them room; a level of one row or of all its rows keeps // its rows, and they drop where they do not fit. - const hint = "↓ unroll · ? help"; const hinted = 2 + panes.File.displayWidth(tab, hint); var rows: usize = 1; for (level, 0..) |c, i| { @@ -966,14 +962,14 @@ test "the right block: the count `cursor/matches` at the row's right end, fixed p.update(.{ .key = .{ .cp = Key.down } }); row = firstRow(try testTag(p, a)); try std.testing.expect(std.mem.startsWith(u8, row, "␣ SPC ")); - try std.testing.expect(std.mem.endsWith(u8, row, " ↑ roll up · ? field · esc")); + try std.testing.expect(std.mem.endsWith(u8, row, " ? help")); try std.testing.expectEqual(width, panes.File.displayWidth(tab, row)); const h = (try head(p, a, p.panes[p.view().active].?)).?; const last = h.spans[h.spans.len - 1]; try std.testing.expect(last.style == .dim and last.hi == h.text.len); p.update(.{ .key = .{ .cp = Key.escape } }); // Where the row has no room for them, the hints go whole. - const narrow = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 24, .rows = 30 }); + const narrow = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 14, .rows = 30 }); defer narrow.deinit(); _ = try narrow.setTestFile("one\n"); narrow.update(.{ .key = .{ .cp = ' ' } }); @@ -1024,7 +1020,7 @@ test "a rolled level breaks between its children only: the rows after the first whole += 1; } try std.testing.expect(whole > 0 and whole < level.len); - try std.testing.expect(std.mem.endsWith(u8, rows[n - 1], try std.fmt.allocPrint(a, "+{d} ↓", .{level.len - whole}))); + try std.testing.expect(std.mem.indexOf(u8, rows[n - 1], try std.fmt.allocPrint(a, "+{d} ↓", .{level.len - whole})) != null); // A level that fits takes one row; its hints at its end where the row // has room for them, else none. p.update(.{ .key = .{ .cp = 'h' } }); @@ -1494,7 +1490,7 @@ test "a rolled level that wraps has its hints on its last row at every width tha p.clock.now_ns = p.view().tag_state.due_ns; try std.testing.expect(hostOf(p) != null); const tag = try testTag(p, a); - if (std.mem.count(u8, tag, "\n") == 1) try std.testing.expect(std.mem.endsWith(u8, tag, " ↓ unroll · ? help")); + if (std.mem.count(u8, tag, "\n") == 1) try std.testing.expect(std.mem.endsWith(u8, tag, " ? help")); p.update(.{ .key = .{ .cp = pardes.Key.escape } }); try std.testing.expect(hostOf(p) == null); }; @@ -1748,7 +1744,7 @@ test "out of rest a tag is drawn as at rest, the head hanging under it (UX DESIG const head_y: u16 = @intCast(now_y + tag_rows); const row = try gridRow(a, s, r.x + pardes.TAG_TEXT_INSET, head_y, r.w - pardes.TAG_TEXT_INSET); try std.testing.expect(std.mem.startsWith(u8, row, "␣ l Refs ")); - try std.testing.expect(std.mem.endsWith(u8, row, " 1/1")); + try std.testing.expect(std.mem.endsWith(u8, row, " 1/1 M-l acts")); // The band's first row under the head's: the list's row, its cursor's. const band_y: u16 = head_y + Band.covered(p, pane, id).head; try std.testing.expect(std.mem.indexOf(u8, try gridRow(a, s, r.x + pardes.TAG_TEXT_INSET, band_y, r.w - pardes.TAG_TEXT_INSET), "▶ near.txt:3") != null); diff --git a/core/draw.zig b/core/draw.zig index a94c8e60..de47f469 100644 --- a/core/draw.zig +++ b/core/draw.zig @@ -1908,7 +1908,7 @@ test "a tag out of rest draws its keys bold in the key ink and its hint in the d const a = frame.allocator(); const roles = &p.chromeTheme().roles; const inks = roles.on(if (pardes.Trail.reading(p, pane)) .reading_focused else .focused); - // SPC's level rolled, after its delay: `␣ ▸ … l lsp… … ↓ unroll · ? help`. + // SPC's level rolled, after its delay: `␣ ▸ … l lsp… … ? help`. p.clock.now_ns = 5 * std.time.ns_per_s; p.clock.stepped_ns = p.clock.now_ns; p.update(.{ .key = .{ .cp = ' ' } }); @@ -1930,7 +1930,7 @@ test "a tag out of rest draws its keys bold in the key ink and its hint in the d return null; } }; - const hint = Row.find(row, "unroll").?; + const hint = Row.find(row, "? help").?; try std.testing.expectEqual(Color{ .rgb = inks.dim }, row[hint].style.fg); for (row) |cell| try std.testing.expect(!cell.style.dim); var keys: usize = 0; diff --git a/core/views.zig b/core/views.zig index 79fff084..75e2e5d9 100644 --- a/core/views.zig +++ b/core/views.zig @@ -615,7 +615,7 @@ test "a view not live with its band open, dumped and loaded, draws before its ne test "a picker's band in a short column, dumped and loaded: its rows are the never-loaded session's, and so is the next layout" { const gpa = std.testing.allocator; const dump = @import("dump.zig"); - const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 40, .rows = 15 }); + const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 40, .rows = 14 }); defer p.deinit(); p.settings.jumps = .walk; var tmp = std.testing.tmpDir(.{}); @@ -631,17 +631,17 @@ test "a picker's band in a short column, dumped and loaded: its rows are the nev const low = p.view().active; p.view().active = host; p.sync(); - // Find in the pane itself (it reads): its head and its act row over - // the band, which the short column holds under what it wants. + // Find in the pane itself (it reads): its head over the band, which + // the short column holds under what it wants. p.stream.engine = .walk; pardes.Pick.open(p, host, .find, "", "", ""); p.sync(); const at = pardes.Band.covered(p, pane, host); try testing.expect(at.band > 0 and at.band < pardes.Band.takes(p, host)); - try testing.expect(at.head >= 2); + try testing.expect(at.head == 1); const bytes = try dump.byteDump(p); defer gpa.free(bytes); - const q = try dump.load(gpa, .{ .tty_only = true, .cols = 40, .rows = 15 }, bytes, null); + const q = try dump.load(gpa, .{ .tty_only = true, .cols = 40, .rows = 14 }, bytes, null); defer q.deinit(); try testing.expectEqual(pane.view.covered, q.panes[host].?.view.covered); try testing.expectEqual(pane.tag_rows, q.panes[host].?.tag_rows); diff --git a/test/process/tty_boot.zig b/test/process/tty_boot.zig index 09311e8f..e3c09fb6 100644 --- a/test/process/tty_boot.zig +++ b/test/process/tty_boot.zig @@ -539,7 +539,7 @@ fn leader(gpa: std.mem.Allocator, exe: [:0]const u8) !void { // SPC's level, rolled in the tag once its delay is up (a frame on the // clock, which a quiet screen does not wait for) try t.key("space"); - try t.wait(5000, "↓ unroll"); + try t.wait(5000, "? help"); try t.stable(400, 5000); try t.snap("spc"); try t.key("h"); @@ -550,7 +550,7 @@ fn leader(gpa: std.mem.Allocator, exe: [:0]const u8) !void { try t.stable(400, 5000); try t.snap("abandoned"); try t.key("space x"); - try t.wait(5000, "↓ unroll"); + try t.wait(5000, "? help"); try t.stable(400, 5000); try t.snap("unmapped"); // A key the level has no child for is struck and the level stays diff --git a/test/process/tty_editing.zig b/test/process/tty_editing.zig index 862897e7..093832ce 100644 --- a/test/process/tty_editing.zig +++ b/test/process/tty_editing.zig @@ -616,7 +616,7 @@ fn find(gpa: std.mem.Allocator, exe: [:0]const u8) !void { // screen does not wait for) try t.key("space"); try t.key("f"); - try t.wait(5000, "↓ unroll"); + try t.wait(5000, "? help"); try t.stable(400, 5000); try t.snap("group"); // the second f opens the query pane: every file listed, line 1 `Find ` -- cgit v1.3 From d7b01dfc187244b6613a954d82552675d3bd2689 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 26 Nov 2026 12:18:08 -0300 Subject: test/snapshots: the seven goldens with a frame out of rest re-recorded under UX DESIGN O (the three changes before: a picker hangs under the tag of the pane you are in, the mouse never ends it, the act/source row gone and one hint at most), read label by label against their recording on W5 (5bfea157e191) with .scratch/walkui/W5/gdiff.py; every moved row is one of five classes, none other: (1) A PROMPT'S ONE HINT (pipe's prompt; msg's prompt and prompt-wins; selregex's prompt-armed, preview, narrowed; fsearch's slash and typing): the head's right block ends `C-r history` (it ended `⏎ replace · C-r history · esc`, `⏎ select · M-⏎ as a list · C-r history · esc`, `⏎ land · …`), so the count stands further right (`1 line → 1 · exit 0`, `3 selections in 3 lines`, `1/3 · 3 lines`), and msg's narrow `s EXT … 0`, which had no room for the long hint, now shows `0 C-r history`; the styles that moved are those cells (selregex 33 each, fsearch typing 31); (2) A LEVEL'S ONE HINT (leader's spc, spc-h, unmapped): `? help` at the last row's end where `↓ unroll · ? help` was; (3) THE ACT/SOURCE ROW GONE (find's armed, typing, next, nomatch, topbar; lsp's symbols, step, nothing): the head `␣ f Find … 1/5 M-l acts`, `␣ l Symbols … 1/3 M-l acts`, then the list's rows from the row under it, a row higher than under `Walk Look Split … | Grep Recent …`, the body's first line under the band a row higher; lsp's Symbols list, three rows known at open, is three rows tall (it held 4 and the act row), so `1 const std = …` shows on row 6; find's group (a rolled level) moved by class 2's hint; (4) A PICKER'S BORROWED ROWS (fsearch's list, ctrln): the reading pane the list previews in hosts its head and a band of its 3 rows (was the head, the act row and 4 rows), so its floor goes from 18 rows to 13 (tag 1 + head 1 + band 3 = 5, then a body of 8) and the pane above gives back five rows: the reading pane's tag is on row 16 (was 12), its body's lines 4 rows lower; (5) THE LANDING THERE (fsearch's landed, at rest): the place landed at a third of the preview's body, which is that much shorter, so the view is a line more scrolled than W5's (`cursor 97,22 -> 97,21`); no golden at rest moved but fsearch's landed (the 142 others, and every other rest frame of these seven, the same byte for byte); the dump format changed in the two changes before (TagState.waits, Pick.tall); GATES: process-test 0 of 149 failed (3 skipped; the seven failed on the change before, each its golden or its wait); load 0.7 to 3.9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE --- test/snapshots/find.golden | 53 +++++++++++++-------------- test/snapshots/fsearch.golden | 81 +++++++++++++++++++++--------------------- test/snapshots/leader.golden | 6 ++-- test/snapshots/lsp.golden | 44 +++++++++++------------ test/snapshots/msg.golden | 2 +- test/snapshots/pipe.golden | 2 +- test/snapshots/selregex.golden | 10 +++--- 7 files changed, 96 insertions(+), 102 deletions(-) (limited to 'test') diff --git a/test/snapshots/find.golden b/test/snapshots/find.golden index 97b9e00a..aad12aca 100644 --- a/test/snapshots/find.golden +++ b/test/snapshots/find.golden @@ -1,7 +1,7 @@ == snap group grid=120x41 cursor=hidden | New Term Find Grep Newcol Help Exit | /tmp/pardes-snap/find/cwd/here.txt Keep Del -| ␣ f ▸ c Config f Find g Grep h History l Lists n New r Recent s Save ↓ unroll · ? help +| ␣ f ▸ c Config f Find g Grep h History l Lists n New r Recent s Save ? help | | | @@ -42,28 +42,27 @@ | /tmp/pardes-snap/find/cwd/here.txt:1 == snap armed grid=120x41 cursor=11,2 |1: ^ /tmp/pardes-snap/find/cwd/here.txt Keep Del -|2: ␣ f Find 1/5 -|3: │ │ Walk Look Split Newcol Grep Edit Copy Keep Drop | Grep Recent Panes Symbols All Jumplist -|4: │ │ ▶ here.txt -|5: │ │ other.txt -|6: │ │ sub/ZQMARK-beta.txt -|7: │ │ sub/nest/zqmark-gamma.txt -|8: │ │ zqmark-alpha.txt -|9: 1▸Find zqm -|40: ⏎ lands here · its text is the preview · S-⏎ a new pane 1 message · SPC h m -== snap typing grid=120x41 cursor=14,2 -|2: ␣ f Find zqm 1/3 -|4: │ │ ▶ zqmark-alpha.txt +|2: ␣ f Find 1/5 M-l acts +|3: │ │ ▶ here.txt +|4: │ │ other.txt |5: │ │ sub/ZQMARK-beta.txt |6: │ │ sub/nest/zqmark-gamma.txt +|7: │ │ zqmark-alpha.txt +|8: 1▸Find zqm +|40: ⏎ lands here · its text is the preview · S-⏎ a new pane 1 message · SPC h m +== snap typing grid=120x41 cursor=14,2 +|2: ␣ f Find zqm 1/3 M-l acts +|3: │ │ ▶ zqmark-alpha.txt +|4: │ │ sub/ZQMARK-beta.txt +|5: │ │ sub/nest/zqmark-gamma.txt +|6: │ │ |7: │ │ -|8: │ │ -|9: 1▸alpha body +|8: 1▸alpha body == snap next grid=120x41 cursor=14,2 -|2: ␣ f Find zqm 2/3 -|4: │ │ zqmark-alpha.txt -|5: │ │ ▶ sub/ZQMARK-beta.txt -|9: 1▸beta body +|2: ␣ f Find zqm 2/3 M-l acts +|3: │ │ zqmark-alpha.txt +|4: │ │ ▶ sub/ZQMARK-beta.txt +|8: 1▸beta body == snap promoted grid=120x41 cursor=7,2 |1: here.txt:1 › Find zqm 2/3 › /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Keep Del |2: 1 beta body @@ -73,17 +72,15 @@ |6: |7: |8: -|9: |40: ✓ C-o back to Find zqm 2/3 1 message · SPC h m == snap nomatch grid=120x41 cursor=15,2 |1: ^ here.txt:1 › Find zqm 2/3 › /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Keep Del -|2: ␣ f Find zzqq 0 -|3: │ │ Walk Look Split Newcol Grep Edit Copy Keep Drop | Grep Recent Panes Symbols All Jumplist -|4: │ │ nothing matches +|2: ␣ f Find zzqq 0 M-l acts +|3: │ │ nothing matches +|4: │ │ |5: │ │ |6: │ │ |7: │ │ -|8: │ │ |40: ⏎ lands here · its text is the preview · S-⏎ a new pane 1 message · SPC h m == snap cancel grid=120x41 cursor=7,2 |1: here.txt:1 › Find zqm 2/3 › /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Keep Del @@ -93,15 +90,13 @@ |5: |6: |7: -|8: |40: ✓ /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Find 1 message · SPC h m == snap topbar grid=120x41 cursor=14,2 |1: ^ here.txt:1 › Find zqm 2/3 › /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Keep Del -|2: ␣ f Find bod 0 -|3: │ │ Walk Look Split Newcol Grep Edit Copy Keep Drop | Grep Recent Panes Symbols All Jumplist -|4: │ │ nothing matches +|2: ␣ f Find bod 0 M-l acts +|3: │ │ nothing matches +|4: │ │ |5: │ │ |6: │ │ |7: │ │ -|8: │ │ |40: ⏎ lands here · its text is the preview · S-⏎ a new pane 1 message · SPC h m diff --git a/test/snapshots/fsearch.golden b/test/snapshots/fsearch.golden index a2367418..002f72ec 100644 --- a/test/snapshots/fsearch.golden +++ b/test/snapshots/fsearch.golden @@ -32,9 +32,9 @@ | · @p1 a copy of the terminal's text: Tab or B2 runs it; what the program draws next replaces it (Ctrl-b types to the program) 1 message · SPC h m == snap slash grid=180x31 cursor=94,17 |16: /tmp/pardes-snap/fsearch/cwd Del Term+bash ^ ‹@p1 › /tmp/pardes-snap/fsearch/cwd/g.txt Keep Del -|17: ls / ⏎ land · M-⏎ as a list · C-r history · esc +|17: ls / C-r history == snap typing grid=180x31 cursor=98,17 -|17: ls / MARK = Look /MARK/ 1/3 · 3 lines ⏎ land · M-⏎ as a list · C-r history · esc +|17: ls / MARK = Look /MARK/ 1/3 · 3 lines C-r history |18: g.txt 2▸MARK a == style typing grid=180x31 |0: 0-151 d,#1d2824, 152-179 #b2c3b8,#1d2824, @@ -54,7 +54,7 @@ |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,#465a43, 2-34 #b2c3b8,#1d2824, 35-89 #d3b0d9,#1d2824, 90-91 #000000,#add38a, 92-127 #becfc4,#2c2c0f, 128-133 #ecc8f2,#2c2c0f, 134-179 #becfc4,#2c2c0f, -|17: 0-0 d,#608269, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-91 #e5eee5,#2c2c0f, 92-92 #bada9d,#2c2c0f,b 93-93 #bada9d,#2c2c0f, 94-99 #becfc4,#2c2c0f, 100-106 #79836f,#2c2c0f, 107-126 #becfc4,#2c2c0f, 127-179 #79836f,#2c2c0f, +|17: 0-0 d,#608269, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-91 #e5eee5,#2c2c0f, 92-92 #bada9d,#2c2c0f,b 93-93 #bada9d,#2c2c0f, 94-99 #becfc4,#2c2c0f, 100-106 #79836f,#2c2c0f, 107-157 #becfc4,#2c2c0f, 158-179 #79836f,#2c2c0f, |18: 0-0 d,#608269, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 #e5eee5,#e5eee5, 91-91 #e5eee5,#0d1410, 92-94 #e5eee5,#0d1410,b 95-95 #616f64,#0d1410,b 96-96 #add38a,#0d1410,b 97-100 #0d1410,#917a53, 101-101 #0d1410,#0d1410, 102-179 #e5eee5,#0d1410, |19: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-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, @@ -68,47 +68,52 @@ |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-179 d,#0d1410, |30: 0-1 d,#1d2824, 2-179 #6f7d75,#1d2824, -== snap list grid=180x31 cursor=103,13 -|12: ^ ‹@p1 › /tmp/pardes-snap/fsearch/cwd/g.txt Keep Del -|13: ␣ l /MARK/ 1/3 -|14: │ │ Walk Look Split Newcol Grep Edit Copy Keep Drop | Find Grep Recent Panes Symbols … -|15: │ │ ▶ /tmp/pardes-snap/fsearch/cwd/g.txt:2:1: MARK a -|16: /tmp/pardes-snap/fsearch/cwd Del Term+bash │ │ /tmp/pardes-snap/fsearch/cwd/g.txt:6:1: MARK b -|17: ls │ │ /tmp/pardes-snap/fsearch/cwd/g.txt:10:1: MARK c -|18: g.txt │ │ -|19: 1 l1 -|20: 2▸MARK a +== snap list grid=180x31 cursor=103,17 +|17: ls ␣ l /MARK/ 1/3 M-l acts +|18: g.txt │ │ ▶ /tmp/pardes-snap/fsearch/cwd/g.txt:2:1: MARK a +|19: │ │ /tmp/pardes-snap/fsearch/cwd/g.txt:6:1: MARK b +|20: │ │ /tmp/pardes-snap/fsearch/cwd/g.txt:10:1: MARK c +|21: 1 l1 +|22: 2▸MARK a +|23: 3 l3 +|24: 4 l4 +|25: 5 l5 +|26: 6 MARK b +|27: 7 l7 +|28: 8 l8 +|29: 9 l9 +|30: ⏎ lands here · its text is the preview · S-⏎ a new pane 1 message · SPC h m +== snap ctrln grid=180x31 cursor=103,17 +|17: ls ␣ l /MARK/ 2/3 M-l acts +|18: g.txt │ │ /tmp/pardes-snap/fsearch/cwd/g.txt:2:1: MARK a +|19: │ │ ▶ /tmp/pardes-snap/fsearch/cwd/g.txt:6:1: MARK b |21: 3 l3 |22: 4 l4 |23: 5 l5 -|24: 6 MARK b +|24: 6▸MARK b |25: 7 l7 |26: 8 l8 |27: 9 l9 |28: 10 MARK c |29: 11 l11 -|30: ⏎ lands here · its text is the preview · S-⏎ a new pane 1 message · SPC h m -== snap ctrln grid=180x31 cursor=103,13 -|13: ␣ l /MARK/ 2/3 -|15: │ │ /tmp/pardes-snap/fsearch/cwd/g.txt:2:1: MARK a -|16: /tmp/pardes-snap/fsearch/cwd Del Term+bash │ │ ▶ /tmp/pardes-snap/fsearch/cwd/g.txt:6:1: MARK b -|19: 2 MARK a -|20: 3 l3 -|21: 4 l4 -|22: 5 l5 -|23: 6▸MARK b -|24: 7 l7 -|25: 8 l8 -|26: 9 l9 -|27: 10 MARK c -|28: 11 l11 -|29: 12 l12 -== snap landed grid=180x31 cursor=97,22 -|12: -|13: -|14: -|15: +== snap landed grid=180x31 cursor=97,21 |16: /tmp/pardes-snap/fsearch/cwd Del Term+bash ‹@p1 › g.txt:1 › /MARK/ 2/3 › /tmp/pardes-snap/fsearch/cwd/g.txt Keep Del +|17: ls 2 MARK a +|18: g.txt 3 l3 +|19: 4 l4 +|20: 5 l5 +|21: 6 MARK b +|22: 7 l7 +|23: 8 l8 +|24: 9 l9 +|25: 10 MARK c +|26: 11 l11 +|27: 12 l12 +|28: +|29: +|30: ✓ C-o back to /MARK/ 2/3 1 message · SPC h m +== snap n grid=180x31 cursor=97,26 +|16: /tmp/pardes-snap/fsearch/cwd Del Term+bash ‹@p1 › g.txt:1 › /MARK/ 3/3 › /tmp/pardes-snap/fsearch/cwd/g.txt Keep Del |17: ls 1 l1 |18: g.txt 2 MARK a |19: 3 l3 @@ -121,13 +126,9 @@ |26: 10 MARK c |27: 11 l11 |28: 12 l12 -|29: -|30: ✓ C-o back to /MARK/ 2/3 1 message · SPC h m -== snap n grid=180x31 cursor=97,26 -|16: /tmp/pardes-snap/fsearch/cwd Del Term+bash ‹@p1 › g.txt:1 › /MARK/ 3/3 › /tmp/pardes-snap/fsearch/cwd/g.txt Keep Del == snap N grid=180x31 cursor=97,22 |16: /tmp/pardes-snap/fsearch/cwd Del Term+bash ‹@p1 › g.txt:1 › /MARK/ 2/3 › /tmp/pardes-snap/fsearch/cwd/g.txt Keep Del == snap cancel grid=180x31 cursor=97,22 == snap nomatch grid=180x31 cursor=98,17 |16: /tmp/pardes-snap/fsearch/cwd Del Term+bash ^ ‹@p1 › g.txt:1 › /MARK/ 2/3 › /tmp/pardes-snap/fsearch/cwd/g.txt Keep Del -|17: ls / zzqq = Look /zzqq/ 0 ⏎ land · M-⏎ as a list · C-r history · esc +|17: ls / zzqq = Look /zzqq/ 0 C-r history diff --git a/test/snapshots/leader.golden b/test/snapshots/leader.golden index fbd96933..f149bbd4 100644 --- a/test/snapshots/leader.golden +++ b/test/snapshots/leader.golden @@ -3,7 +3,7 @@ | /tmp/pardes-snap/leader/cwd/cmds.txt Keep Del | ␣ ▸ b buffer… c column… f file… h help… j jump… l lsp… n new… s session… t view… ' Resume | │ / All ? Help d Del e Message p ClipPaste P ClipPasteBefore q Exit R ClipReplace -| │ w Window y ClipYank Y ClipYankMain ↓ unroll · ? help +| │ w Window y ClipYank Y ClipYankMain ? help | | | @@ -41,7 +41,7 @@ | | /tmp/pardes-snap/leader/cwd/cmds.txt:1 == snap spc-h grid=100x41 cursor=hidden -|2: ␣ h ▸ b Build c Changelog k Keys m Messages t Tutor ↓ unroll · ? help +|2: ␣ h ▸ b Build c Changelog k Keys m Messages t Tutor ? help |3: |4: == snap abandoned grid=100x41 cursor=7,2 @@ -49,7 +49,7 @@ == snap unmapped grid=100x41 cursor=hidden |2: ␣ ▸ b buffer… c column… f file… h help… j jump… l lsp… n new… s session… t view… ' Resume |3: │ / All ? Help d Del e Message p ClipPaste P ClipPasteBefore q Exit R ClipReplace -|4: │ w Window y ClipYank Y ClipYankMain x ↓ unroll · ? help +|4: │ w Window y ClipYank Y ClipYankMain x ? help == snap help-group grid=100x41 cursor=7,5 |2: 1 Help Help h Help t Help c Help l |3: diff --git a/test/snapshots/lsp.golden b/test/snapshots/lsp.golden index 5f0720a9..9d733def 100644 --- a/test/snapshots/lsp.golden +++ b/test/snapshots/lsp.golden @@ -59,30 +59,28 @@ |40: ✓ /tmp/pardes-snap/lsp/cwd/a.zig Hover 1 message · SPC h m == snap symbols grid=120x41 cursor=14,2 |1: ^ a.zig:8 › /tmp/pardes-snap/lsp/cwd/a.zig Keep Del -|2: ␣ l Symbols 1/3 -|3: │ │ Walk Look Split Newcol Grep Edit Copy Keep Drop | Find Grep Recent Panes Symbols All Jumplist -|4: │ │ ▶ a.zig:3:4-9 f helper -|5: │ │ a.zig:7:8-11 f main -|6: │ │ a.zig:1:7-9 c std -|7: │ │ -|8: 1 const std = @import("std"); -|9: 2 -|10: 3▸fn helper(x: u32) u32 { -|11: fn helper(x: u32) u32 -|12: (fn (u32) u32) -|13: 4 return x + 1; -|14: 5 } -|15: 6 -|16: 7 pub fn main() void { -|17: 8 _ = helper(41); -|18: 9 } -|19: ~ +|2: ␣ l Symbols 1/3 M-l acts +|3: │ │ ▶ a.zig:3:4-9 f helper +|4: │ │ a.zig:7:8-11 f main +|5: │ │ a.zig:1:7-9 c std +|6: 1 const std = @import("std"); +|7: 2 +|8: 3▸fn helper(x: u32) u32 { +|9: fn helper(x: u32) u32 +|10: (fn (u32) u32) +|11: 4 return x + 1; +|12: 5 } +|13: 6 +|14: 7 pub fn main() void { +|15: 8 _ = helper(41); +|16: 9 } +|17: ~ |40: ⏎ lands here · its text is the preview · S-⏎ a new pane 2 messages · SPC h m == snap step grid=120x41 cursor=17,2 -|2: ␣ l Symbols jn 0 -|4: │ │ nothing matches +|2: ␣ l Symbols jn 0 M-l acts +|3: │ │ nothing matches +|4: │ │ |5: │ │ -|6: │ │ -|10: 3 fn helper(x: u32) u32 { +|8: 3 fn helper(x: u32) u32 { == snap nothing grid=120x41 cursor=19,2 -|2: ␣ l Symbols jngd 0 +|2: ␣ l Symbols jngd 0 M-l acts diff --git a/test/snapshots/msg.golden b/test/snapshots/msg.golden index 506f4603..dc52fd87 100644 --- a/test/snapshots/msg.golden +++ b/test/snapshots/msg.golden @@ -50,7 +50,7 @@ |16: · reloaded /tmp/pardes-snap/msg/cwd/a.txt 5 messages · SPC h m == snap prompt grid=70x17 cursor=7,2 |1: ^ /tmp/pardes-snap/msg/cwd/a.txt Keep Undo Del -|2: s EXT = Exec Edit x/EXT/ 0 +|2: s EXT = Exec Edit x/EXT/ 0 C-r history == snap prompt-wins grid=70x17 cursor=7,2 |16: · reloaded /tmp/pardes-snap/msg/cwd/a.txt ×2 5 messages · SPC h m == snap esc grid=70x17 cursor=7,3 diff --git a/test/snapshots/pipe.golden b/test/snapshots/pipe.golden index e9fc165a..906b5b07 100644 --- a/test/snapshots/pipe.golden +++ b/test/snapshots/pipe.golden @@ -1,7 +1,7 @@ == snap prompt grid=180x13 cursor=14,2 | New Term Find Grep Newcol Help Exit |^ /tmp/pardes-snap/pipe/cwd/pipe.txt Keep Del -| | tr a-z A-Z = Exec Edit |tr a-z A-Z 1 line → 1 · exit 0 ⏎ replace · C-r history · esc +| | tr a-z A-Z = Exec Edit |tr a-z A-Z 1 line → 1 · exit 0 C-r history | ALPHA BETA | 2 gamma delta | diff --git a/test/snapshots/selregex.golden b/test/snapshots/selregex.golden index 4b704ee9..482cada9 100644 --- a/test/snapshots/selregex.golden +++ b/test/snapshots/selregex.golden @@ -1,7 +1,7 @@ == snap prompt-armed grid=160x25 cursor=4,2 | New Term Find Grep Newcol Help Exit |^ /tmp/pardes-snap/selregex/cwd/m.zig Keep Del -| s ⏎ select · M-⏎ as a list · C-r history · esc +| s C-r history | 2┃const two = 2; | 3┃const three = 3; | ~ @@ -25,12 +25,12 @@ | | /tmp/pardes-snap/selregex/cwd/m.zig:3 == snap preview grid=160x25 cursor=9,2 -|2: s const = Exec Edit x/const/ 3 selections in 3 lines ⏎ select · M-⏎ as a list · C-r history · esc +|2: s const = Exec Edit x/const/ 3 selections in 3 lines C-r history |24: /tmp/pardes-snap/selregex/cwd/m.zig:1 == style preview grid=160x25 |0: 0-1 d,#1d2824, 2-159 #b2c3b8,#1d2824, |1: 0-1 #000000,#add38a, 2-31 #becfc4,#2c2c0f, 32-37 #ecc8f2,#2c2c0f, 38-159 #becfc4,#2c2c0f, -|2: 0-1 d,#2c2c0f, 2-2 #bada9d,#2c2c0f,b 3-3 #bada9d,#2c2c0f, 4-10 #becfc4,#2c2c0f, 11-17 #79836f,#2c2c0f, 18-115 #becfc4,#2c2c0f, 116-159 #79836f,#2c2c0f, +|2: 0-1 d,#2c2c0f, 2-2 #bada9d,#2c2c0f,b 3-3 #bada9d,#2c2c0f, 4-10 #becfc4,#2c2c0f, 11-17 #79836f,#2c2c0f, 18-148 #becfc4,#2c2c0f, 149-159 #79836f,#2c2c0f, |3: 0-0 d,#608269, 1-4 d,#0d1410, 5-5 #59675c,#0d1410, 6-6 #add38a,#0d1410, 7-10 #e5eee5,#24382c, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410, |4: 0-0 d,#608269, 1-4 d,#0d1410, 5-5 #59675c,#0d1410, 6-6 #add38a,#0d1410, 7-10 #e5eee5,#24382c, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-20 #e5eee5,#0d1410, 21-21 #f8c082,#0d1410, 22-159 #e5eee5,#0d1410, |5: 0-0 d,#608269, 1-4 d,#0d1410, 5-159 #59675c,#0d1410, @@ -65,12 +65,12 @@ |4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #e5eee5,#24382c, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-20 #e5eee5,#0d1410, 21-21 #f8c082,#0d1410, 22-159 #e5eee5,#0d1410, == snap narrowed grid=160x25 cursor=5,2 |1: ^ Edit x/const/ › /tmp/pardes-snap/selregex/cwd/m.zig Keep Del -|2: s t = Exec Edit x/t/ 3 selections in 3 lines ⏎ select · M-⏎ as a list · C-r history · esc +|2: s t = Exec Edit x/t/ 3 selections in 3 lines C-r history |3: 2┃const two = 2; |4: 3┃const three = 3; == style narrowed grid=160x25 |1: 0-1 #000000,#add38a, 2-47 #becfc4,#2c2c0f, 48-53 #ecc8f2,#2c2c0f, 54-159 #becfc4,#2c2c0f, -|2: 0-1 d,#2c2c0f, 2-2 #bada9d,#2c2c0f,b 3-3 #bada9d,#2c2c0f, 4-6 #becfc4,#2c2c0f, 7-13 #79836f,#2c2c0f, 14-115 #becfc4,#2c2c0f, 116-159 #79836f,#2c2c0f, +|2: 0-1 d,#2c2c0f, 2-2 #bada9d,#2c2c0f,b 3-3 #bada9d,#2c2c0f, 4-6 #becfc4,#2c2c0f, 7-13 #79836f,#2c2c0f, 14-148 #becfc4,#2c2c0f, 149-159 #79836f,#2c2c0f, |3: 0-0 d,#608269, 1-4 d,#0d1410, 5-5 #59675c,#0d1410, 6-6 #add38a,#0d1410, 7-10 #e5eee5,#0d1410, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410, |4: 0-0 d,#608269, 1-4 d,#0d1410, 5-5 #59675c,#0d1410, 6-6 #add38a,#0d1410, 7-10 #e5eee5,#0d1410, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-20 #e5eee5,#0d1410, 21-21 #f8c082,#0d1410, 22-159 #e5eee5,#0d1410, == snap esc-restores grid=160x25 cursor=11,2 -- cgit v1.3