emrg: TUI exit clears the terminal screen (rant 2026-08-18T11:13:17) - #839
Merged
Conversation
Terminal.shutdown() only moved the cursor home — the TUI content stayed on screen after exit. Emit CLEAR_SCREEN (\x1b[2J) before CURSOR_HOME so the terminal is wiped on exit (matching Codex/Claude Code behavior). Adds a shutdown test asserting CLEAR_SCREEN emission and ordering.
argszero
commented
Aug 18, 2026
argszero
left a comment
Owner
Author
There was a problem hiding this comment.
✅ LGTM — cycle 708 (1/3). CI test + test-windows PASS (32103591972). TUI exit now clears the screen; test_shutdown_clears_screen asserts CLEAR_SCREEN before CURSOR_HOME.
argszero
commented
Aug 18, 2026
argszero
added a commit
that referenced
this pull request
Aug 18, 2026
v0.2.47 -> v0.2.48 across 8 files / 9 refs (standard release bump): - emrg/__init__.py, pyproject.toml, uv.lock (emrg entry) - emrg/gui/package.json + package-lock.json (x2) - packaging/build-runtime.sh, make-installer.sh, make-run-installer.sh Covers 4 commits since v0.2.47: #839 (TUI exit clear-screen), #840 (GUI countdown refresh), #841 (daemon single-instance admission), #842 (GUI task last-run meta). Rant 2026-08-18T14:46:47. Co-authored-by: EMRG Evolution <emrg@argszero.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TUI exit leaves the interface on screen —
Terminal.shutdown()restored the title, exited raw mode and moved the cursor home, but never emitted CLEAR_SCREEN, so the rendered content stayed visible afteremrgquit (unlike Codex/Claude Code which clear on exit).Changes
emrg/client/python_tui/terminal.py: shutdown() emitsCLEAR_SCREEN(\x1b[2J) beforeCURSOR_HOMEtests/test_terminal_render.py: newtest_shutdown_clears_screenasserting CLEAR_SCREEN is emitted and precedes cursor-homeAgent.md: Python test count 933→934Root cause (as located in the rant): shutdown() only did restore_title + raw-mode exit + CURSOR_SHOW + CURSOR_HOME + RESET_SCROLL_REGION + bracketed-paste off; the screen buffer was never cleared.