aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_cli.py
diff options
context:
space:
mode:
authorElvis Claros Castro <elvis@claros.ar>2026-10-03 20:48:25 -0300
committerElvis Claros Castro <elvis@claros.ar>2026-10-03 20:48:25 -0300
commit5fc59b6936b2d4a05f5f5192458145d0112431d3 (patch)
treec79518ff574d7d07ee8de11f720ce862a94c4d10 /tests/test_cli.py
parentec23516d63061c066556d22f922b3c61e5837595 (diff)
downloadclaude-logbook-5fc59b6936b2d4a05f5f5192458145d0112431d3.tar.gz
claude-logbook-5fc59b6936b2d4a05f5f5192458145d0112431d3.zip
Show a single session as the page itself
A page with one session and no memories (a shared link, or -s --html) skips the list, stats and filters: the reader becomes the page, with the title, the details (now with the Claude Code version) and the transcript. A single session is exported without memories.
Diffstat (limited to 'tests/test_cli.py')
-rw-r--r--tests/test_cli.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_cli.py b/tests/test_cli.py
index 4538f24..37fd7d6 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -151,6 +151,14 @@ class TestExport(CliCase):
self.assertTrue(all(m["p"] == "/home/u/proj" for m in some))
self.assertLess(len(some), len(everything))
+ def test_a_single_session_goes_without_memories(self):
+ simple_tree(self.root)
+ memory_tree(self.root)
+ _, out, _ = self.run_cli("-s", "aaaaaaaa", "--json")
+ data = json.loads(out)
+ self.assertEqual(len(data["s"]), 1)
+ self.assertEqual(data["m"], [])
+
def test_html_leaves_stdout_alone(self):
# The summary goes to stderr so `--html /dev/stdout` keeps working.
simple_tree(self.root)