| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| smallcode-Linux-X64.tar.gz | 2026-05-30 | 11.2 MB | |
| smallcode-macOS-ARM64.tar.gz | 2026-05-30 | 11.1 MB | |
| smallcode-Windows-X64.tar.gz | 2026-05-30 | 11.0 MB | |
| README.md | 2026-05-30 | 1.3 kB | |
| v1.5.2 source code.tar.gz | 2026-05-30 | 11.6 MB | |
| v1.5.2 source code.zip | 2026-05-30 | 11.8 MB | |
| Totals: 6 Items | 56.7 MB | 2 | |
[1.5.2] - 2026-05-30
fix: restore terminal on suspend, termination, and crashes (#71)
The fullscreen TUI enabled raw mode + SGR mouse tracking (\x1b[?1000h,
\x1b[?1006h) and bracketed paste (\x1b[?2004h), but only restored them in
leave() — which ran solely on a normal Ctrl+C / Ctrl+D / /quit exit.
Suspending with Ctrl+Z (suspended (tty input)), termination, or a crash left
the terminal in raw/mouse mode, so the shell echoed leaked SGR mouse reports like
0;66;42M with an invisible cursor.
- New module
src/tui/terminal.js(TerminalController) centralizes alternate-buffer / raw-mode / mouse / bracketed-paste setup and guarantees teardown on every exit path:exit,uncaughtException,SIGTERM/SIGHUP, and the job-control stop signalsSIGTSTP/SIGTTIN/SIGTTOU. Ctrl+Znow suspends cleanly: the terminal is restored before the process stops, andSIGCONT(fg) re-enters TUI mode and redraws.src/tui/fullscreen.jsdelegates itsenter()/leave()to the controller (also trims duplicated inline escape sequences from the 943-line file).- Test coverage:
test/terminal_lifecycle.test.js(9 cases) verifies restoration on suspend/resume, terminate, and crash paths, plus no listener leaks. Full suite: 290 passing.