diff options
| author | Gabriel Schneider <[email protected]> | 2026-07-31 10:37:19 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-01 15:02:08 -0300 |
| commit | 0b7a480bef38b209741c520e2478d178767a9e51 (patch) | |
| tree | 837b2222db111743cdbfc7f9706323009c330c2a /test/snapshots/filewatch.golden | |
| parent | 5cf16eab0a4beec196e51bdcee731b899a2af07c (diff) | |
| download | pardes-0b7a480bef38b209741c520e2478d178767a9e51.tar.gz pardes-0b7a480bef38b209741c520e2478d178767a9e51.zip | |
the gui shell watches files too
It never did — the effect arm was `.watch => {}` with a comment saying a shell
that never delivers the event simply never reloads. That was written as a
deliberate scope cut and it is the whole bug: the user runs pardes-gui.
The tty watcher was fine, and I proved all four suspicions false against a real
binary in a real pty with the write done by a stranger process and NO input
delivered afterwards: the loop does wake (postEvent signals an empty queue),
zig fmt's rename-over does fire MOVED_TO and is caught, three panes across two
directories all reload and closing one leaves its neighbour still following,
and the self-write hash guard does not swallow a real change. The live session
even had its inotify mark on src with the right mask and re-read config.zig
when I touched that directory.
Duplicated rather than shared with tty.zig, the way the two shells already each
own LspJob, forkShell and their pty readers. The headless PARDES_TEST_GRID path
deliberately passes -1: its contract is one frame per scripted input, and a
reload on its own clock would put an unasked-for frame in the stream.
filewatch.snap proved less than it looked. Its real blind spots were the
rename-over shape — the old script only truncated, so it saw CLOSE_WRITE and
never MOVED_TO — multiple directories, and the one that mattered: the suite
only ever runs the TTY binary, so it structurally cannot see a gui-only
regression. It now uses a new `run` directive whose writer is a child of the
RUNNER, so nothing it does reaches an app pty.
Diffstat (limited to 'test/snapshots/filewatch.golden')
| -rw-r--r-- | test/snapshots/filewatch.golden | 73 |
1 files changed, 52 insertions, 21 deletions
diff --git a/test/snapshots/filewatch.golden b/test/snapshots/filewatch.golden index 64c43c85..71a56bba 100644 --- a/test/snapshots/filewatch.golden +++ b/test/snapshots/filewatch.golden @@ -2,8 +2,8 @@ |Kill Newcol Tutor Debug NextColor Dump Find Grep Help | NOR /tmp/pardes-snap/filewatch/cwd/w.txt Save De NOR /tmp/pardes-snap/filewatch/cwd Del NOR /tmp/pardes-snap/filewatch/cwd Del | 1 liMYEDITne 1 -| 2 line 2 w.txt w.txt -| 3 line 3 +| 2 line 2 sub w.txt sub w.txt +| 3 /tmp/pardes-snap/filewatch/cwd/sub/s.txt | 4 line 4 | 5 line 5 | 6 line 6 w.txt @@ -15,12 +15,29 @@ | 12 line 12 | 13 | -| NOR /tmp/pardes-snap/filewatch/cwd Del +| NOR /tmp/pardes-snap/filewatch/cwd/sub/s.txt Sav NOR /tmp/pardes-snap/filewatch/cwd Del +| 1 line 1 +| 2 line 2 sub w.txt +| 3 line 3 +| 4 line 4 +| 5 line 5 +| 6 line 6 +| 7 line 7 +| 8 line 8 +| 9 | -| w.txt | | | +== snap reloaded grid=150x30 cursor=15,2 +|Kill Newcol Tutor Debug NextColor Dump Find Grep Help +| NOR /tmp/pardes-snap/filewatch/cwd/w.txt Save De NOR /tmp/pardes-snap/filewatch/cwd Del NOR /tmp/pardes-snap/filewatch/cwd Del +| 1 EXTERNAL +| 2 sub w.txt sub w.txt +| +| +| +| w.txt | | | @@ -29,16 +46,29 @@ | | | -== snap reloaded grid=150x30 cursor=54,5 +| NOR /tmp/pardes-snap/filewatch/cwd/sub/s.txt Sav NOR /tmp/pardes-snap/filewatch/cwd Del +| 1 line 1 +| 2 line 2 sub w.txt +| 3 line 3 +| 4 line 4 +| 5 line 5 +| 6 line 6 +| 7 line 7 +| 8 line 8 +| 9 +| +| +| +| +== snap reloaded_sub grid=150x30 cursor=15,2 |Kill Newcol Tutor Debug NextColor Dump Find Grep Help -| NOR /tmp/pardes-snap/filewatch/cwd/w.txt Save De TTY /tmp/pardes-snap/filewatch/cwd Del NOR /tmp/pardes-snap/filewatch/cwd Del -| 1 EXTERNAL $ ls -| 2 w.txt w.txt -| $ echo EXTERN''AL > w.txt -| $ +| NOR /tmp/pardes-snap/filewatch/cwd/w.txt Save De NOR /tmp/pardes-snap/filewatch/cwd Del NOR /tmp/pardes-snap/filewatch/cwd Del +| 1 EXTERNAL +| 2 sub w.txt sub w.txt | | | +| w.txt | | | @@ -46,9 +76,10 @@ | | | -| NOR /tmp/pardes-snap/filewatch/cwd Del | -| w.txt +| NOR /tmp/pardes-snap/filewatch/cwd/sub/s.txt Sav NOR /tmp/pardes-snap/filewatch/cwd Del +| 1 RENAMED +| 2 sub w.txt | | | @@ -62,13 +93,13 @@ | == snap undone grid=150x30 cursor=15,2 |Kill Newcol Tutor Debug NextColor Dump Find Grep Help -| NOR /tmp/pardes-snap/filewatch/cwd/w.txt Save De TTY /tmp/pardes-snap/filewatch/cwd Del NOR /tmp/pardes-snap/filewatch/cwd Del -| 1 liMYEDITne 1 $ ls -| 2 line 2 w.txt w.txt -| 3 line 3 $ echo EXTERN''AL > w.txt -| 4 line 4 $ +| NOR /tmp/pardes-snap/filewatch/cwd/w.txt Save De NOR /tmp/pardes-snap/filewatch/cwd Del NOR /tmp/pardes-snap/filewatch/cwd Del +| 1 liMYEDITne 1 +| 2 line 2 sub w.txt sub w.txt +| 3 /tmp/pardes-snap/filewatch/cwd/sub/s.txt +| 4 line 4 | 5 line 5 -| 6 line 6 +| 6 line 6 w.txt | 7 line 7 | 8 line 8 | 9 line 9 @@ -77,9 +108,9 @@ | 12 line 12 | 13 | -| NOR /tmp/pardes-snap/filewatch/cwd Del -| -| w.txt +| NOR /tmp/pardes-snap/filewatch/cwd/sub/s.txt Sav NOR /tmp/pardes-snap/filewatch/cwd Del +| 1 RENAMED +| 2 sub w.txt | | | |
