diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-20 01:16:28 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-20 01:26:36 -0300 |
| commit | ff74e10d9375a463438684af6572e2bb35b17030 (patch) | |
| tree | 4808134fc46d8054d478a2ebc2c7ed1abfaa97e3 | |
| parent | 91076bdb892fe898a8b07325867a1d29c1d65862 (diff) | |
| download | pardes-ff74e10d9375a463438684af6572e2bb35b17030.tar.gz pardes-ff74e10d9375a463438684af6572e2bb35b17030.zip | |
dev/tui: a command's exit is told only once the reads already taken off the queue have had their steps: with one read a step (nyuxvltk), the reads taken and not yet applied may hold the command's own last output, which CommandWatch.due cannot see (it asks the pty, and the reader has read it out), so `exit 0` could be drawn above it (process-test cmdexit's ~1 in 50 under load, another agent's finding); the race that stays is the base's own (a read in the reader between its read and its post, or posted after the take); tui shell-test 1031/1034, behaviour-test 275/275, process-test 2 of 144 failed (lspcomplete and lspcompletemoved, the base's; ttytaken and winch once in the run, passed alone), cmdexit alone 40/40, headersweep and headersweep-restored alternated with nyuxvltk 8 times each: 16/16 and 16/16 (load 8-13)
Co-Authored-By: Claude Opus <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| -rw-r--r-- | dev/tui/tui.zig | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/dev/tui/tui.zig b/dev/tui/tui.zig index 2c6cf2ee..25172b4a 100644 --- a/dev/tui/tui.zig +++ b/dev/tui/tui.zig @@ -1584,8 +1584,11 @@ const Shell = struct { // is held for the next wait: `split`). s.takeQueue(); // An exit's wake (a .nop) or output an exit waited behind: told - // here, inside the step, so the frame after it shows it. - s.takeExits(); + // here, inside the step, so the frame after it shows it; not while + // reads taken off the queue wait their steps (`takeQueue`): one of + // them may be the command's own last output, which its exit would + // be drawn above (CommandWatch.due cannot see it). + if (s.batch_at == s.batch.len) s.takeExits(); s.reloadWatched(); } |
