Skip to content

Conversation

@codegen-team
Copy link
Contributor

Motivation

Content

Testing

Please check the following before marking your PR as ready for review

  • I have added tests for my changes
  • I have updated the documentation or added new documentation as needed

@codegen-team codegen-team requested a review from a team as a code owner August 18, 2025 04:31
@codegen-team codegen-team requested review from christinewangcw and removed request for a team August 18, 2025 04:31
@codegen-team codegen-team changed the title small UI fixes TUI /new fixes Aug 18, 2025
@codecov
Copy link

codecov bot commented Aug 18, 2025

Codecov Report

❌ Patch coverage is 1.31579% with 75 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/codegen/cli/tui/app.py 1.31% 75 Missing ⚠️

@jayhack jayhack merged commit b433eec into develop Aug 18, 2025
15 of 18 checks passed
@jayhack jayhack deleted the jay/tui-tune-up branch August 18, 2025 04:32
if key == "\x03": # Ctrl+C
self.running = False
return
elif key.lower() == "q" and not (self.input_mode and self.current_tab == 1): # q only if not typing in new tab
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logic bug: ESC cancel never triggers, UI freezes
_handle_input_mode_keypress now checks for a raw "\x1b", but _get_char() always tries to read a second byte after an ESC press (to capture arrow keys). When the user presses ESC by itself the call blocks and the handler never receives the single byte, effectively freezing the TUI. Accept both "c" and any sequence that STARTS with ESC.

Suggested change
elif key.lower() == "q" and not (self.input_mode and self.current_tab == 1): # q only if not typing in new tab
# Accept either raw "c" (legacy) or a lone ESC / ESC-sequence that is *not* an arrow key
if key.lower() == "c" or key == "\x1b" or key.startswith("\x1b[") is False:
self.input_mode = False

@codegen-sh
Copy link
Contributor

codegen-sh bot commented Aug 18, 2025

Found 1 issues. Please review my inline comments above.

🔍 View my analysis

@github-actions
Copy link
Contributor

🎉 This PR is included in version 0.56.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants