2.1 KiB
Terminal scrollback deletion feedback
VTE reports old lines leaving its accessible text as deletions at offset zero. Speaking those deletions replays previous prompts and command output while new output arrives. This was reproduced with a real shell and reader on private X11; the same event pattern appeared in the reported Wayland log.
The shared event policy suppresses only terminal deletions at offset zero when the native caret is known, the original removed text ends with a newline, and its positive code-point length does not extend past the current line start. Other deletions retain the existing redraw coalescing and editing feedback. Speech normalization stays unchanged; numeric length and line-ending metadata are retained separately because normalized payloads lose that information.
Build and run the focused native regression:
go build -o /tmp/cthulhu-terminal-check ./cmd/cthulhu
CTHULHU_BINARY=/tmp/cthulhu-terminal-check /usr/bin/python3 tests/native_terminal.py
It requires GTK3, VTE 2.91, Python GI/pyatspi, Xvfb, i3 and xdotool. It uses a private display, D-Bus session, configuration, shell home and recorded SSIP server; it does not replace the running reader. A small terminal with zero scrollback reaches the scrolling condition quickly. The test checks that 16 command outputs reach SSIP without old prompt deletions, then exercises Backspace, Delete, Ctrl+W, character navigation, history and current-line flat review. It prints the evidence directory containing reader logs and speech records. Run private X11 display tests sequentially to avoid xvfb-run display allocation collisions.
Human acceptance still requires listening in LXTerminal on both X11 and Wayland. Fill the terminal until output scrolls, run short and multiline commands, and confirm previous prompts and output are not replayed. Edit at the beginning, middle and end of a command with Backspace, Delete and Ctrl+W; use arrows, history and flat review. Check fresh-terminal and cleared-screen behavior as well. Physical keyboard, audible speech and Braille acceptance are separate from recorded SSIP and synthetic input.