cli: just gui runs the viewer in the background; gui-fg, gui-status, [viewer] open_at_start

The scaffolded justfile now detaches the viewer (log in books-data/gui.log)
and won't open a second one for the same books. AGENTS.md tells the agent
to check gui-status at session start and follow open_at_start
(ask/always/never) in wanderbooks.toml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DeBdcyb3YyRkcpicBZH5wh
This commit is contained in:
swaitsandClaude Opus 5.5 committed 2026-10-12 19:38:33 -06:00
1 parent 024c9896f2
commit b38c9e39cc
2 files changed
+37 -4

No files matched your search

+4 -2
View File
@@ -99,8 +99,8 @@ fn the_server_is_registered_for_this_dir() {
);
// The justfile opens this dir's books in the GUI.
let just = fs::read_to_string(books.join("justfile")).unwrap();
assert!(just.contains("ledger-gui\" --data-dir books-data"));
for recipe in ["agent:", "gui:", "backup:", "update:"] {
assert!(just.contains("ledger-gui\" --data-dir \"{{justfile_directory()}}/books-data\""));
for recipe in ["agent:", "gui:", "gui-fg:", "gui-status:", "backup:", "update:"] {
assert!(just.contains(recipe), "justfile has {recipe}");
}
assert_eq!(
@@ -128,6 +128,8 @@ fn agents_md_carries_the_contract() {
"chart_template",
"to the cent",
"just gui",
"just gui-status",
"open_at_start",
] {
assert!(md.contains(phrase), "AGENTS.md mentions {phrase:?}");
}