summaryrefslogtreecommitdiff
path: root/core/Pick.zig
Commit message (Collapse)AuthorAge
...
* Pick: the entry points open a picker in the tag (walk UI, pick-ui SPEC.md ↵Gabriel Schneider3 days
| | | | | | §14.3 phase 4, item 5 of line D): in a session whose jumps walk, from the keyboard or a click (Pick.asked: never a 9P script's, which keeps the query pane whose rows it reads back and whose `not found` it hears), Find and Grep (`SPC f f`, `SPC f g`, their words), Recent (`SPC f r`), Search's sources (`SPC b b` Panes, `SPC s s` Symbols, `SPC /` All), Panes, Jumplist (`SPC j l`) and the language server's symbols and diagnostics (`SPC l s`, `l S`, `l d`, `l D`: lsp/Ask.zig, a list picker titled by its word) unroll in the tag of the pane their Enter lands in; `Jumps new-pane` (still the default) keeps today's query pane and +Jumps, so no golden moves; `/` in a body stays today's; two fixes to the items before: the band is as tall as its second step (the acts and what they act on, the sources), and with the preview off (M-p) no frame is asked for it (Pick.busy spun every frame); test/perf.zig `--pick`: a key in a Find of 50,000 paths and its frame, the frames after it while the names are scored, a cursor move over files and the frame after it that loads the preview, instructions and time; TEST FIRST: Pick.zig "pick-ui §14.3 phase 4: SPC f f from a held pane opens in its reader and Esc removes it; from a reading pane it unrolls there; Enter lands as a step leaving the list word; n walks; a Look on the word reopens it with its cursor and marks"; core-test 0 failed; pane-test 182/184 and behaviour-test (and --replay) 274/277, process-test 5 of 146 failed: all the base's (A's tests not updated in this base: Help's +Help, window mode, a PDF's SPC; the goldens find, tagnav, builtins, leader, ttyhelp of A's report), shell-test, term-test, kitty-test pass Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Pick: after Enter, the list word (walk UI, pick-ui SPEC.md §5.6, ↵Gabriel Schneider3 days
| | | | | | §6.1-§6.3 list words and n/N, item 4 of line D): Enter rolls the list into the trail of the reading pane it landed in as one word before the place, `Find pick 3/6 •2` (its word, refinements and query, where its cursor is among its rows, its marks; Trail.through, B's Trail.zig: the list a step came through), the list keeping its rows, marks, cursor and query in the session's ring; n and N in that pane walk its rows, the newest list or search word's (normal.zig, after the text's own places: a search made since is n's), in place of the current step (Trail.replaceStep: no step pushed, a file of its own a pane in its place as a step's), its word saying where it is now; a Look on the word (Trail.lookStep's list arm) unrolls the list again in that pane's tag as it was, an Exec (execStep's) runs its source again with its query from there; Resume (`SPC '`, a new builtin, docs/typ/builtins-tui.json regenerated) reopens the last picker from the pane the keyboard is in, in the tag of the pane its Enter lands in; Enter lands from the landing pane when it reads (the owner's reader or the asker itself) and from the owner otherwise; THE FAULT IT MET (B's Trail.zig, never reached before a list word existed): Trail.wordOf returned a list's, a search's or a recipe's text out of a copy of the step made by its switch, gone at the return, so a list word drew as freed bytes; the switch takes the step's own now; TEST FIRST: Pick.zig "after Enter the list is a word in the reader's trail: n and N walk its rows in place, a Look on it reopens it with its cursor and marks, Exec runs it again, Resume reopens the last" (failed on the freed bytes first); core-test 1018/1184 (166 skipped), 0 failed Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Pick: the act step (walk UI, pick-ui SPEC.md §5.5, item 3 of line D): M-l ↵Gabriel Schneider3 days
| | | | | | or M-Enter unrolls the acts beside the rows, headed by what they act on (`on 2 marked`, `on core/pick.zig`), and the head's second row says them before the sources' words (`Walk Look Split Newcol Grep Edit Copy Keep Drop | Grep Recent ...`); a key letter or Enter on the act's row: w Walk lands on the first picked place and queues the others (Pick.queue, the places as paths and spots), which Ctrl-i steps in the landing pane past its newest step (Pick.stepQueue, at the hook B left in Jump.jumpBy), o Look, s Split, v Newcol (Enter's three ways), g Grep a Grep picker in the picked rows' directory with the same pattern, e Edit the field a sam command (the head `Find pick | Edit s/a/b/`) run by Enter on each picked row's line in the open text that shows it (edit_cmd.run, from the last line up, a row whose file no pane shows passed over and said), y Copy the places as `path:line` lines into the unnamed register, k Keep as C-q, x Drop the picked rows as a refinement without them, d Del (the Panes list's, whose acts are Look Copy Keep Drop Del: its rows are no places) closes the picked panes and lists them again; an act's or a source's word run while the picker is live (B2 on the head's second row or on the band) is the picker's (Pick.execWord, at the head of exec.zig executeBuiltinLine; Grep, both, is the source); B3 on a picker's row lands on it and B2 runs the word with the picker live (mouse.zig bandPress: the picker's arm before A's toRest); a landing pane previewed in its own file has its caret and top put back when the picker rolls up (said in item 2's description, made here); TEST FIRST: Pick.zig "M-l unrolls the act step, which says what it acts on; Copy puts the places in the register, Drop takes the picked rows out, Walk queues the rest for C-i"; core-test 1017/1183 (166 skipped), 0 failed Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Pick: a picker's keys (walk UI, pick-ui SPEC.md §5.4, item 2 of line D): ↵Gabriel Schneider3 days
| | | | | | Enter lands through the walk's open from the pane it lands in (a reading pane steps in place, a held one's reader does; the reader made for the picker is taken away first and the place opens as the held pane's reader, look.open's own), its Spot a Find row's first line, the jump list forced so Ctrl-o goes back to where it was asked; S-Enter and C-s open each picked row in a pane below; C-v in a new column (layout.newColumn, the place put there by exec_column as a column tag's New is); marked rows land the first as asked and the others below; Tab and S-Tab mark and move (Pick.marks, what each row is: a name's candidate, a Grep's line, sorted, so a frame finds a row's mark by a search over them, never a walk); M-a marks all or none; M-h the source spine as a step in the band (f g r b s / ?: Find Grep Recent Panes Symbols All, Help over the binding tree with the query, which A's TagState.openHelp takes), the query kept; C-SPC refines: the rows the query keeps become the list (a new Names of them, the old one stacked with its query, max_refine 3; a Grep's lines and All's become names, `path:line:col text`), the head `Refs alpha | w`; Backspace on an empty field undoes a refinement, else goes back to the leader level the picker's builtin is under, unrolled (as Help's Backspace); C-q keeps the rows (the marked, else all, Query.max_rows) as a +Search of text under the asking pane, its first line the word and query, each row an address a Look opens; M-p turns the preview off (the landing pane's own text back) and on; Esc rolls everything up (the tag's: TagState.toRest); a landing pane that previewed its own file has its caret and top put back; TEST FIRST: Pick.zig "a picker's keys: Tab marks and moves, M-a all and none, C-SPC refines and Backspace undoes it, M-h switches source keeping the query" and "Enter lands as a walk step in the reading pane; S-Enter opens below; from a held pane the reader made for the picker becomes its reader"; core-test 1016/1182 (166 skipped), 0 failed Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Pick: a picker unrolls in the tag of the pane its Enter lands in (walk UI, ↵Gabriel Schneider3 days
pick-ui SPEC.md §3.5, §5.1-§5.3, item 1 of line D): core/Pick.zig, a picker the session's (Pardes.picks, a ring of max_lists 8, each named by a serial from the panes' counter so the disk engine's target names it as it names a pane, Stream.receive giving it its batches through Query.take, now taking either), live in a view's tag as TagState kind pick (TagState.pick its serial, host its landing pane: the asking pane when it reads, else its reader, else a pane made for it where its reader would go, an empty +Preview until the preview fills it, taken away by Esc); its sources Query.zig's producers re-presented: Find's listing from the disk engine's worker and Recent, Panes, Symbols (Query.gather, the name gathering startSource did, now shared), the jump list (Output.jumpsText, what +Jumps lists) and a list's rows handed over (a language server's answer, titled by its word), all scored by Names a frame's count at a time; Grep's lines from the worker after its pause, All the places each open text finds (as Query's All); the head ` ␣ f Find pick 3/6 ⋯` (key cells from the source's leader keys, the word, the field, cursor/total, ⋯ while scoring or searching) and a second row of the other sources' words under spines continued from the key cells (TagState.Head.cells counts the second row's spines, which Band.findSpines hangs the band from); the band's rows eleven around the cursor, made in the frame's arena for the rows shown only (O(rows shown): a Find of 50k paths makes 11 rows a frame), a place prefix in the name's tint, a path's directory dimmed, matches in the match tint; the preview is the landing pane's body: the current row's file at its line (a Grep's matches lit as its places), taken from an open pane's text or read, on the frame after the cursor stood (never on the key that moved it: Pick.busy asks the frame), a reading pane's own text set aside meanwhile (Pick.aside) and put back when it rolls up, a twinned text never previewed in; TagState.toRest rolls a live picker up first, whoever puts the tag to rest; A's API: TagState.Kind pick and its pick field, Band.takes/of's pick arm, Band.Row mark/pre/faint (drawn in draw.zig joinBand), Band.place holding a step to the band's width, TagState.point on a picker's row; TEST FIRST: Pick.zig "a picker from a held pane unrolls in a reader made for it ..." and "a picker from a reading pane unrolls in that pane, its own text set aside while it previews and back on Esc"; core-test 1014/1180 (166 skipped), 0 failed Co-Authored-By: Claude Opus 5.5 <[email protected]>