feat(gui): one Another assistant card, a popover for Ask your assistant, one Books menu entry

The four untested tools shared one text four times: now one card. The
copied sentence no longer pushes the page down: a popover under the
button. The Books menu's two connect entries became one that opens the
Connect page. Link::Working has no glyph (it is a drawn arc). Shape
baselines re-blessed: assist_{working,none,connected,connect_page,ask}
in light and dark.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-21 10:16:26 -07:00
1 parent f58191c9de
commit e34b18ec73
15 files changed
+236 -215

No files matched your search

+24 -10
View File
@@ -487,6 +487,7 @@ fn ask_your_assistant_copies_one_ready_sentence() {
refresh(&mut h);
h.state_mut().goto(Route::Transactions);
h.run_steps(3);
let below = h.get_by_label_contains("recorded, newest first").rect();
h.get_by_role_and_label(Role::Button, "Ask your assistant")
.click();
h.step();
@@ -495,6 +496,11 @@ fn ask_your_assistant_copies_one_ready_sentence() {
["In my Wanderbooks books for Wanderland Labs, please record a new transaction."]
);
h.run_steps(2);
assert_eq!(
h.get_by_label_contains("recorded, newest first").rect(),
below,
"the feedback is a popover: the page does not move"
);
// With none connected it says so, and where to connect one.
assert!(
h.query_by_label_contains("No assistant is connected yet.")
@@ -568,14 +574,7 @@ fn the_top_bar_state_opens_the_connect_page_which_lists_and_revokes() {
h.run_steps(3);
assert_eq!(h.state().route(), &Route::Connect);
// A row per tool, and the keys with who is on each.
for tool in [
"Claude Code",
"Codex",
"Gemini CLI",
"Grok Build",
"Muse Code",
"Cursor",
] {
for tool in ["Claude Code", "Codex", "Another assistant"] {
assert!(
h.query_all_by_label(tool).next().is_some(),
"a row for {tool}"
@@ -597,8 +596,8 @@ fn the_top_bar_state_opens_the_connect_page_which_lists_and_revokes() {
assert_eq!(
h.query_all_by_label("/opt/wanderbooks mcp --book alpha")
.count(),
4,
"the program and its arguments, for each tool that has no button"
1,
"the program and its arguments, once, on the card for any other assistant"
);
h.get_all_by_label("Or do it yourself, in a terminal")
.next()
@@ -671,6 +670,16 @@ fn the_connect_buttons_do_what_connect_does() {
h.query_by_label_contains("Codex reaches the books.")
.is_some()
);
until(&mut h, "the page is idle", |a| {
!a.views()[0].connect_state().busy()
});
h.run_steps(2);
h.get_by_role_and_label(Role::Button, "Connect Claude Code")
.click();
h.run_steps(2);
wait_for("connect ran for Claude Code", || {
owner.said().contains(&"connect claude alpha".to_string())
});
h.get_by_role_and_label(Role::Button, "Make the key")
.click();
h.run_steps(2);
@@ -1016,5 +1025,10 @@ fn pictures() {
// A short window, as the owner's laptop has.
let (_w2, mut small) = three_states(dark, 0, egui::vec2(1479.0, 519.0));
save(&mut small, &format!("8-short-window-{mode}"));
// The Connect page tall enough to show "Another assistant".
let (_w3, mut tall) = three_states(dark, 1, egui::vec2(1440.0, 1300.0));
tall.state_mut().goto(Route::Connect);
tall.run_steps(4);
save(&mut tall, &format!("9-connect-another-{mode}"));
}
}
+17 -13
View File
@@ -181,11 +181,15 @@ fn the_books_menu_hands_each_action_to_the_owner_and_writes_nothing() {
assert_eq!(f.asked.lock().unwrap()[start], "back up acme");
assert!(h.query_by_label_contains("is its disk connected").is_some());
// Connect Claude Code.
// Connect an assistant…: opens the Connect page, asks the owner nothing
// (the page's own buttons carry the connecting: tests/assistants.rs).
open_menu(&mut h);
h.get_by_label_contains("Connect Claude Code").click();
settle(&mut h, &f, start + 2);
assert_eq!(f.asked.lock().unwrap()[start + 1], "connect Claude acme");
h.get_by_label_contains("Connect an assistant…").click();
h.run_steps(4);
assert_eq!(h.state().route(), &Route::Connect);
assert_eq!(f.asked.lock().unwrap().len(), start + 1);
assert!(h.query_by_label_contains("Connect Claude Code").is_some());
assert!(h.query_by_label_contains("Connect Codex").is_some());
// New books: asked for, then made.
let page_fields = h
@@ -205,8 +209,8 @@ fn the_books_menu_hands_each_action_to_the_owner_and_writes_nothing() {
.type_text("beta");
h.run_steps(2);
h.get_by_label("Make them").click();
settle(&mut h, &f, start + 3);
assert_eq!(f.asked.lock().unwrap()[start + 2], "new beta USD");
settle(&mut h, &f, start + 2);
assert_eq!(f.asked.lock().unwrap()[start + 1], "new beta USD");
// Restore: previewed (the backup checked), then done for that plan.
open_menu(&mut h);
@@ -227,9 +231,9 @@ fn the_books_menu_hands_each_action_to_the_owner_and_writes_nothing() {
"not before it is checked"
);
h.get_by_label("Check it").click();
settle(&mut h, &f, start + 4);
settle(&mut h, &f, start + 3);
assert_eq!(
f.asked.lock().unwrap()[start + 3],
f.asked.lock().unwrap()[start + 2],
"plan /media/disk/acme.git None false"
);
assert!(
@@ -237,9 +241,9 @@ fn the_books_menu_hands_each_action_to_the_owner_and_writes_nothing() {
.is_some()
);
h.get_by_label("Restore it").click();
settle(&mut h, &f, start + 5);
settle(&mut h, &f, start + 4);
assert_eq!(
f.asked.lock().unwrap()[start + 4],
f.asked.lock().unwrap()[start + 3],
"restore /media/disk/acme.git acme 7"
);
@@ -249,13 +253,13 @@ fn the_books_menu_hands_each_action_to_the_owner_and_writes_nothing() {
h.run_steps(3);
h.get_by_label("Cancel").click();
h.run_steps(3);
assert_eq!(f.asked.lock().unwrap().len(), start + 5);
assert_eq!(f.asked.lock().unwrap().len(), start + 4);
open_menu(&mut h);
h.get_by_label_contains("Close the books").click();
h.run_steps(3);
h.get_by_label("Close the books").click();
settle(&mut h, &f, start + 6);
assert_eq!(f.asked.lock().unwrap()[start + 5], "close");
settle(&mut h, &f, start + 5);
assert_eq!(f.asked.lock().unwrap()[start + 4], "close");
// The viewer wrote nothing of the books.
drop(h);
@@ -1 +1 @@
554a45de5050b79d
d4672239e98f338e
@@ -1 +1 @@
fffc3e5adaa00db0
47a1f842b40cdf15
@@ -1 +1 @@
e8b3ce383a13c776
2abd53e6457106f8
@@ -1 +1 @@
3271d551e50db504
b990ac9586df492a
@@ -1 +1 @@
9530691dfcdedf6b
6642f21a3644e1f4
@@ -1 +1 @@
5f60b24231b7a370
e425621386ec002f
@@ -1 +1 @@
9bc7803073cd0434
79ee857f24de8131
@@ -1 +1 @@
fea19947b5c1a09e
d236cd60218a8061
@@ -1 +1 @@
334251b6f2666663
8d565039aff8c64c
@@ -1 +1 @@
31ed42032e1844c9
7014f0d713dbc1d8