feat(list): list TUI サブメニューの Esc をトップメニュー復帰に変更 (i32)#45
Merged
Conversation
running 行選択後の操作サブメニュー (up/rebuild/down) で Esc を押すと、 全体中止ではなくプロジェクト選択のトップメニューへ戻るようにする。 - _MENU_BACK センチネルを追加し、サブメニューの Esc を None (Ctrl-C 全体中止) と区別して「戻る」シグナルとして返す - Esc バインドの共通処理を _add_escape_binding() に切り出し、用途別に _with_escape_cancel() (KeyboardInterrupt=中止 / トップメニュー用) と _with_escape_back() (_MENU_BACK=戻る / サブメニュー用) を用意 - _tui_select_and_up() を while ループ化し、_MENU_BACK で continue して トップメニューを再表示。Ctrl-C は従来どおり全体中止 - サブメニュー案内文を「Esc 戻る / Ctrl-C 中止」に更新 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
takemi-ohama
commented
Jun 9, 2026
takemi-ohama
left a comment
Contributor
Author
There was a problem hiding this comment.
🤖 cross-review | round 1 | gemini | APPROVE
ロジック・テストともに問題ありません。実装は意図通りであり、エッジケースも適切に考慮されています。
takemi-ohama
commented
Jun 9, 2026
takemi-ohama
left a comment
Contributor
Author
There was a problem hiding this comment.
🤖 cross-review | round 1 | codex | APPROVE
修正必須の指摘はありません。
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.
概要
devbase listの対話メニューで、running 行を選んだ後に表示される操作サブメニュー(up / rebuild / down) で Esc を押した場合の挙動を「全体中止」から「トップメニュー
(プロジェクト選択) へ戻る」に変更する。
別のプロジェクトを選び直したいだけなのに Esc で一覧操作ごと終了してしまう、という
手戻りを解消する。Ctrl-C は従来どおり全体中止のまま残す。
関連 Issue
変更点
_MENU_BACKセンチネルを追加し、サブメニューの Esc をNone(Ctrl-C による全体中止) と区別して「戻る」シグナルとして返す_add_escape_binding()に切り出し、用途別に 2 種類を用意:_with_escape_cancel()— Esc でKeyboardInterrupt(→ask()がNone= 中止)。トップメニュー用_with_escape_back()— Esc で_MENU_BACKを返す。サブメニュー用 (Ctrl-C は questionary 既定どおり中止のまま)_tui_select_and_up()をwhileループ化し、サブメニューが_MENU_BACKを返したらcontinueでトップメニューを再表示Esc・Ctrl-C 中止→Esc 戻る / Ctrl-C 中止に更新eager=False登録 (矢印キーのエスケープシーケンスと非衝突) は据え置きメニュー別の Esc / Ctrl-C 挙動
動作確認
uv run pytest全 464 passed / 1 skipped (既存スキップ)_with_escape_backが Esc で_MENU_BACKを返すことの単体テスト補足