fix(tui): 操作実行後に Enter 待ちを挟み出力が流れるのを防止#64
Merged
Conversation
devbase list の TUI で操作実行後 (plugin list 等の表示系操作を含む) に即座に トップのプロジェクト一覧を再描画していたため、操作の出力が一瞬で流れて 読めなかった。操作を実行した場合は一覧の再表示前に 「Enter キーで一覧へ戻ります...」で入力を待つようにする。 - 操作を実行したとき (rc が返ったとき) のみ Enter を待つ。 Esc/← で操作せず戻った場合は待たない (読むべき出力がない) - Enter 待ち中の Ctrl-C は既存ナビ規約どおり全体中止 (直近 rc で終了) - 非 TTY 等で stdin を読めない場合 (EOFError/OSError) は待たずに戻り ハングしない - questionary ではなく stdlib input() を使用し、画面の書き換えなしで 出力をそのまま残す Co-Authored-By: Claude Fable 5 <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.
Pull Request
概要
devbase listの TUI で plugin list 等の表示系操作を実行すると、出力が一瞬表示された直後にトップのプロジェクト一覧が再描画され、内容が読めなかった。操作実行後は「Enter キーで一覧へ戻ります...」で入力を待ってから一覧を再表示するようにする。関連 Issue
変更点
app._top_menu_loop: 操作を実行した場合(rc が返った場合)、一覧の再表示前に_pause_for_review()で Enter を待つMENU_BACK)は待たない(読むべき出力がない)EOFError/OSError)は待たずに戻り、ハングしない_pause_for_reviewは questionary ではなく stdlib のinput()を使用。画面の書き換えが起きず、操作の出力がそのまま画面に残る(questionary 統合層の実 TTY バグ事例 PR feat(tui): devbase list トップをプロジェクト一覧化 + 実 TTY バグ 3 件修正 #61 を踏まえた選択)動作確認
pytest tests/全 724 件パス(skip 1 件は zsh 未インストールによる補完テストのみ)devbase list→ プラグイン → 一覧表示 → Enter で一覧復帰を手動確認スクリーンショット・ログ(任意)
補足
input()のため、Enter 以外の文字を打っても Enter で確定すれば一覧へ戻る🤖 Generated with Claude Code