summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-29 18:39:54 -0300
committerGabriel Schneider <[email protected]>2026-10-29 19:38:53 -0300
commitb3b2768cc82105fa2a1845b7a7a3767c51173afb (patch)
tree053c3af65f75a9218485684c786ddf5dbbfc8d49
parent74286e81e88a6df7586ead9e8bcd503d44446a85 (diff)
downloadpardes-b3b2768cc82105fa2a1845b7a7a3767c51173afb.tar.gz
pardes-b3b2768cc82105fa2a1845b7a7a3767c51173afb.zip
docs/next-daemon.md: phase 4's gates and perf (every cell inside its A/A), and what is not done; ponytail marks for the shortcuts left (a paste shared by every terminal, a second window's hit test, one display density per process)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
-rw-r--r--docs/next-daemon.md66
-rw-r--r--src/gui/gui.zig7
-rw-r--r--src/tty/tty.zig2
3 files changed, 72 insertions, 3 deletions
diff --git a/docs/next-daemon.md b/docs/next-daemon.md
index b5939b9d..3d4c8a08 100644
--- a/docs/next-daemon.md
+++ b/docs/next-daemon.md
@@ -382,6 +382,17 @@ the ponytail lens:
steps, each with its own size; `zig build replay` runs its seeds at one
view and at three. The GUI's test feed takes `ESC]777;view;<k>BEL`, and
PARDES_TEST_VIEWS=N opens N more hidden windows, captured under view-k.
+- **Not done, and why.**
+ - A view of the other kind (a terminal on a window session, a window on
+ a terminal's): each process links one frontend; the daemon still
+ matches kinds.
+ - 9P acts in the live view, the one whose client spoke last: no view is
+ named in a path yet (a script's focus or layout is that view's).
+ - Every change draws every view (`needs_frame` is the session's); a
+ view's own dirtiness waits for a measurement that wants it.
+ - Prompts are the pane's: a `.name` prompt drafted in one view is
+ closed by another view's step, where that pane has not the keyboard.
+ - Dump, Restore and Handover keep one view, the live one.
- **What proved wrong in the design.** "Views" in the design were a
struct the core reads through; the swap made them cheaper and kept every
reference. Its rollback copy (phase 5) is the same list of fields. The
@@ -391,9 +402,60 @@ the ponytail lens:
other's tag heights. And the census's single "frontend kind" leak is not
per process but per client: kitty graphics are a terminal's.
-Measured: PERF_TABLE
+Measured: ReleaseFast, the base binaries from before the rework against
+this line on phase 1's merge (vvmuwntp, before main's tty throughput
+fix), interleaved base, new, base ... in one run on the perf cores, then
+an A/A of the base against itself the same way; the ratio of the medians
+of runs, new/base (4 runs of new, 5 of base; `--reps 25` for the core,
+`--live` and `--live-gui` through the 32 MiB live driver):
-Gates: GATES_TABLE
+| | new/base | A/A |
+|---|---|---|
+| core, medium: render, keys, PageDown, wheel | 0.97-1.02 | 0.99-1.01 |
+| core, medium: edit-char, edit-twin, deep-sel | 0.90-0.96 | 0.99-1.00 |
+| core, medium: open, body-2m, body-appends | 0.94-1.02 | 0.88-1.08 |
+| tty, keystroke to present p50 (5 gestures) | 0.94-1.11 | 0.90-1.02 |
+| tty, the core's part of it p50 | 0.95-1.04 | 0.86-0.99 |
+| tty, `yes \| head -c 32M` wall; 1M-line open | 0.96; 0.98 | 1.09; 1.02 |
+| GUI, keystroke to present p50 (present-bound, 30 ms) | 0.98-1.01 | 1.03-1.10 |
+| GUI, the core's part of it p50 | 0.84-1.01 | 1.01-1.19 |
+
+Every cell is inside its A/A; the widest, the tty's PageDown at 1.11
+(runs 386-506 us against 410-451), is 0.94 best against best. What one
+view pays is a byte test in the pump, the step's sync and an edit
+(`views.several`), a store a key, an index for the live terminal or
+window, and a `from` never posted. A first A/B, of this line before the
+rebase onto phase 1's merge (its render still made the geometry afresh
+every frame), read the GUI's core at 0.89-1.16 with no A/A to set it
+against; it is not the one reported.
+
+Two views (not gated): every frame draws both, so a change costs two
+renders; a view switch copies ~60 fields and each pane's share, a few
+microseconds.
+
+Gates, on the line rebased onto main's tty throughput fix (qzsouslm):
+
+- `zig build replay -Dplatform=tty`: 112 snapshot scripts pass (the 110,
+ views.snap and views-term.snap), their 130 tapes replay in all three
+ replicas (390 runs, 29,355 digests); 20 monkey seeds at one view (60
+ runs, 14,010 digests) and 20 at three views (60 runs, 9,720 digests);
+ no divergence, no panic. views.snap: 75 digests a replica,
+ views-term.snap 35.
+- Unit tests: tty 1478 of 1498 pass, 20 skipped; GUI 1549 of 1560, 9
+ skipped and 2 failed, the same two that fail on phase 1's line (`tagline
+ pointer mapping retains physical grips...` and `a tag caret past its
+ row's end glides...`). The views' own: 7 (own cursor, scroll, mode,
+ layout and focus; an edit and a register shared; a terminal sized by its
+ last typist; views closing; the other views drawn leave the digest; a
+ view keeps its place in a text another edits).
+- test/fs.py passes (with a TMPDIR short enough for the 9P sockets'
+ paths). test/daemon.py: 20 detach and attach cycles, then a second
+ terminal on the attached session, both drawn, detached from inside and
+ then closed outright, the first drawing on, and the kill and Adopt;
+ `--gui`: 10 window cycles, then a second window on the open one,
+ detached alone.
+- `pardes-monkey --views=3 --tape` found the one divergence fixed here
+ (the drawn views' post_present).
## FreeBSD notes
diff --git a/src/gui/gui.zig b/src/gui/gui.zig
index 2d9124cc..a342cfe2 100644
--- a/src/gui/gui.zig
+++ b/src/gui/gui.zig
@@ -2333,6 +2333,9 @@ fn reopenWindow(g: *Gui) bool {
g.window = window;
if (g.window_slot) |slot| slot.* = window;
updateDisplayScale(window);
+ // ponytail: another view's window asks the hit test of whichever
+ // window's share the Gui holds then (the workspace tag sits in the same
+ // place in every view); a test per window if one moves it.
if (!g.capture) _ = c.SDL_SetWindowHitTest(window, hitTest, g);
_ = c.SDL_StartTextInput(window);
return true;
@@ -9604,7 +9607,9 @@ fn rulePx(chrome: *const pardes.Chrome) f32 {
/// by which every size given in logical pixels is drawn, as acme scales its
/// Border, ButtonBorder and Scrollgap (scalesize). Cells, glyphs and what is
/// measured in them are already the display's pixels and are not scaled.
-/// ponytail: one window per process, so one global; per window if ever two.
+/// ponytail: one per process: a session's windows (views.zig) on screens
+/// of two densities draw at the density of the last one opened or moved;
+/// a field of `window_fields` when that matters.
var display_scale: f32 = 1;
/// The window's display scale, or PARDES_TEST_SCALE (a harness forcing 2x);
diff --git a/src/tty/tty.zig b/src/tty/tty.zig
index b56e74b1..a7048645 100644
--- a/src/tty/tty.zig
+++ b/src/tty/tty.zig
@@ -1677,6 +1677,8 @@ const Shell = struct {
pipe_tasks: PipeTasks = .{},
threads_ok: bool = false,
check_files: bool = false,
+ // ponytail: one bracketed paste at a time for every terminal: keys
+ // another terminal sends while one pastes join its paste.
in_paste: bool = false,
/// PARDES_TEST_CLOCK's virtual time (host_io.testClock), and where the
/// running-out wait moves it: the core's next wake.