feat: PLAN31_2-snapshot-status snapshot 全操作 + status 閲覧の TUI 追加#60
Open
takemi-ohama wants to merge 2 commits into
Open
feat: PLAN31_2-snapshot-status snapshot 全操作 + status 閲覧の TUI 追加#60takemi-ohama wants to merge 2 commits into
takemi-ohama wants to merge 2 commits into
Conversation
9 tasks
- tui/actions_snapshot.py 新設: create/list/restore/copy/delete/rotate の 操作メニューと引数収集 (属性契約は cli.py parser と突き合わせ済み)。 restore/copy/delete の対象は SnapshotManager.list() の既存一覧から選択 (取得失敗時は自由入力へ縮退)。破壊的な restore/delete は menu.confirm で 確認し、拒否時は実行しない (plan 3.4) - tui/actions_status.py 新設: cmd_status(devbase_root) への薄い委譲 (引数なし・閲覧のみ。表示後トップへ rc を返す) - tui/app.py: _route に snapshot/status を配線 (残りは PR3 env / PR4 plugin) - テスト 39 件追加 (582 passed / 1 skipped、ベースライン 544 から退行ゼロ) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
7816b1a to
6226ed7
Compare
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
PLAN31_2 PR5:
devbase listTUI に snapshot カテゴリ(create/list/restore/copy/delete/rotate)と status カテゴリ(閲覧)を追加する。issues/PLAN31_2_list-tui-unified.md(PR 分割計画 4 / 担当範囲 PR5)release/PLAN31_2)tui/パッケージ(menu / dispatch / app)変更内容
lib/devbase/tui/actions_snapshot.py新設dispatch_group(cmd_snapshot, ...)委譲cli.py:_add_snapshot_parserと突き合わせて確認(乖離なし): create=name(None)/full(False)、list=属性なし、restore=name/point(None)、copy=name/new_name、delete=name、rotate=keep(3)nameはSnapshotManager.list()の既存一覧から選択(作成日時付き・絞り込み可。取得失敗時は自由入力へ縮退)menu.confirmで実行前確認、拒否時は実行せずメニューへ戻る(plan 3.4)--pointは manager が正の整数のみ受理するため 1 以上を要求、rotate の--keepは no-op な 0 以下を弾くlib/devbase/tui/actions_status.py新設:cmd_status(devbase_root)への薄い委譲(引数なし・閲覧のみ。表示後トップへ rc を返す)lib/devbase/tui/app.py:_routeに snapshot/status を配線(残りプレースホルダは PR3 env / PR4 plugin)MENU_BACK)、Ctrl-C で全体中止(None)、実行後は rc を返してトップ復帰Test plan
tests/cli/tui/test_actions_snapshot.py新設: 各操作が契約どおりの属性でcmd_snapshotを呼ぶこと(mock 検証)、restore/delete の confirm 拒否・中止で未実行、Esc/←/Ctrl-C の遷移、引数収集中止でメニュー再表示、一覧選択の縮退(空一覧・取得失敗→text 入力)tests/cli/tui/test_actions_status.py新設:cmd_status(devbase_root)委譲と rc 伝搬(0/非0)tests/cli/tui/test_app.py: snapshot/status の_route配線テスト追加uv run pytest全テスト pass: 582 passed / 1 skipped(ベースライン 544 collected から +39、退行ゼロ)