Skip to content

fix(tui/codex): embedded-pane UX 3종 수정 — Enter 1회 실행·한국어 응답·멀티라인 approval#309

Merged
sorlros merged 3 commits into
devfrom
fix/agents-md-pre-task-overhead
May 18, 2026
Merged

fix(tui/codex): embedded-pane UX 3종 수정 — Enter 1회 실행·한국어 응답·멀티라인 approval#309
sorlros merged 3 commits into
devfrom
fix/agents-md-pre-task-overhead

Conversation

@sorlros
Copy link
Copy Markdown
Member

@sorlros sorlros commented May 17, 2026

Summary

embedded-pane(--embedded-cli-ui --execution-mode real) 모드에서 발생하는 세 가지 UX 문제를 수정합니다.

Changes

1. Enter 한 번으로 즉시 실행 (src/cli/tui/index.ts)

embedded-pane + executionMode=real 조합에서 첫 Enter가 pending-approval 상태를 만들어 두 번째 Enter에서야 실행되던 2단계 확인 흐름을 제거했습니다.

before: Enter → "실행 확인 대기" 배너 → Enter → 실행
after:  Enter → 즉시 실행 ✓

shouldRequestApproval 분기와 pendingApprovalPrompt 세팅 로직 삭제 (−15줄).


2. 한국어 입력 시 한국어 응답 복원 (src/core/pipeline/orchestrator.ts)

PR #308에서 embedded-pane 프롬프트를 compressed_prompt(번역된 영어)만 전달하도록 단순화할 때 responseLanguageInstruction("Respond entirely in Korean.")이 누락되어 항상 영어로 응답하는 회귀가 발생했습니다.

// before
prompt = compiledPrompt.compressed_prompt;

// after
prompt = responseLanguageInstruction
  ? `${responseLanguageInstruction}${compiledPrompt.compressed_prompt}`
  : compiledPrompt.compressed_prompt;

3. 멀티-라인 approval 다이얼로그 감지 (src/cli/tui/panels/embedded-terminal.ts)

codex가 박스 UI(╭─╮/╰─╯)로 approval을 렌더할 때 verb와 [y/N] hint가 서로 다른 행에 있어 단일-행 패턴 매칭이 실패하는 버그 수정.

  • isDecorativeLine() 헬퍼 추가 — 순수 박스-드로잉 문자 행 판별
  • APPROVAL_STRICT_HINT_PATTERNS 추가 — 멀티-행 false positive 방지
  • getInteractionState → 8-행 스캔 윈도우 + break-on-non-approval 로직
  • 테스트 3건 추가 (멀티-행 감지, 해소 후 배너 소멸, 데코레이티브 전용 행 무시)

Test plan

  • npm run typecheck — clean
  • npx vitest run tests/ts/unit/cli/ — 1166 tests pass
  • npx vitest run tests/ts/unit/cli/tui/panels/embedded-terminal.test.ts — 46 tests pass
  • E2E: --embedded-cli-ui --execution-mode real 에서 한국어 프롬프트 입력 → Enter 1회 → 한국어 응답 확인
  • E2E: codex approval 다이얼로그 → 배너 표시 + Enter 승인 / Esc 거절

Related PRs

🤖 Generated with Claude Code

sorlros and others added 3 commits May 18, 2026 08:51
codex가 박스 스타일(╭─╮/╰─╯)로 approval을 렌더할 때
verb와 y/n hint가 서로 다른 행에 나타나 단일-행 패턴 매칭이
실패하는 문제 수정.

- isDecorativeLine 헬퍼 추가: 순수 박스-드로잉 문자 행 판별
- APPROVAL_STRICT_HINT_PATTERNS 추가: 멀티-행 false positive 방지용 좁은 y/n 패턴
- getInteractionState: 8-행 윈도우 스캔으로 교체
  - 데코레이티브 행(╰──╯)은 스캔을 중단하지 않고 skip
  - 단일-행 매칭 fast path 유지
  - verb/hint 누적 후 명시적 break 로직으로 approval 해소 감지 보장
- 테스트 3건 추가: 멀티-행 다이얼로그 감지, 해소 후 배너 소멸, 데코레이티브 전용 행 무시

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PR #308에서 embedded-pane을 compressed_prompt만 전달하도록 단순화할 때
responseLanguageInstruction이 빠져서, 한국어로 입력해도 codex가
항상 영어로 응답하는 회귀 발생.

presentationMode === "embedded-pane" 분기에 언어 지시를
앞에 prepend하여 한국어 입력 → 한국어 응답 흐름 복원.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
embedded-pane + executionMode=real 에서 첫 Enter가 pending-approval
상태를 만들어 두 번째 Enter에서야 실행되던 2단계 확인 흐름 제거.

shouldRequestApproval 분기와 pendingApprovalPrompt 세팅 로직을 삭제하고
executePrompt()를 직접 호출하도록 단순화.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sorlros sorlros changed the title fix(tui): 멀티-라인 approval 다이얼로그 감지 + getInteractionState 스캔 윈도우 fix(tui/codex): embedded-pane UX 3종 수정 — Enter 1회 실행·한국어 응답·멀티라인 approval May 18, 2026
@sorlros sorlros merged commit bbf8f00 into dev May 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant