From ac39b5e4f80e1903abccd1e003850e9691e61022 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 26 Nov 2026 02:19:41 -0300 Subject: tagline, layout, draw, mouse, edit, dump: one column, one row: the window row holds the lone column's words at its left (`New Term`) and the window's at its right end (`Find Grep Newcol Help Exit`, then `Restore `, then the user's text), and the column-tag row comes only with a second column (`New Term Joincol Delcol` over each), or a column tag holding the user's text (UX DESIGN K'2, binding; the user: "I liked C and D for the tagline like we could show the column tagline only when we have multiple columns"); THE OLD WAY: the window's and every column's tag were a row each whatever the window held, 2 of 20 rows at the demo's 84x20 before a line of text, their words their own text (`global_tag.own`, `col_tags[c].own`, or until edited the defaults `Newcol Joincol Find Grep Help Changelog Tutor Dump Themes [Fonts] Config History Debug Exit` and `New Term Find Grep Joincol Delcol`), and Restore's word swapped inside the window's own text (Core.pointRestoreAt); THE CHANGE: a header reads as a pane tag does since K'1, computed words, a blank, then the user's text (tagline.headerWords, headerText; config.window_words_str, column_words_str, columns_words_str; the old lists kept for the dumps and for /tagexec's refusal of pane words, ninep/cols.zig paneWord), the words read-only (edit.setEditTextSpan refuses an edit that changes them and their blank, editText edits the text as shown, flatSurface shows it), the keyboard starting on the user's text (enterHeader, as enterTag), Restore computed (pointRestoreAt keeps only the path); layout.columnBarHeight is 0 with one column and no column tag holding text (and with a window row to take the lone column's words: a native shell's window with none keeps the column row), layout.columnInWindowRow says the lone column's tag is in the window row; tagline.windowRow is the one rule for the window row's two sides, in cells (the column's text and its caret's cell from the inset; the window's text right-aligned, its caret's cell at the right edge, a server's progress after its text while one runs, tagline.sessionProgress; cells from glyphs by layout.tagCapacity's inverse), read by draw.zig (addRegions: a `.column_tag` region for column 0 in the window row, no grip; paintHeaders: the window row on the tagline's ground end to end, column 0's layer at its left in the row's inks, the window's layer from its words), mouse.zig (headerPoint and the press: the column's side, the window's, the blank between no one's), workspaceBlank (the inset and the blank between are the pixel shell's drag area) and root.zig's pixel grid (taglineOriginCol, gridColAt, the macOS fallback); Core.sync lets a column tag keep the keyboard in the window row; revealHeader scrolls each by its own side's width; flattenHeaders keeps the caret on its character in the text as shown; a 9P header write appends to the user's text and a truncation clears it, the words staying (ninep/cols.zig); Help's `topbar` annotation names the window row's words (root.zig shortcuts; docs/typ/builtins-tui.json from `zig build builtins-json`, builtins-gui.json the same 9 lines by hand); RESTORE: dump.dropOldTags also drops a window tag's own text equal to the old row (either build's, with or without its `Restore `) and a column's equal to the old column tag, any other kept as the user's text; A FAULT THE ROW FOUND (core-test, ninep/tree.zig "random placements ... leave no pane under its tag and two rows", seed 30, 8 rows: Newcol with two panes at their minimum left `pane 2 h 2 min 3`): layout.keepColumn's trial shares a column's rows out again for the new layout and, refused, dropped the column but kept the trial's shares, so the column's panes came back on the old height with the trial's weights, one under its minimum; a column row that comes with a second column now makes every refused Newcol in a full column take that path; THE FIX: keepColumn puts every pane's weight back when it refuses (a user could hit it before this change too, where a narrower column wrapped tags); TESTS (FIRST): layout.zig "the column row comes with a second column and goes with it, the panes giving it and taking it back; a column tag with the user's text keeps it (UX K'2)" (one column: no row, the pane at row 1; Newcol: the row, both columns' panes at row 2; Delcol of the second: the pane's rect back as it was; the user's text keeps the row alone, emptied it goes), mouse.zig "one column's words at the window row's left and the window's at its right each run their own; the blank between is no one's (UX K'2)" (windowRow's sides at 100 columns; B2 on New makes a pane in the column; B2 and B1 on the blank nothing; B1 on Term gives the column's tag the keyboard there, its caret on the cell; B2 on Newcol at the right a second column), tagline.zig "a header reads its computed words, then the user's text: typed there, kept through a change of its words (UX K'1, K'2)" (typed at the start, a Backspace into the words refused, Restore coming in before the user's text, Joincol Delcol into both columns' words with a second, Newcol's tag typed into), "a dump of a build before UX K' restores a header's old default own text as none, any other as the user's (UX K'1)" and "the window row is blank at its inset and between its two sides, and nowhere else (UX K'2)"; TESTS CHANGED, each for the row or a word that moved: Core.zig the Restore word (computed, the user's text after it, across a Restore), editable headers (a sweep over the window's words, `a` into them refused, typed after them; the column's tag typed into at the window row's left brings the column row, emptied it goes, the keyboard staying), topbar hover (each side's first word), the short screen (sync before presenting the user's text); tagline.zig flattening (the caret on `a` of Snarf in the text as shown); keys.zig (W4's file, the test only: `s` in the window tag finds `i` twice, Find and Exit); Handover.zig (a column carried by its grip: a second column first, the grip is in the column row); replica.zig (the kind's pane under one row of body: 4 rows, not 5); ninep/cols.zig (the column's and the window's tag read, cleared and appended to after their words); root.zig (the window row's blank on the body's grid, its words compact from their origin); dev/gui/gui.zig (L2cde's file, the test only: the window's text starts at windowRow's words); test/panes.zig (a header's click past its words), test/column_drag.zig (the tags compared by their own text: columnTag now builds in the step's scratch), test/hxdiff.zig (25 rows give helix's 22: one row of chrome less); BEHAVIOUR: columns_and_tags (the window's words at the row's right end; a lone column's tag `New Term `; a click past it on its caret's cell types the user's text and brings the column row, the pane's tag under it, and a wider run of 界 to scroll it; Help, not Tutor, for Tab from the window's tag; a column tag typed into after its words), keys (zz at 80x24 for a view of 21 rows), modes (`b` from the column tag's user text onto its words), tags (the user's text in a column tag brings the column row: the pane one row lower); addons/{fake,life,pdf,snake}.out re-recorded (each kind's window one row taller); PROCESS: 27 waits on `Newcol Joincol` now `Newcol Help Exit`; Dump (dump, load, restore, headersweep-restored), Debug (topbarexec, windowops) and Tutor (tutor), which left the window row, typed into its own text after its words (B1 on Find, A, the word, Esc) and run there by B2; headersweep types after the window's words with A (a click at a column now inside them) and sweeps the second column's `New Term`; tagnav enters the column tag on its user's text (`b`, not `w`) and types Dump into the window's own text, its five B from `$` having run Themes in the old golden, not the Dump its comment says, now one B and Dump, and three B onto Restore; and every click on a row under the column row of a one-column session one row up (the window row's own clicks unchanged), each checked against its old golden's screen, the lower pane's rows staying where the extra row went above them (diffview's last look); GOLDENS: 101 re-recorded (ttyhelp left as it was: the change after this re-records it), every snap checked by a script against its old screen (each text row the same or one row up, the caret the same or one row up), every move one of: the window row's new words (the lone column's `New Term` at the left, the window's at the right end), the column row gone with one column (every row under it up one, one more text row at a foot), the column tags' words, Help's `topbar` annotations gone from the words that left, a header's caret on its user's text (emptycol, layout-close, tagnav), a nested session two rows (nested-optout), the typed Dump, Debug and Tutor in the window row; GATES: core-test 1130/1303 (173 skipped: +4, ssonuoyn 1126/1299), shell-test 1351/1354 (3 skipped: +1), pane-test 183/184 (1 skipped), behaviour-test 280/280 and --replay 20 seeds of 70 steps 0 failures, process-test 1 of 147 failed (ttyhelp: this change moves it too; the change after this re-records it; 3 skipped), term-test 17/17, kitty-test 45/45, the gui unit-test 1954/1958 (4 skipped, none failed; ssonuoyn 1949/1954; its one failed step the perf check's known BaselineHarnessMismatch); the two tagline.zig tests on the base (ssonuoyn, the tests alone): both fail, the header's at its first question (`Newcol Joincol Find Grep Help ...` where `Find Grep Newcol Help Exit ` is asked), the dump's at the window's old row restored as its own text (the layout and mouse tests ask for windowRow and columnInWindowRow, which the base has not); the dump fuzz at 40,000 join seeds twice and 1,779 image seeds 11/11 (no field changed; the header rows change the layout); the soak `replicas -- --clients 5 --rtt 30,80,207`: diverged 0, unequal 0, agree/differ 491/0 338/0 522/0, unlisted stops 0, the corpus 22 of 22 scenes the same, no leak; no frame/perf gate (the coordinator's, at the programme's end); load 2.0 to 14.8 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 --- docs/typ/builtins-gui.json | 18 +++++++++--------- docs/typ/builtins-tui.json | 16 ++++++++-------- 2 files changed, 17 insertions(+), 17 deletions(-) (limited to 'docs') diff --git a/docs/typ/builtins-gui.json b/docs/typ/builtins-gui.json index 2243756d..f129215a 100644 --- a/docs/typ/builtins-gui.json +++ b/docs/typ/builtins-gui.json @@ -9,7 +9,7 @@ {"name": "Callers", "leader": "SPC l c", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the functions that call the one under the cursor, one level up; a single one is a jump.", "text": "List the functions that call the one under the cursor, one level up; a single one is a jump."}, {"name": "Callstack", "leader": "SPC l b", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Show the callers of the function under the cursor as a tree, outermost first, in a +Callstack.", "text": "Show the callers of the function under the cursor as a tree, outermost first, in a +Callstack.\nEach caller with its place to open and its signature, the line of each call under it; callers named for tests after the rest, a recursion marked `↻`. CallstackDepth sets how many levels (8 by default); a deeper tree says where to go on from. `g c` does the same."}, {"name": "CallstackDepth", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "Caller levels collected by Callstack, 1 through 64; default 8.", "text": "Caller levels collected by Callstack, 1 through 64; default 8. Bare, it says the current limit."}, - {"name": "Changelog", "leader": "SPC h c", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Show this build's version and what changed to reach it, in a +Changelog.", "text": "Show this build's version and what changed to reach it, in a +Changelog."}, + {"name": "Changelog", "leader": "SPC h c", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Show this build's version and what changed to reach it, in a +Changelog.", "text": "Show this build's version and what changed to reach it, in a +Changelog."}, {"name": "Changes", "leader": "SPC t c", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Draw jj's changes to this file on its own pane: a lane each, and what they took away.", "text": "Draw jj's changes to this file on its own pane: a lane each, and what they took away.\n`Changes ` pins the revset's changes that touched the file on its pane, or a revision's (`notes.md@main`), and shows them in every view of it: `Changes @-::@`, `Changes trunk()..@`. One set a pane: a later Changes or Compare replaces it. Bare: hidden, or shown again; with none pinned yet, `@`.\nEach change gets a lane after the line number. What the file no longer has stands where it stood as lines of the pane's text with no number, read-only: the cursor, a selection, a search, B2 and B3 work there, and an edit that touches one is refused. After a change's last line comes its description, `id title author age`, its lane ending in an arrow at it; a long one wraps. `] g` and `[ g` step through the changes; B3 on a description's id opens that change's patch at that line (`Diff :`)."}, {"name": "Churn", "leader": "SPC t u", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Show how many changes touched each declaration of this file, as a heat lane.", "text": "Show how many changes touched each declaration of this file, as a heat lane.\n`Churn `: a revset, or a span of time back from now (`3d`, `2w`, `6m`, `1y`). In this view a cell after the line number, from the line numbers' grey to the theme's red on a log scale, and a strip by the scroll thumb. Bare: hidden in this view or shown again; with none counted yet, the file's whole history."}, {"name": "ClipPaste", "leader": "SPC p", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Paste the system clipboard after the selection.", "text": "Paste the system clipboard after the selection."}, @@ -20,9 +20,9 @@ {"name": "CodeAction", "leader": "SPC l a", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the language server's code actions for the cursor, to apply one.", "text": "List the language server's code actions for the cursor, to apply one.\nTyped where jumps walk, they are a picker in the pane's tag, the one under the cursor shown as its edit, applied by Enter or its digit; else a +Lsp lists them."}, {"name": "Collapse", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Fold this pane to its tag, or give it its share of the column again.", "text": "Fold this pane to its tag, or give it its share of the column again."}, {"name": "Compare", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Draw the file's difference between each two jj revisions as one change, as Changes draws one.", "text": "Draw the file's difference between each two jj revisions as one change, as Changes draws one.\n`Compare [ ...]`: two points or more in their order, each one revision (a commit or change id, a bookmark, `master@origin`, `@`): `Compare 9ef6312813 ea63317630 master@origin`. A pair is drawn as one change however many lie between its points; after its last line, its row: the two points, how many changes lie between them, their first and last days. One set a pane: a later Changes or Compare replaces it. Bare: as bare Changes."}, - {"name": "Config", "leader": "SPC f c", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Open the startup file, `init` in the configuration directory, in a pane.", "text": "Open the startup file, `init` in the configuration directory, in a pane.\nIts pane when it is open, else the file; not there yet, a pane of that name, which Save makes, its directory too."}, + {"name": "Config", "leader": "SPC f c", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Open the startup file, `init` in the configuration directory, in a pane.", "text": "Open the startup file, `init` in the configuration directory, in a pane.\nIts pane when it is open, else the file; not there yet, a pane of that name, which Save makes, its directory too."}, {"name": "CursorBlink", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "The cursor blinks, solid while typing, on or off.", "text": "The cursor blinks, solid while typing, on or off."}, - {"name": "Debug", "leader": "SPC t d", "also": ["topbar"], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "A small box of frame statistics at the top right, on or off.", "text": "A small box of frame statistics at the top right, on or off."}, + {"name": "Debug", "leader": "SPC t d", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "A small box of frame statistics at the top right, on or off.", "text": "A small box of frame statistics at the top right, on or off."}, {"name": "Def", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Go to the definition of the symbol under the cursor.", "text": "Go to the definition of the symbol under the cursor.\nWith an argument (a 2-1 chord's selection), of that symbol, asked at its occurrence nearest the cursor. One answer is a jump; several open a list, the keyboard on its current row; none says so. `g d` does the same."}, {"name": "Del", "leader": "SPC d", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Close the pane.", "text": "Close the pane.\n`Del k` gives its rows to the pane above it, `Del j` to the one below, each falling back to the other side; bare, from the keyboard between two panes, it asks k or j on the pane's notice band. A docked pane's rows go back to the pane it answers for. Refused once while the pane holds unsaved text (listed in +Unsaved); Del again, nothing edited since, closes it."}, {"name": "DelAbove", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Close the pane, giving its rows to the pane above it, as `Del k` does.", "text": "Close the pane, giving its rows to the pane above it, as `Del k` does."}, @@ -32,7 +32,7 @@ {"name": "Diagnostics", "leader": "SPC l d", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List this file's diagnostics in a +Search.", "text": "List this file's diagnostics in a +Search.\n`] d` and `[ d` step through them in the text, `] D` and `[ D` to the last and the first."}, {"name": "Diff", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Show a diff's hunks stacked in a +Diff, each under its place, as a diff viewer shows them.", "text": "Show a diff's hunks stacked in a +Diff, each under its place, as a diff viewer shows them.\nBare, on a diff (a .diff, a .patch, a +Pager holding one): its hunks stacked; on a +Diff: the diff itself, as text. `Diff `: that .diff's or .patch's hunks. `Diff ` (7 to 40 hex digits): `git show` of that commit, in its own `+Diff-`. `Diff [path[:line]]` (a jj change id): its patch, its header and whole message on top, the cursor at that place. `Diff .. [path[:line]]`: the difference between two points, the changes between them on top.\nEach hunk stands under its `path:line` and the declarations around it, a + or - before each line, the words a changed line changed tinted. `SPC j n` and `SPC j p` step through the hunks; B3 on a place opens it."}, {"name": "Down", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Move the keyboard to the pane below, or off a tag onto the pane under it.", "text": "Move the keyboard to the pane below, or off a tag onto the pane under it."}, - {"name": "Dump", "leader": "SPC s d", "also": ["topbar"], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Write the session's panes and layout to the state file, for Restore.", "text": "Write the session's panes and layout to the state file, for Restore.\n`Dump export ` writes them to a file of their own instead (`~` the home directory). The workspace tag then holds a `Restore ` word that brings them back."}, + {"name": "Dump", "leader": "SPC s d", "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Write the session's panes and layout to the state file, for Restore.", "text": "Write the session's panes and layout to the state file, for Restore.\n`Dump export ` writes them to a file of their own instead (`~` the home directory). The workspace tag then holds a `Restore ` word that brings them back."}, {"name": "DumpConfig", "leader": null, "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Show the settings in effect in a +DumpConfig, as lines the startup file takes.", "text": "Show the settings in effect in a +DumpConfig, as lines the startup file takes.\nThe startup file's path with them; a line run there is that setting."}, {"name": "DumpDir", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "The directory of the state file, where Dump writes and Recent is kept.", "text": "The directory of the state file, where Dump writes and Recent is kept. A relative Restore name is looked for there too; bare, the default."}, {"name": "DumpThemes", "leader": null, "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Write the bundled themes into the configuration directory's themes, to edit.", "text": "Write the bundled themes into the configuration directory's themes, to edit.\nThemeFile loads one back."}, @@ -43,18 +43,18 @@ {"name": "Find", "leader": "SPC f f", "also": ["topbar"], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "List the files below this pane's directory whose names match its argument.", "text": "List the files below this pane's directory whose names match its argument.\nA query pane under this pane, its line 1 `Find `, the files under it by a fuzzy match of their names: with a word, listed, the keyboard left where it was; bare (`SPC f f`), typed into. Enter or B3 on a row opens that file. A script's Find that finds nothing fails, `not found`."}, {"name": "Follow", "leader": "SPC c f", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Show one text across a chain of panes as consecutive pages, scrolled as one.", "text": "Show one text across a chain of panes as consecutive pages, scrolled as one.\nAs Emacs's follow-mode: each page goes on where the one before ends. Each Follow adds a page, a Zerox of the text, at the end of the column right of the chain's last, or in a new column there; its tag has Unfollow."}, {"name": "Font", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "The body font, by name or path, and its size after a colon: `Font Mono:14`.", "text": "The body font, by name or path, and its size after a colon: `Font Mono:14`. Fonts lists them."}, - {"name": "Fonts", "leader": "SPC t f", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "List this machine's fonts in a +Fonts, each a `Font ` line to run.", "text": "List this machine's fonts in a +Fonts, each a `Font ` line to run."}, + {"name": "Fonts", "leader": "SPC t f", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "List this machine's fonts in a +Fonts, each a `Font ` line to run.", "text": "List this machine's fonts in a +Fonts, each a `Font ` line to run."}, {"name": "Forward", "leader": "SPC j i", "also": ["C-i"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Go one step forward again in the jump history, up to where Back started.", "text": "Go one step forward again in the jump history, up to where Back started."}, {"name": "Get", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Read this pane's file again from disk; refused once over unsaved edits, as Del is.", "text": "Read this pane's file again from disk; refused once over unsaved edits, as Del is.\n`Get ` loads that file into the pane instead, the pane taking its name. In a directory's pane, it reads the directory again."}, {"name": "Grep", "leader": "SPC f g", "also": ["topbar"], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "List the lines of the files below this pane's directory that hold its argument.", "text": "List the lines of the files below this pane's directory that hold its argument.\nThe text is matched as it is, not as a pattern, in a query pane under this pane, its line 1 `Grep `: with a word, listed, the keyboard left where it was; bare (`SPC f g`), typed into. Past 2000 lines it stops, and More goes on. A script's Grep that finds nothing fails, `not found`."}, {"name": "GripWidth", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "The grip and scrollbar width, as a percent of the theme's rail.", "text": "The grip and scrollbar width, as a percent of the theme's rail."}, {"name": "Help", "leader": "SPC ?", "also": ["topbar"], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Show every builtin with its keys and documentation, or one builtin's alone.", "text": "Show every builtin with its keys and documentation, or one builtin's alone.\n`Help `: that builtin alone, its keys spelled out, what it acts on and its line for a shell (`Help Diff`); a setting or an addon's word the same. `Help `: the builtins under SPC and those keys (`Help l`, as `SPC l ?` shows them). Each fills the one +Help: a second Help replaces its text."}, - {"name": "History", "leader": "SPC f h", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "List the state file's dumps, newest first, each with the Restore that brings it back.", "text": "List the state file's dumps, newest first, each with the Restore that brings it back.\nThose Dump made and those every session's end left, in a +History: each a `Restore