release: PLAN31_2 devbase list TUI の統合UI化#55
Open
takemi-ohama wants to merge 4 commits into
Open
Conversation
This was referenced Jun 10, 2026
…非回帰移送) (#56) * chore: PLAN31_2-tui-framework Draft PR 作成 * feat(tui): PLAN31_2 TUI 土台を tui/ へ分離・トップ階層メニュー化 (PR1 #56) devbase list の対話 TUI を commands/project.py から lib/devbase/tui/ パッケージへ 分離し、全カテゴリを束ねるトップ階層メニューの入口を新設する (PLAN31_2 PR1)。 - tui/menu.py: questionary ラッパ・MENU_BACK 番兵・Esc/← バインド・引数収集 ヘルパ (text/confirm/integer/path, input フォールバック) - tui/dispatch.py: dispatch_lifecycle / dispatch_group (旧 _start_project_action を一般化、PR3〜5 の group 委譲も先行整備) - tui/actions_project.py: 既存 project up/down/rebuild の非回帰移送 (一覧選択→ running はサブメニュー→他は直接 up、番号入力フォールバック) - tui/app.py: トップ階層メニュー (project/env/plugin/snapshot/status)。 「プロジェクト操作」を先頭・既定ハイライトで従来フローへ Enter 連打到達 (3.2)。 env 以降は後続 PR 用プレースホルダ (_route に1行追加で配線) - commands/project.py: listing/整形の純粋ロジックへ縮約、cmd_project_list は tui.run への薄い委譲に置換 後方互換: --plain/非TTY→table、questionary 不在→従来の番号入力フォールバックへ縮退。 テスト: TUI エンジン系を tests/cli/tui/ へ移設・拡充。全 pytest 510 passed/1 skipped。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(tui): 実行 rc をトップメニューまで伝搬 + text/path 再帰除去 + Esc バインド (PR56 round1) cross-review round1 の 3 件を修正: 1. [major] actions_project.run() が dispatch_lifecycle の戻り値を捨てており project up/down/rebuild 失敗時も devbase list の終了コードが常に 0 になる問題を 修正。run() は操作実行時に rc(int) を返すプロトコルへ拡張し、app._top_menu_loop が last_rc を記憶して終了コードへ伝搬する (判定は is 同一性で rc=0 を誤マッチさせない)。 2. [minor] menu.text() / menu.path() の allow_empty=False 空入力時の自己再帰呼び出しを while ループへ変更し RecursionError リスクを除去。 3. [minor] questionary 経路の text/confirm/path に Esc→中止 (None) バインドが無く docstring/select のナビ規約と不整合だったため _ask_with_escape ヘルパで with_escape_cancel を適用。 テスト追従: rc 伝搬・非0 rc 伝搬・Esc バインド登録・while 再入力ループの検証を追加 (510 passed → 520 passed / 1 skipped)。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PR1 を cross-review approved → release へ merge (50ab9c2) 済みに更新し、 後続 PR (project/env/plugin/snapshot/status) が tui 土台へ配線する手順 (_route 1 行追加・menu 引数収集・dispatch_group・confirm/chdir) を申し送りとして追記。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…#57) * chore: PLAN31_2-project-ops Draft PR 作成 * feat(tui): PLAN31_2 project 操作を login/ps/logs/scale/build へ拡張 (PR2 #57) running 行の操作サブメニューを up/down/login/ps/logs/scale/build/rebuild の全操作へ 拡張し、各操作の引数を tui.menu の収集ヘルパで CLI と同じ属性 (plan 2.3 契約) として 集める。stopped/unknown は従来どおり直接 up (PR1 非回帰)。 - login: index (既定 "1") を text で収集 - ps: --all を confirm で収集 - logs: --follow を confirm、--tail を optional int (空=全件) で収集 - scale: new_scale を integer (min=1) で収集 - build: containers/<image>/Dockerfile を列挙して選択 (compose.yml 全体= image None) - down: 破壊的操作のため confirm で確認 (plan 3.4) - 引数収集を Esc/Ctrl-C で中止したら操作サブメニューへ戻る (_ARG_CANCEL) login/ps/logs/scale は running コンテナ対象のため running 行限定とした。 全 pytest 542 passed / 1 skipped (PR2 で +22)。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(tui): project login の空 index バグ修正 + logs --tail 負数バリデーション (PR2 #57 round1) - login: menu.text(空入力で "" → --index= 失敗) を menu.integer(default=1, min_value=1) に変更し、str(index) で文字列契約を満たして dispatch。 - _optional_int: min_value=0 検証を追加し、logs --tail への負数入力を弾いて 再入力を促す (docker compose エラー防止)。 - テスト: login を menu.integer モックに追従、負数再入力テストを追加。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <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
issues/PLAN31_2_list-tui-unified.mddevbase listTUI を全コマンド群の階層メニューへ統合する複数 PR を束ねる release ブランチ個別 PR
feature/PLAN31_2-tui-framework—tui/新設・メニューエンジン・既存 project up/down/rebuild 非回帰移送feature/PLAN31_2-project-ops— project login/ps/logs/scale/buildfeature/PLAN31_2-env-ops— env 全操作feature/PLAN31_2-plugin-ops— plugin 全操作 + repofeature/PLAN31_2-snapshot-status— snapshot + status依存関係
tui/土台。PR2〜5 は PR1 マージ後に release 上で並行 (各actions_*.pyで衝突回避)。PR2 のみ project 系で PR1 と密結合。Test plan (結合観点のみ)