From 9a648ef09bb32f42fb6b09bebbe8c851be360c6e Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 23 Nov 2026 05:59:04 -0300 Subject: pty/run at a terminal's start answers the line it ran: a window session's first run (test/daemon.py `gui_upgrades`' `echo $$`, twice this week a ValueError on its second line, `b''`) answered `error not run` while its command ran, and a run written just after a new terminal's greeting is typed answered `exit 0` with the greeting's `ls` output; (a) every window session's first terminal is sized twice, its shell forked at 78x14 and sized 78x13 by the window's first frame about 20 ms later, at its first prompt, where readline draws the prompt again (`\r\e[K\r` and PS1, marks and all): a run's line sent into the first prompt shows on the redrawn one, `noteMarks` takes that newer prompt with no C for the line fish refuses and keeps (Ctrl-U, `.kept_line`), and the read after it, the line's newline before PS0's C (bash writes them apart), leaves the cursor on a fresh row in the input which `prompt()` called an empty prompt: `error not run`, the command's C a read later (the ponytail at pty.zig's refused branch named it; the same under an adoption's two sizes, which test/daemon.py `adopted_pid` waited around since ymvuluxr, then ruled a run "told plainly that it did not run": it had run); now a row begun by a newline in the input, with no prompt on it, under a typed line, is not an empty prompt (core/term/terminal.zig `prompt()`, abi/term.zig's `input_empty`): the line was taken and the run waits for its C; (b) the greeting `ls\r` is typed at a new terminal's first prompt (Core.zig's layout), and until its echo the prompt looks empty: a run sent then is typed behind it and its want (started+1) is the `ls`'s C; now the pane keeps that its greeting was typed (`Pane.greeted`, cleared at a shell's start) and until the prompt after it a run waits for that prompt (pty.zig `greeting`: writeRun, noteMarks, pty/status's busy), as for the first, bounded since `ls` always starts (the reference says so); the failing tests first (core/ninep/pty.zig, shell-test): "a prompt redrawn under a run's line, the line taken, is the line run: never `error not run`" (the bytes pty/data read off a failing ReleaseSafe window start; on the base `error not run`) and "a run written just after a new terminal's greeting is typed is not answered with the greeting's output" (on the base `exit 0\nnotes.txt\n`); a user could hit both: a script that starts pardes-gui and runs at once in its shell (a retry on `error not run` runs its command twice), and one that opens a Term and runs in it at once (another command's output for its own, exit 0); the rates (.scratch/sketch/reorg/pardes-first-run, 200 runs a row pinned to CPU 6 and to CPUs 6,7, no made load, loads 1.5-10): every one of 24 rows 200/200, the base and this, Debug and ReleaseSafe, a window session and a terminal's, plain and with a WINCH trap in the shell's .bashrc: the fault is rare on its own (2 of 108 diagnostic ReleaseSafe window starts with that trap; the coordinator's checks twice under load), Debug never reaches it (its first frame comes before bash's first prompt), and its adopted twin comes more often: test/daemon.py `--relink` with adopted_pid's wait taken out, the installed build 18 of 20 (two `error not run` on the adopted shell), this tree's ReleaseSafe 20 of 20; the gates (with the harness change after it): tui Debug core-test 924/1090 (166 skipped: the two new tests need a terminal), shell-test 1132/1135 (3 skipped), process-test 0 of 146 (loads 3.0-6.2); test/daemon.py on ReleaseSafe: plain 1/1, `--upgrade` from the installed build (wire 31) 1/1, `--upgrade --gui` from the installed build 5/5 (loads 1.1-5.8); left: the Ctrl-U a redraw that shows the line still sends (it reaches bash after the line's Enter: a bell at the next prompt), `busy` for a run written into a prompt being drawn (its A read, its B not yet), and a line a user types, or `Term CMD`'s queued line, in the instant before its echo Co-Authored-By: Claude Opus Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- docs/typ/reference.typ | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/typ/reference.typ b/docs/typ/reference.typ index ac61ca74..fac705c6 100644 --- a/docs/typ/reference.typ +++ b/docs/typ/reference.typ @@ -914,7 +914,8 @@ Terminal panes also have #file("pty/"): the clear onward). Or: `busy: is running` (bare `busy` when text is typed at the prompt, `busy alternate screen` on the alternate screen with no prompt drawn), `exit ?` (no status reported, not a success), `error not run` (the shell refused the line, e.g. a fish syntax error), `error shell gone`, `error no prompt marks`, and on a command pane `error a command runs here, not a shell` (`error command done; not a shell` once it ended). A line written - before a fresh terminal's first prompt waits for it. One line per run; a + before a fresh terminal's first prompt waits for it, and for the prompt + after the `ls` a new terminal in a directory greets with. One line per run; a second line before the answer is refused. #file("pty/run") relies on the OSC 133 marks pardes injects into bash and -- cgit v1.3 From 80fd9dbda2bca682014e8b96b62fbe40e672ecc3 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 23 Nov 2026 11:45:51 -0300 Subject: docs: the Changes chapter and the cheatsheet say what round 7 changed: a lane's colour is the kind of the row it stands beside (the theme's cool accent beside what a change wrote, its warm one beside what it took away, how the two are picked), a change's lane ends in an arrow at its description, whose id is in the keyword's colour; a B3 on a ghost row looks at its word as anywhere and on a description's id opens that change's patch at the row for its last line there (`Diff id path:line`); the words' table gains `Diff change path:line` and the Look on a change id (eight letters k to z, as `jj log` writes them) with the patch's header first; the cheatsheet's Changes row says the same in a line; the book builds (the gate's `book` step) Co-Authored-By: Claude Opus Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- docs/typ/cheatsheet.typ | 2 +- docs/typ/guide.typ | 23 +++++++++++++++-------- 2 files changed, 16 insertions(+), 9 deletions(-) (limited to 'docs') diff --git a/docs/typ/cheatsheet.typ b/docs/typ/cheatsheet.typ index d65ca6d9..a590e402 100644 --- a/docs/typ/cheatsheet.typ +++ b/docs/typ/cheatsheet.typ @@ -119,7 +119,7 @@ Helix-style: motions *select*, then an edit acts on the selection. Mode box: bla == Reviewing diffs `git diff` output is a diff: #btn("B3") on a file line, an `@@` or a line's `+`/`-` jumps there. #doc("tags", section: "reviewing-diffs") -#word("Changes") `revset` on a file's pane: a lane a change, ghost rows for what it took away, #keys("] g", "[ g") from change to change; #word("Churn") `3m`: each declaration's changes, grey to red; `a.zig@main:12` is a file at a revision. #doc("guide", section: "changes") +#word("Changes") `revset` on a file's pane: a lane a change (one change: green beside what it wrote, red beside what it took away), an arrow to its description, ghost rows for what it took away, #keys("] g", "[ g") from change to change; #btn("B3") on a change id: its patch, header first; #word("Churn") `3m`: each declaration's changes, grey to red; `a.zig@main:12` is a file at a revision. #doc("guide", section: "changes") == Finding things - A query pane under the pane: line 1 the query, its first word the source: `/pat`, `Find name` (fuzzy), `Grep text` (literal), `Recent`, `Panes`, `Symbols`, `All`. #keys("Ctrl-n", "Ctrl-p") step, #key("Enter") lands and keeps the rows, #key("Esc") puts things back. #word("Help"), #word("Tutor"). diff --git a/docs/typ/guide.typ b/docs/typ/guide.typ index e73eabaf..985d324d 100644 --- a/docs/typ/guide.typ +++ b/docs/typ/guide.typ @@ -307,13 +307,18 @@ Nothing is shown, and nothing asked of jj, until a word is run. [#word("Churn") `window` (#key("SPC t u"))], [counts, for each declaration, the window's changes that touched it, and shows them in this view; the window a revset, or a span of time back from now (`3d`, `2w`, `6m`, `1y`). Bare: hidden or shown again; with none counted yet, the file's whole history], [#keys("] g", "[ g")], [the next and the previous change's first line], [`path@rev`, `path@rev:line`], [the file at a revision (#doc("guide", section: "revision")): a #word("Look") anywhere opens it], + [#word("Diff") `change` `path:line`], [a jj change's patch, its header (ids, author, dates, the whole message) above its hunks, in its own `+Diff`, the cursor on `path`'s line in it; a #word("Look") on a change id (eight of its letters, `k` to `z`, as `jj log` shows them) anywhere opens it at its top], ) *Lanes.* Each pinned change gets a lane after the line number, from its -first line to its last, in the theme's accents in hue order (a colour too -close to the one before it skipped), oldest first; a change that rewrote -lines inside another's steps a lane to the right on those rows. A line -one added whole is green across the line. +first line to its last; a change that rewrote lines inside another's +steps a lane to the right on those rows. With one change pinned (bare +`Changes`, a diff) its lane is the diff's own colours: green beside the +lines it wrote, red beside what it took away; with several, each its own +of the theme's accents in hue order (a colour too close to the one before +it skipped), oldest first, so they are told apart. At a change's +description its lane ends in an arrow to it. A line one added whole is +green across the line. *Ghost rows.* What the file no longer has is drawn where it stood, a row of its own with no number: a line a change took away whole, red across; @@ -321,10 +326,12 @@ a line a change changed, its old text right above it with the words that went red, and on the line the words that came green (the patch view's alignment says which lines are one line changed); each change's description, `id title author age` (`3w`, `4m`), after its last line, in -its lane's colour, at one place after that change's own ghost rows. A -ghost row is not text: the cursor steps over it, search, selection and -the line numbers do not see it, and a #btn("B3") on one opens its line in -the revision it came from (`path@id-:line`; a description, `path@id`). It +its lane's colour (one change pinned: its id in the theme's keyword +colour), at one place after that change's own +ghost rows. The cursor steps over a ghost row, and search, selection and +the line numbers do not see it; a #btn("B3") on one looks at the word +there as anywhere, and on a description's id opens that change's patch +at the row for its last line here (`Diff id path:line`). It moves the rows below down in this view alone. It is one row, cut where the pane ends (never wrapped); in a narrow pane a description's title is cut, its author and age kept. A hunk that took away more than 1,024 -- cgit v1.3