fix(tui): alternate screen 종료 시 codex 응답 내용 보존#311
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
codex exec가 자신의 TUI에 alternate screen buffer(\x1b[?1049h)를 사용하여 출력하는 경우, 프로세스 종료 시 \x1b[?1049l로 복귀하면 alternate screen 내용이 버려지고 빈 main screen만 남아 사용자가 응답을 볼 수 없던 문제를 수정. alternate screen 종료 처리 시 비어있지 않은 행을 scrollback에 push한 뒤 main screen을 복원하도록 변경. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
\x1b[?1049h)를 사용해 TUI를 렌더링하는 경우, 프로세스 종료 시\x1b[?1049l로 main screen 복귀 시 alternate screen 내용이 버려지는 근본 원인 수정612f8b6)의 lookahead 50행 확장과 함께 embedded-pane 정상 동작 보장Changes
src/cli/tui/terminal-emulator.ts:\x1b[?1049l처리 시 alternate screen buffer의 비어있지 않은 행을 scrollback에 flush한 뒤 main screen 복원Test plan
npm run typecheck통과npx vitest run tests/ts/unit/cli/tui/terminal-emulator.test.ts— 15개 기존 테스트 통과npx vitest run tests/ts/unit/cli/tui/panels/embedded-terminal.test.ts— 43개 기존 테스트 통과detoks repl --embedded-cli-ui --execution-mode real실행 후 "이 디렉토리의 목적을 한 문장으로 설명해줘." 입력 → embedded pane에 응답 텍스트 표시 확인