summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-08-10 17:23:18 -0300
committerGabriel Schneider <[email protected]>2026-08-11 09:58:59 -0300
commita797a1ab2f648e773f7a1b28d12bf9441b9f13f4 (patch)
tree45db37a3d190425b3ca2453d46c57d2af27cfc93 /test
parenteb11ab331b4e13e2b9e5a673a4c012d22fdd1d9c (diff)
downloadpardes-a797a1ab2f648e773f7a1b28d12bf9441b9f13f4.tar.gz
pardes-a797a1ab2f648e773f7a1b28d12bf9441b9f13f4.zip
macos: pixel attachments, live theming, and a signed app
The AppKit shell now draws what the core renders, follows the theme without a relaunch, and builds into something you can hand to someone. - Pixel attachments. Surface.images was dropped on the floor here, so a PDF pane showed nothing at all: native_images is now set, pardes_image_s carries the geometry the core already clipped, and PardesView keeps one CGImage per (serial, page, revision) so scrolling costs a draw and not a decode. Image panes get real pixels instead of the petscii fallback. - Themes take hold live. pardes_tick never advanced the chrome animation, so every tagline kept the previous theme's colours until the next launch and the 16 ms re-pump spun for the rest of the session. pardes_theme_bg retires the hand-agreed #121212 and drives the window background and the titlebar appearance; a theme with no background of its own now gets a transparent window over an NSVisualEffectView. - The cell snaps to whole DEVICE pixels rather than whole points. Monaco advances 8.4014pt at 14, so ceiling to 9 spaced every column 7.1% wider than the face was drawn for. - The dial is one notch per 10 degrees instead of 20, and a release keeps turning in proportion to how hard it was thrown -- ramping up from zero at the floor, so a slow twist coasts not a little but not at all. - A file dropped on the grid is a click plus Look, so it opens beside the pane it was dropped on. No drop concept was added to the core. - The titlebar follows the focused pane: proxy icon, filename, and the dirty dot. File.saved_revision is the watermark that last one needed. - Config (SPC f c) prints the resolved startup config path. - build.zig assembles, signs and packages the bundle itself; build-app.sh is gone. -Dmacos-identity= takes a Developer ID, macos-dmg makes the image, and the icon is Glenda.
Diffstat (limited to 'test')
-rw-r--r--test/macos-snapshots/boot.golden4
-rw-r--r--test/macos-snapshots/drop.golden94
-rw-r--r--test/macos-snapshots/drop.snap37
-rw-r--r--test/macos-snapshots/font.golden11
-rw-r--r--test/macos-snapshots/rotate.golden362
-rw-r--r--test/macos-snapshots/rotate.snap66
-rw-r--r--test/macos-snapshots/trackpad.golden2
-rw-r--r--test/macos_e2e.swift33
-rw-r--r--test/snapshots/builtins.golden192
-rw-r--r--test/snapshots/builtins.snap10
-rw-r--r--test/snapshots/leader.golden40
-rw-r--r--test/snapshots/ttyhelp.golden72
12 files changed, 628 insertions, 295 deletions
diff --git a/test/macos-snapshots/boot.golden b/test/macos-snapshots/boot.golden
index 28e5a1de..1c971b3f 100644
--- a/test/macos-snapshots/boot.golden
+++ b/test/macos-snapshots/boot.golden
@@ -23,7 +23,7 @@
|
|
|
-== draw boot 720x408 nonblank
+== draw boot 680x396 nonblank
== snap resized grid=100x30 cursor=4,2
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
|$ /private/tmp/pardes-macos-e2e/boot/cwd New Del
@@ -55,4 +55,4 @@
|
|
|
-== draw resized 900x510 nonblank
+== draw resized 850x495 nonblank
diff --git a/test/macos-snapshots/drop.golden b/test/macos-snapshots/drop.golden
new file mode 100644
index 00000000..b4143983
--- /dev/null
+++ b/test/macos-snapshots/drop.golden
@@ -0,0 +1,94 @@
+== snap booted grid=100x30 cursor=4,3
+|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
+|$ /private/tmp/pardes-macos-e2e/drop/cwd New Del
+| $ printf 'first file\n' > one.txt; printf 'second file\n' > two.txt
+| $
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+== snap dropped_on_shell grid=100x30 cursor=7,2
+|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
+| /private/tmp/pardes-macos-e2e/drop/cwd/one.txt S$ /private/tmp/pardes-macos-e2e/drop/cwd New Del
+| 1 first file $ printf 'first file\n' > one.txt; printf 'secon
+| 2 d file\n' > two.txt
+| $
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+== snap dropped_on_document grid=100x30 cursor=7,17
+|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
+| /private/tmp/pardes-macos-e2e/drop/cwd/one.txt S$ /private/tmp/pardes-macos-e2e/drop/cwd New Del
+| 1 first file $ printf 'first file\n' > one.txt; printf 'secon
+| 2 d file\n' > two.txt
+| $
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| /private/tmp/pardes-macos-e2e/drop/cwd/two.txt S
+| 1 second file
+| 2
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+== draw drop 850x495 nonblank
diff --git a/test/macos-snapshots/drop.snap b/test/macos-snapshots/drop.snap
new file mode 100644
index 00000000..f427fe2a
--- /dev/null
+++ b/test/macos-snapshots/drop.snap
@@ -0,0 +1,37 @@
+# A file dropped ON the grid opens beside the pane it was dropped on.
+#
+# Finder and the Dock already reach the app through application(_:open:), but
+# that path cannot say WHERE — it opens next to whichever pane happened to have
+# focus. A drop knows where the hand was, and in acme that is the whole
+# difference: `Look` places the document relative to the pane it runs in.
+#
+# So a drop is defined as a CLICK followed by `Look`, and nothing more. The
+# click focuses the pane under the pointer exactly as a left click there would,
+# then the ordinary builtin runs in it. There is no drop concept in the core
+# and none was added — everything here the hand could have done itself.
+#
+# `drop` drives PardesView.drop, one call below performDragOperation, because
+# NSDraggingInfo is a protocol with no public conformer: a test that had to
+# build one would be testing its own stub. See the trackpad scripts for the
+# same reasoning about NSTouch and pressure stages.
+start 30 100
+wait 8000 $
+stable 700 20000
+text printf 'first file\n' > one.txt; printf 'second file\n' > two.txt
+key enter
+wait 8000 $
+stable 700 20000
+snap booted
+# Dropped on the shell: one.txt opens as a document beside it. Absolute,
+# because the core resolves a relative Look against the PANE's directory —
+# the same absolute path the AppKit side builds out of an NSURL.
+drop /private/tmp/pardes-macos-e2e/drop/cwd/one.txt 10 6
+stable 700 15000
+snap dropped_on_shell
+# ...and now the placement is the assertion. Dropping the SECOND file inside
+# the pane the first one opened puts it next to that pane, not next to the
+# shell — which is only true because the click went where the pointer was.
+drop /private/tmp/pardes-macos-e2e/drop/cwd/two.txt 10 20
+stable 700 15000
+snap dropped_on_document
+draw drop
diff --git a/test/macos-snapshots/font.golden b/test/macos-snapshots/font.golden
index e61abecd..759e7738 100644
--- a/test/macos-snapshots/font.golden
+++ b/test/macos-snapshots/font.golden
@@ -73,9 +73,9 @@
|
|
|
-== snap bigger grid=81x19 cursor=4,2
+== snap bigger grid=77x18 cursor=4,2
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-|$ /private/tmp/pardes-macos-e2e/font/cwd New Del
+|$ /private/tmp/pardes-macos-e2e/font/cwd New Del
| $
|
|
@@ -92,7 +92,6 @@
|
|
|
-|
== snap reset grid=100x24 cursor=4,2
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
|$ /private/tmp/pardes-macos-e2e/font/cwd New Del
@@ -118,9 +117,9 @@
|
|
|
-== snap floor grid=225x58 cursor=4,2
+== snap floor grid=242x56 cursor=4,2
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
-|$ /private/tmp/pardes-macos-e2e/font/cwd New Del
+|$ /private/tmp/pardes-macos-e2e/font/cwd New Del
| $
|
|
@@ -175,5 +174,3 @@
|
|
|
-|
-|
diff --git a/test/macos-snapshots/rotate.golden b/test/macos-snapshots/rotate.golden
index 54f0d217..f0cc1eac 100644
--- a/test/macos-snapshots/rotate.golden
+++ b/test/macos-snapshots/rotate.golden
@@ -1,156 +1,280 @@
-== snap results grid=100x30 cursor=4,8
+== snap results grid=100x30 cursor=4,25
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
| /private/tmp/pardes-macos-e2e/rotate/cwd New Del
-|
-| x MARK a
| zz
-| x MARK b
+| x MARK 14
+| zz
+| x MARK 15
+| zz
+| x MARK 16
+| zz
+| x MARK 17
+| zz
+| x MARK 18
+| zz
+| x MARK 19
+| zz
+| x MARK 20
+| zz
+| x MARK 21
+| zz
+| x MARK 22
+| zz
+| x MARK 23
+| zz
+| x MARK 24
| zz
-| x MARK c
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
|
| /private/tmp/pardes-macos-e2e/rotate/cwd/+Search New Del
-| 1 @p0:2:3-6 x MARK a
-| 2 @p0:4:3-6 x MARK b
-| 3 @p0:6:3-6 x MARK c
-== snap forward grid=100x30 cursor=7,3
+| 1 @p0:3:3-6 x MARK 01
+| 2 @p0:5:3-6 x MARK 02
+| 3 @p0:7:3-6 x MARK 03
+== snap forward grid=100x30 cursor=7,4
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
| /private/tmp/pardes-macos-e2e/rotate/cwd New Del
|
-| x MARK a
+|
+| x MARK 01
| zz
-| x MARK b
+| x MARK 02
+| zz
+| x MARK 03
+| zz
+| x MARK 04
+| zz
+| x MARK 05
+| zz
+| x MARK 06
+| zz
+| x MARK 07
+| zz
+| x MARK 08
+| zz
+| x MARK 09
+| zz
+| x MARK 10
+| zz
+| x MARK 11
| zz
-| x MARK c
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
| /private/tmp/pardes-macos-e2e/rotate/cwd/+Search New Del
-| 1 @p0:2:3-6 x MARK a
-| 2 @p0:4:3-6 x MARK b
-| 3 @p0:6:3-6 x MARK c
-== snap forward2 grid=100x30 cursor=7,5
+| 1 @p0:3:3-6 x MARK 01
+| 2 @p0:5:3-6 x MARK 02
+| 3 @p0:7:3-6 x MARK 03
+== snap forward2 grid=100x30 cursor=7,6
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
| /private/tmp/pardes-macos-e2e/rotate/cwd New Del
|
-| x MARK a
+|
+| x MARK 01
| zz
-| x MARK b
+| x MARK 02
+| zz
+| x MARK 03
+| zz
+| x MARK 04
+| zz
+| x MARK 05
+| zz
+| x MARK 06
+| zz
+| x MARK 07
+| zz
+| x MARK 08
+| zz
+| x MARK 09
+| zz
+| x MARK 10
+| zz
+| x MARK 11
| zz
-| x MARK c
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
| /private/tmp/pardes-macos-e2e/rotate/cwd/+Search New Del
-| 1 @p0:2:3-6 x MARK a
-| 2 @p0:4:3-6 x MARK b
-| 3 @p0:6:3-6 x MARK c
-== snap back grid=100x30 cursor=7,5
+| 1 @p0:3:3-6 x MARK 01
+| 2 @p0:5:3-6 x MARK 02
+| 3 @p0:7:3-6 x MARK 03
+== snap back grid=100x30 cursor=7,6
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
| /private/tmp/pardes-macos-e2e/rotate/cwd New Del
|
-| x MARK a
+|
+| x MARK 01
| zz
-| x MARK b
+| x MARK 02
| zz
-| x MARK c
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
+| x MARK 03
+| zz
+| x MARK 04
+| zz
+| x MARK 05
+| zz
+| x MARK 06
+| zz
+| x MARK 07
+| zz
+| x MARK 08
+| zz
+| x MARK 09
+| zz
+| x MARK 10
+| zz
+| x MARK 11
+| zz
+| /private/tmp/pardes-macos-e2e/rotate/cwd/+Search New Del
+| 1 @p0:3:3-6 x MARK 01
+| 2 @p0:5:3-6 x MARK 02
+| 3 @p0:7:3-6 x MARK 03
+== snap forward_by_key grid=100x30 cursor=7,8
+|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
+| /private/tmp/pardes-macos-e2e/rotate/cwd New Del
|
|
+| x MARK 01
+| zz
+| x MARK 02
+| zz
+| x MARK 03
+| zz
+| x MARK 04
+| zz
+| x MARK 05
+| zz
+| x MARK 06
+| zz
+| x MARK 07
+| zz
+| x MARK 08
+| zz
+| x MARK 09
+| zz
+| x MARK 10
+| zz
+| x MARK 11
+| zz
+| /private/tmp/pardes-macos-e2e/rotate/cwd/+Search New Del
+| 1 @p0:3:3-6 x MARK 01
+| 2 @p0:5:3-6 x MARK 02
+| 3 @p0:7:3-6 x MARK 03
+== snap placed grid=100x30 cursor=7,8
+|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
+| /private/tmp/pardes-macos-e2e/rotate/cwd New Del
|
|
+| x MARK 01
+| zz
+| x MARK 02
+| zz
+| x MARK 03
+| zz
+| x MARK 04
+| zz
+| x MARK 05
+| zz
+| x MARK 06
+| zz
+| x MARK 07
+| zz
+| x MARK 08
+| zz
+| x MARK 09
+| zz
+| x MARK 10
+| zz
+| x MARK 11
+| zz
+| /private/tmp/pardes-macos-e2e/rotate/cwd/+Search New Del
+| 1 @p0:3:3-6 x MARK 01
+| 2 @p0:5:3-6 x MARK 02
+| 3 @p0:7:3-6 x MARK 03
+== snap placed_released grid=100x30 cursor=7,8
+|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
+| /private/tmp/pardes-macos-e2e/rotate/cwd New Del
|
|
+| x MARK 01
+| zz
+| x MARK 02
+| zz
+| x MARK 03
+| zz
+| x MARK 04
+| zz
+| x MARK 05
+| zz
+| x MARK 06
+| zz
+| x MARK 07
+| zz
+| x MARK 08
+| zz
+| x MARK 09
+| zz
+| x MARK 10
+| zz
+| x MARK 11
+| zz
+| /private/tmp/pardes-macos-e2e/rotate/cwd/+Search New Del
+| 1 @p0:3:3-6 x MARK 01
+| 2 @p0:5:3-6 x MARK 02
+| 3 @p0:7:3-6 x MARK 03
+== snap thrown grid=100x30 cursor=7,16
+|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
+| /private/tmp/pardes-macos-e2e/rotate/cwd New Del
|
|
+| x MARK 01
+| zz
+| x MARK 02
+| zz
+| x MARK 03
+| zz
+| x MARK 04
+| zz
+| x MARK 05
+| zz
+| x MARK 06
+| zz
+| x MARK 07
+| zz
+| x MARK 08
+| zz
+| x MARK 09
+| zz
+| x MARK 10
+| zz
+| x MARK 11
+| zz
| /private/tmp/pardes-macos-e2e/rotate/cwd/+Search New Del
-| 1 @p0:2:3-6 x MARK a
-| 2 @p0:4:3-6 x MARK b
-| 3 @p0:6:3-6 x MARK c
-== snap forward_by_key grid=100x30 cursor=7,7
+| 5 @p0:11:3-6 x MARK 05
+| 6 @p0:13:3-6 x MARK 06
+| 7 @p0:15:3-6 x MARK 07
+== snap thrown_coasted grid=100x30 cursor=7,22
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
| /private/tmp/pardes-macos-e2e/rotate/cwd New Del
-|
-| x MARK a
+| x MARK 07
| zz
-| x MARK b
+| x MARK 08
+| zz
+| x MARK 09
+| zz
+| x MARK 10
+| zz
+| x MARK 11
+| zz
+| x MARK 12
+| zz
+| x MARK 13
+| zz
+| x MARK 14
+| zz
+| x MARK 15
+| zz
+| x MARK 16
+| zz
+| x MARK 17
+| zz
+| x MARK 18
| zz
-| x MARK c
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
-|
| /private/tmp/pardes-macos-e2e/rotate/cwd/+Search New Del
-| 1 @p0:2:3-6 x MARK a
-| 2 @p0:4:3-6 x MARK b
-| 3 @p0:6:3-6 x MARK c
-== draw rotate 900x510 nonblank
+| 15 @p0:31:3-6 x MARK 15
+| 16 @p0:33:3-6 x MARK 16
+| 17 @p0:35:3-6 x MARK 17
+== draw rotate 850x495 nonblank
diff --git a/test/macos-snapshots/rotate.snap b/test/macos-snapshots/rotate.snap
index 17b239f4..1f2e4667 100644
--- a/test/macos-snapshots/rotate.snap
+++ b/test/macos-snapshots/rotate.snap
@@ -5,21 +5,26 @@
# kind of thing a unit test on the accumulator cannot catch and a golden can:
# what the screen does is the assertion.
#
-# One notch is 20 degrees (rotation_notch_degrees in src/macos.zig) and the
-# remainder is banked, which makes the pair below exact rather than approximate:
-# -25 spends one notch and banks -5, then +25 lands on 20 and spends one back.
+# One notch is 10 degrees (rotation_notch_degrees in src/macos.zig) and the
+# remainder is banked, which makes the pairs below exact rather than
+# approximate: -12 spends one notch and banks -2.
start 30 100
wait 8000 New Newcol
wait 8000 $
stable 700 20000
-text printf 'x MA''RK a\nzz\nx MA''RK b\nzz\nx MA''RK c\n'
+# Twenty-four hits, not three. A coast is worth asserting only on a list long
+# enough to coast ALONG: `n` at the last match has nowhere to go, so on a
+# three-hit list the hardest possible flick and no flick at all produce the
+# same screen — which is a golden that would have passed before momentum
+# existed. printf reuses its format once per argument.
+text printf 'x MA''RK %s\nzz\n' 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
key enter
-wait 10000 MARK c
+wait 10000 MARK 24
stable 700 10000
key c-b
stable 600 8000
# `/` types the pattern into the tag; Enter searches the pane's scrollback and
-# writes the three hits into a +Search buffer, which is what n/N walk.
+# writes the hits into a +Search buffer, which is what n/N walk.
text /
stable 400 5000
text MARK
@@ -32,25 +37,25 @@ snap results
# twist cannot make the first degree of this one jump a match.
rotate 0
# Clockwise: one notch of `n`, forward onto the first hit and selecting it.
-rotate -25
+rotate -12
stable 700 15000
snap forward
# ...and again, onto the second. Two steps out rather than one, because the
# first hit is where the list already starts: stepping BACK from it has nowhere
# to go, and a golden that cannot move is a golden that proves nothing about
# which way the dial turns.
-rotate -25
+rotate -12
stable 700 15000
snap forward2
# A new gesture, because the dial banks its remainder exactly like the scroll
-# accumulator does: two 25-degree notches leave -10 behind, so reversing INSIDE
-# the same twist would have to spend that first and 25 back would move nothing.
+# accumulator does: two 12-degree notches leave -4 behind, so reversing INSIDE
+# the same twist would have to spend that first and 12 back would move nothing.
# That hysteresis is wanted — it is what stops a thumb resettling on a notch
# boundary from flip-flopping between two matches — and lifting the fingers is
# how a hand clears it.
rotate 0
# Counterclockwise: `N`. This must land back exactly on `forward`.
-rotate 25
+rotate 12
stable 700 15000
snap back
# And the other half of the contract: a twist IS the keystroke, so typing the
@@ -60,4 +65,43 @@ snap back
text n
stable 700 15000
snap forward_by_key
+# ---- momentum ----
+#
+# The dial coasts in proportion to how fast it was RELEASED, ramping up from
+# zero at the floor rather than switching on at it. Both halves of that are
+# here, and the gap argument is what makes them different: it is a real sleep
+# before the event, so libpardes measures a real speed off its clock.
+#
+# PLACED. Four degrees every 100 ms is 40 deg/s, under the 70 deg/s floor, so
+# lifting the fingers changes nothing at all — the twist itself has moved one
+# notch and that is where it stops. This is the case that has to hold: a slow
+# deliberate turn that kept sliding afterwards would be unusable.
+rotate 0
+rotate -4 100
+rotate -4 100
+rotate -4 100
+stable 700 15000
+snap placed
+rotate_end
+stable 700 15000
+# Byte-identical to `placed`, which is the whole assertion.
+snap placed_released
+# THROWN. The same twist delivered in 5 ms slices is hundreds of degrees a
+# second, so the release keeps the list walking after the fingers are gone.
+#
+# `snap` and then `rotate_end` with NO `stable` between them, which is not
+# impatience: a release is only a throw if it arrives while the hand is still
+# moving, and a 700 ms wait here would be a hand that stopped — which is
+# exactly what the PLACED case above already proves. The snapshot is a frame
+# read, far inside the 90 ms that separates the two.
+rotate 0
+rotate -12 5
+rotate -12 5
+rotate -12 5
+snap thrown
+rotate_end
+stable 700 15000
+# ...and this one must NOT match `thrown`: the fling moved on its own, after
+# the gesture was over. That difference IS the feature.
+snap thrown_coasted
draw rotate
diff --git a/test/macos-snapshots/trackpad.golden b/test/macos-snapshots/trackpad.golden
index 82edf68b..5a82ea85 100644
--- a/test/macos-snapshots/trackpad.golden
+++ b/test/macos-snapshots/trackpad.golden
@@ -308,4 +308,4 @@
| 1 @p0:2:3-6 x MARK a
| 2 @p0:4:3-6 x MARK b
| 3 @p0:6:3-6 x MARK c
-== draw trackpad 900x510 nonblank
+== draw trackpad 850x495 nonblank
diff --git a/test/macos_e2e.swift b/test/macos_e2e.swift
index ba0c48f0..42bc8229 100644
--- a/test/macos_e2e.swift
+++ b/test/macos_e2e.swift
@@ -609,12 +609,45 @@ private final class Driver: PardesViewDelegate {
view.click(Trackpad.forceClickButton, at: cell)
pump()
+ // `rotate <degrees> [gap_ms]`. The optional gap is a real sleep BEFORE
+ // the event, and it is the only way a script can say how FAST the dial
+ // is being turned: libpardes measures the release speed off the
+ // monotonic clock between events, so back-to-back script calls read as
+ // an impossibly hard flick. Pace them and a slow twist is genuinely
+ // slow — which is the half of the momentum contract worth asserting,
+ // because "no fling" is not something a fling test can show.
case "rotate":
let view = try live()
let degrees = try double(args, 0, "rotate degrees")
+ if args.count > 1 {
+ Thread.sleep(forTimeInterval: try double(args, 1, "rotate gap_ms") / 1000)
+ }
view.rotate(degrees: CGFloat(degrees))
pump()
+ // The fingers coming off. Its own command because the fling is decided
+ // by the RELEASE SPEED, and a script that could only turn the dial
+ // could never throw it — NSEvent phases have no public constructor, so
+ // this entry point is the only way the momentum path is reachable at
+ // all. The coast is then spent by the pump, at one fixed step per tick.
+ case "rotate_end":
+ let view = try live()
+ view.rotateEnd()
+ pump()
+
+ // `drop <path> <col> <row>`: a file dropped ON the grid at that cell.
+ // Same reason as the two above — `NSDraggingInfo` is a protocol with a
+ // dozen members and no public conformer, so the entry point below the
+ // event is the only honest way in. What it must prove is the WHERE: a
+ // drop is a click plus Look, so the document lands beside the pane
+ // pointed at rather than beside whichever one had focus.
+ case "drop":
+ let view = try live()
+ let path = try token(args, 0, "drop path")
+ let cell = try gridPoint(args, 1, "drop")
+ view.drop([path], at: cell)
+ pump()
+
case "scroll":
let view = try live()
let rows = try double(args, 0, "scroll rows")
diff --git a/test/snapshots/builtins.golden b/test/snapshots/builtins.golden
index 7e4b3366..a54b8281 100644
--- a/test/snapshots/builtins.golden
+++ b/test/snapshots/builtins.golden
@@ -100,26 +100,26 @@
| 6 SPC c d Delcol
| 7 SPC c n Newcol topbar
| 8 SPC d Del
-| 9 SPC f f Find topbar
-| 10 SPC f g Grep topbar
-| 11 SPC f n New topbar
-| 12 SPC f s Save
-| 13 SPC h t Tutor topbar
-| 14 SPC j i Forward C-i
-| 15 SPC j j Last
-| 16 SPC j l Jumplist
-| 17 SPC j o Back C-o
-| 18 SPC k Kill topbar
-| 19 SPC l D WsDiagnostics
-| 20 SPC l S WsSymbols
-| 21 SPC l a CodeAction
-| 22 SPC l d Diagnostics
-| 23 SPC l h SelectRefs
-| 24 SPC l i Lspinfo
-| 25 SPC l k Hover
-| 26 SPC l r Rename
-| 27 SPC l s Symbols
-| 28 SPC l w Lspwhy
+| 9 SPC f c Config
+| 10 SPC f f Find topbar
+| 11 SPC f g Grep topbar
+| 12 SPC f n New topbar
+| 13 SPC f s Save
+| 14 SPC h t Tutor topbar
+| 15 SPC j i Forward C-i
+| 16 SPC j j Last
+| 17 SPC j l Jumplist
+| 18 SPC j o Back C-o
+| 19 SPC k Kill topbar
+| 20 SPC l D WsDiagnostics
+| 21 SPC l S WsSymbols
+| 22 SPC l a CodeAction
+| 23 SPC l d Diagnostics
+| 24 SPC l h SelectRefs
+| 25 SPC l i Lspinfo
+| 26 SPC l k Hover
+| 27 SPC l r Rename
+| 28 SPC l s Symbols
== snap index-tail grid=120x60 cursor=7,58
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
| /tmp/pardes-snap/builtins/cwd/notes.txt Save New Del
@@ -153,34 +153,34 @@
|
|
| /tmp/pardes-snap/builtins/cwd/+Help New Del
-| 25 SPC l k Hover
-| 26 SPC l r Rename
-| 27 SPC l s Symbols
-| 28 SPC l w Lspwhy
-| 29 SPC s d Dump topbar
-| 30 SPC s r Restore
-| 31 SPC t a Ascii
-| 32 SPC t b Tagbottom
-| 33 SPC t c Colors
-| 34 SPC t d Debug topbar
-| 35 SPC t i PdfTint
-| 36 SPC t l Palette
-| 37 SPC t n NextColor topbar
-| 38 SPC t p Petscii
-| 39 SPC t r Crt
-| 40 SPC t s PdfSections
-| 41 SPC t t ThemeSel
-| 42 SPC t w Wrap
-| 43 SPC t z PdfFit
-| 44 SPC w h Left C-w h, C-w left
-| 45 SPC w j Down C-w j, C-w down
-| 46 SPC w k Up C-w k, C-w up
-| 47 SPC w l Right C-w l, C-w right
-| 48 Look enter, right-click
-| 49 Exec tab, middle-click
-| 50 Theme
-| 51 Shell
-| 52
+| 26 SPC l k Hover
+| 27 SPC l r Rename
+| 28 SPC l s Symbols
+| 29 SPC l w Lspwhy
+| 30 SPC s d Dump topbar
+| 31 SPC s r Restore
+| 32 SPC t a Ascii
+| 33 SPC t b Tagbottom
+| 34 SPC t c Colors
+| 35 SPC t d Debug topbar
+| 36 SPC t i PdfTint
+| 37 SPC t l Palette
+| 38 SPC t n NextColor topbar
+| 39 SPC t p Petscii
+| 40 SPC t r Crt
+| 41 SPC t s PdfSections
+| 42 SPC t t ThemeSel
+| 43 SPC t w Wrap
+| 44 SPC t z PdfFit
+| 45 SPC w h Left C-w h, C-w left
+| 46 SPC w j Down C-w j, C-w down
+| 47 SPC w k Up C-w k, C-w up
+| 48 SPC w l Right C-w l, C-w right
+| 49 Look enter, right-click
+| 50 Exec tab, middle-click
+| 51 Theme
+| 52 Shell
+| 53
== snap not-a-picker grid=120x60 cursor=7,58
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
| /tmp/pardes-snap/builtins/cwd/notes.txt Save New Del
@@ -214,34 +214,34 @@
|
|
| /tmp/pardes-snap/builtins/cwd/+Help New Del
-| 25 SPC l k Hover
-| 26 SPC l r Rename
-| 27 SPC l s Symbols
-| 28 SPC l w Lspwhy
-| 29 SPC s d Dump topbar
-| 30 SPC s r Restore
-| 31 SPC t a Ascii
-| 32 SPC t b Tagbottom
-| 33 SPC t c Colors
-| 34 SPC t d Debug topbar
-| 35 SPC t i PdfTint
-| 36 SPC t l Palette
-| 37 SPC t n NextColor topbar
-| 38 SPC t p Petscii
-| 39 SPC t r Crt
-| 40 SPC t s PdfSections
-| 41 SPC t t ThemeSel
-| 42 SPC t w Wrap
-| 43 SPC t z PdfFit
-| 44 SPC w h Left C-w h, C-w left
-| 45 SPC w j Down C-w j, C-w down
-| 46 SPC w k Up C-w k, C-w up
-| 47 SPC w l Right C-w l, C-w right
-| 48 Look enter, right-click
-| 49 Exec tab, middle-click
-| 50 Theme
-| 51 Shell
-| 52
+| 26 SPC l k Hover
+| 27 SPC l r Rename
+| 28 SPC l s Symbols
+| 29 SPC l w Lspwhy
+| 30 SPC s d Dump topbar
+| 31 SPC s r Restore
+| 32 SPC t a Ascii
+| 33 SPC t b Tagbottom
+| 34 SPC t c Colors
+| 35 SPC t d Debug topbar
+| 36 SPC t i PdfTint
+| 37 SPC t l Palette
+| 38 SPC t n NextColor topbar
+| 39 SPC t p Petscii
+| 40 SPC t r Crt
+| 41 SPC t s PdfSections
+| 42 SPC t t ThemeSel
+| 43 SPC t w Wrap
+| 44 SPC t z PdfFit
+| 45 SPC w h Left C-w h, C-w left
+| 46 SPC w j Down C-w j, C-w down
+| 47 SPC w k Up C-w k, C-w up
+| 48 SPC w l Right C-w l, C-w right
+| 49 Look enter, right-click
+| 50 Exec tab, middle-click
+| 51 Theme
+| 52 Shell
+| 53
== snap window-group grid=120x60 cursor=7,32
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
| /tmp/pardes-snap/builtins/cwd/notes.txt Save New Del
@@ -344,23 +344,23 @@
| 6 SPC c d Delcol
| 7 SPC c n Newcol topbar
| 8 SPC d Del
-| 9 SPC f f Find topbar
-| 10 SPC f g Grep topbar
-| 11 SPC f n New topbar
-| 12 SPC f s Save
-| 13 SPC h t Tutor topbar
-| 14 SPC j i Forward C-i
-| 15 SPC j j Last
-| 16 SPC j l Jumplist
-| 17 SPC j o Back C-o
-| 18 SPC k Kill topbar
-| 19 SPC l D WsDiagnostics
-| 20 SPC l S WsSymbols
-| 21 SPC l a CodeAction
-| 22 SPC l d Diagnostics
-| 23 SPC l h SelectRefs
-| 24 SPC l i Lspinfo
-| 25 SPC l k Hover
-| 26 SPC l r Rename
-| 27 SPC l s Symbols
-| 28 SPC l w Lspwhy
+| 9 SPC f c Config
+| 10 SPC f f Find topbar
+| 11 SPC f g Grep topbar
+| 12 SPC f n New topbar
+| 13 SPC f s Save
+| 14 SPC h t Tutor topbar
+| 15 SPC j i Forward C-i
+| 16 SPC j j Last
+| 17 SPC j l Jumplist
+| 18 SPC j o Back C-o
+| 19 SPC k Kill topbar
+| 20 SPC l D WsDiagnostics
+| 21 SPC l S WsSymbols
+| 22 SPC l a CodeAction
+| 23 SPC l d Diagnostics
+| 24 SPC l h SelectRefs
+| 25 SPC l i Lspinfo
+| 26 SPC l k Hover
+| 27 SPC l r Rename
+| 28 SPC l s Symbols
diff --git a/test/snapshots/builtins.snap b/test/snapshots/builtins.snap
index 93e33710..f6b5723b 100644
--- a/test/snapshots/builtins.snap
+++ b/test/snapshots/builtins.snap
@@ -49,12 +49,16 @@ stable 700 15000
snap window-group
# back to the whole index, and a NAME in it is live text like anywhere else:
# middle-click `Tutor` and the tutor opens. That is the picking a stepping
-# picker would have done, minus running the thirty-nine rows you passed.
+# picker would have done, minus running the rows you passed.
+#
+# The one place in this suite a builtin cannot be added for free: the click is
+# a SCREEN coordinate, so every row inserted above `SPC h t` in the listing
+# moves Tutor down one and this number with it.
key space ?
wait 10000 SPC c n
stable 700 15000
-press middle 20 45
-release middle 20 45
+press middle 20 46
+release middle 20 46
wait 10000 PARDES TUTOR
stable 700 15000
snap tutor-from-index
diff --git a/test/snapshots/leader.golden b/test/snapshots/leader.golden
index 74719f13..d58e8d6c 100644
--- a/test/snapshots/leader.golden
+++ b/test/snapshots/leader.golden
@@ -193,16 +193,16 @@
| 6 SPC c d Delcol
| 7 SPC c n Newcol topbar
| 8 SPC d Del
-| 9 SPC f f Find topbar
-| 10 SPC f g Grep topbar
-| 11 SPC f n New topbar
-| 12 SPC f s Save
-| 13 SPC h t Tutor topbar
-| 14 SPC j i Forward C-i
-| 15 SPC j j Last
-| 16 SPC j l Jumplist
-| 17 SPC j o Back C-o
-| 18 SPC k Kill topbar
+| 9 SPC f c Config
+| 10 SPC f f Find topbar
+| 11 SPC f g Grep topbar
+| 12 SPC f n New topbar
+| 13 SPC f s Save
+| 14 SPC h t Tutor topbar
+| 15 SPC j i Forward C-i
+| 16 SPC j j Last
+| 17 SPC j l Jumplist
+| 18 SPC j o Back C-o
== snap help-group grid=100x40 cursor=7,22
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
| /tmp/pardes-snap/leader/cwd/cmds.txt Save New Del
@@ -357,16 +357,16 @@
| 6 SPC c d Delcol
| 7 SPC c n Newcol topbar
| 8 SPC d Del
-| 9 SPC f f Find topbar
-| 10 SPC f g Grep topbar
-| 11 SPC f n New topbar
-| 12 SPC f s Save
-| 13 SPC h t Tutor topbar
-| 14 SPC j i Forward C-i
-| 15 SPC j j Last
-| 16 SPC j l Jumplist
-| 17 SPC j o Back C-o
-| 18 SPC k Kill topbar
+| 9 SPC f c Config
+| 10 SPC f f Find topbar
+| 11 SPC f g Grep topbar
+| 12 SPC f n New topbar
+| 13 SPC f s Save
+| 14 SPC h t Tutor topbar
+| 15 SPC j i Forward C-i
+| 16 SPC j j Last
+| 17 SPC j l Jumplist
+| 18 SPC j o Back C-o
== snap help-toggles grid=100x40 cursor=7,22
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
| /tmp/pardes-snap/leader/cwd/cmds.txt Save New Del
diff --git a/test/snapshots/ttyhelp.golden b/test/snapshots/ttyhelp.golden
index 69b5961a..a580263b 100644
--- a/test/snapshots/ttyhelp.golden
+++ b/test/snapshots/ttyhelp.golden
@@ -42,24 +42,24 @@
| 6 SPC c d Delcol
| 7 SPC c n Newcol topbar
| 8 SPC d Del
-| 9 SPC f f Find topbar
-| 10 SPC f g Grep topbar
-| 11 SPC f n New topbar
-| 12 SPC f s Save
-| 13 SPC h t Tutor topbar
-| 14 SPC j i Forward C-i
-| 15 SPC j j Last
-| 16 SPC j l Jumplist
-| 17 SPC j o Back C-o
-| 18 SPC k Kill topbar
-| 19 SPC l D WsDiagnostics
-| 20 SPC l S WsSymbols
-| 21 SPC l a CodeAction
-| 22 SPC l d Diagnostics
-| 23 SPC l h SelectRefs
-| 24 SPC l i Lspinfo
-| 25 SPC l k Hover
-| 26 SPC l r Rename
+| 9 SPC f c Config
+| 10 SPC f f Find topbar
+| 11 SPC f g Grep topbar
+| 12 SPC f n New topbar
+| 13 SPC f s Save
+| 14 SPC h t Tutor topbar
+| 15 SPC j i Forward C-i
+| 16 SPC j j Last
+| 17 SPC j l Jumplist
+| 18 SPC j o Back C-o
+| 19 SPC k Kill topbar
+| 20 SPC l D WsDiagnostics
+| 21 SPC l S WsSymbols
+| 22 SPC l a CodeAction
+| 23 SPC l d Diagnostics
+| 24 SPC l h SelectRefs
+| 25 SPC l i Lspinfo
+| 26 SPC l k Hover
== snap leaderworks grid=100x30 cursor=7,4
|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill
|$ /tmp/pardes-snap/ttyhelp/cwd New Del
@@ -73,21 +73,21 @@
| 6 SPC c d Delcol
| 7 SPC c n Newcol topbar
| 8 SPC d Del
-| 9 SPC f f Find topbar
-| 10 SPC f g Grep topbar
-| 11 SPC f n New topbar
-| 12 SPC f s Save
-| 13 SPC h t Tutor topbar
-| 14 SPC j i Forward C-i
-| 15 SPC j j Last
-| 16 SPC j l Jumplist
-| 17 SPC j o Back C-o
-| 18 SPC k Kill topbar
-| 19 SPC l D WsDiagnostics
-| 20 SPC l S WsSymbols
-| 21 SPC l a CodeAction
-| 22 SPC l d Diagnostics
-| 23 SPC l h SelectRefs
-| 24 SPC l i Lspinfo
-| 25 SPC l k Hover
-| 26 SPC l r Rename
+| 9 SPC f c Config
+| 10 SPC f f Find topbar
+| 11 SPC f g Grep topbar
+| 12 SPC f n New topbar
+| 13 SPC f s Save
+| 14 SPC h t Tutor topbar
+| 15 SPC j i Forward C-i
+| 16 SPC j j Last
+| 17 SPC j l Jumplist
+| 18 SPC j o Back C-o
+| 19 SPC k Kill topbar
+| 20 SPC l D WsDiagnostics
+| 21 SPC l S WsSymbols
+| 22 SPC l a CodeAction
+| 23 SPC l d Diagnostics
+| 24 SPC l h SelectRefs
+| 25 SPC l i Lspinfo
+| 26 SPC l k Hover