From da5ca90ee8292013c813ec2447aaac50564fb97f Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 18:40:47 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Improve=20`checkpoint?= =?UTF-8?q?=20list`=20empty=20state?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add an actionable instruction when no checkpoints are found instead of just saying "No checkpoints found". Updates `src/python_learning_orchestrated/cli.py` and `tests/test_cli_smoke.py`. Co-authored-by: ivangegovdve-sudo <225339531+ivangegovdve-sudo@users.noreply.github.com> --- src/python_learning_orchestrated/cli.py | 5 ++++- tests/test_cli_smoke.py | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/python_learning_orchestrated/cli.py b/src/python_learning_orchestrated/cli.py index 31751d2..51755d5 100644 --- a/src/python_learning_orchestrated/cli.py +++ b/src/python_learning_orchestrated/cli.py @@ -223,7 +223,10 @@ def main( if args.checkpoint_command == "list": checkpoints = checkpoint_store.list_checkpoints() if not checkpoints: - output_fn("No checkpoints found.") + output_fn( + "No checkpoints found. Use 'checkpoint create ' to save " + "your progress." + ) return output_fn(f"Checkpoints ({len(checkpoints)}):") for checkpoint in checkpoints: diff --git a/tests/test_cli_smoke.py b/tests/test_cli_smoke.py index e54e34c..430498c 100644 --- a/tests/test_cli_smoke.py +++ b/tests/test_cli_smoke.py @@ -91,6 +91,15 @@ def test_cli_export_and_import_progress_commands(tmp_path, capsys) -> None: assert len(session_payload["attempts"]) == 1 +def test_cli_checkpoint_list_empty(capsys) -> None: + main(["checkpoint", "list"]) + output = capsys.readouterr().out + assert ( + "No checkpoints found. Use 'checkpoint create ' to save your progress." + in output + ) + + def test_cli_checkpoint_create_and_list(tmp_path, capsys, monkeypatch) -> None: session_file = tmp_path / "session.json" checkpoint_dir = tmp_path / "checkpoints"