feat(list): devbase list を対話選択デフォルトに変更#39
Merged
Conversation
`devbase list` / `devbase project list` を TTY ではデフォルトで対話選択 (番号入力 → project up 起動) にする。一覧表示のみは `--no-interactive` (`--plain` / `-P`)。非 TTY (パイプ/CI 等) では自動的に一覧表示へ フォールバックする。`--interactive` / `-i` は後方互換として維持。 - cli.py: --interactive を default=True 化、--no-interactive 追加 - project.py: sys.stdin.isatty() ゲートで非 TTY 自動フォールバック - bash/zsh 補完、ドキュメント、CHANGELOG を更新 - 非 TTY フォールバックの新規テスト追加 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
takemi-ohama
commented
Jun 6, 2026
takemi-ohama
left a comment
Contributor
Author
There was a problem hiding this comment.
🤖 cross-review | round 1 | codex | REQUEST_CHANGES
非 TTY フォールバックの判定が stdin のみに留まっており、stdout がパイプ・リダイレクトされたケースで対話選択が起動します。説明と互換性要件に合わせて、出力側も含めた TTY 判定にしてください。
`devbase list | cat` や `devbase list > out.txt` のように stdout だけが 非 TTY のケースでも対話選択が起動してしまう問題を修正。stdin / stdout の いずれかが非 TTY なら確実に一覧表示へフォールバックするよう判定を拡張した。 stdout 非 TTY フォールバックのテストも追加。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
takemi-ohama
commented
Jun 6, 2026
takemi-ohama
left a comment
Contributor
Author
There was a problem hiding this comment.
🤖 cross-review | round 2 | 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.
Pull Request
概要
devbase list/devbase project listを、TTY(端末)ではデフォルトで対話選択になるように変更しました。一覧から番号を入力して選んだプロジェクトをproject upで起動します。これまで--interactive/-iを明示しないと一覧表示のみだった挙動を反転し、よく使う「一覧 → 選んで起動」をワンステップで行えるようにします。スクリプト互換性のため、パイプ・リダイレクト・CI などの非 TTY 環境では自動的に一覧表示のみへフォールバックします。
関連 Issue
変更点
lib/devbase/cli.py:--interactiveをdefault=True化し、一覧表示のみ用に--no-interactive(同義--plain/-P)を追加。--interactive/-iは後方互換のため引き続き受理(実質 no-op)。lib/devbase/commands/project.py:sys.stdin.isatty()ゲートを追加し、非 TTY では対話起動せず一覧表示へ自動フォールバック(import sys追加)。etc/devbase-completion.bash/etc/_devbase: bash / zsh 補完に--no-interactive/--plain/-Pを追加。docs/user/cli-reference.md/docs/user/container-operations.md/CHANGELOG.md: 新しいデフォルト挙動とフラグ体系に更新。tests/cli/test_project_list.py/tests/cli/test_completion.py: 既存テストをデフォルト変更に追従。非 TTY フォールバックの新規テストを追加。対話テストはisattyを True に固定。動作確認
uv run pytest全テスト green(424 passed, 1 skipped)--no-interactive/--plain/-Pでinteractive=False、引数なし・-iでinteractive=Trueをパーサテストで確認devbase list(対話選択)/devbase list --no-interactive(一覧のみ)の手動確認補足
devbase listがブロックしないための設計判断です。--interactive/-iは破壊的変更を避けるため互換維持しています(デフォルトオンのため通常は不要)。