aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIgor Soarez <igor@soarez.org>2026-10-23 17:58:24 +0300
committerIgor Soarez <igor@soarez.org>2026-10-23 17:58:24 +0300
commit12ce9f3f8edc84064458b649e8615247641dad36 (patch)
treec4df921d80b16dbd98fde05e3de7b795db5f1ad8 /tests
parent7520141a55e8876824dcb4e2cf5e8e3027efa59d (diff)
list working and idle agents most recent first
within a status, the menu, panel, search, and `dingger status` listed done and blocked agents oldest first (the queue), and the rest by place. now working and idle agents are most recent first: the first idle row is the agent that finished, or that the user looked at, last. @dingger_since now means when the pane entered its current status, for every status (it was set only while the pane needed the user), and survives a daemon restart. the queue selects done and blocked panes by status, no longer by having a stamp. one ordering rule each in Rust (watcher::list_order) and Swift (listedBefore), with tests that fail on the old order; e2e step 11 makes an agent finish while watched and checks it moves to the top of the idle rows. agents idle since before this change share one stamp and keep their place order until they next change.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/e2e.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/e2e.sh b/tests/e2e.sh
index c4bcabb..670f84a 100755
--- a/tests/e2e.sh
+++ b/tests/e2e.sh
@@ -248,7 +248,11 @@ if [ -x "$MENUBAR" ]; then
hook "$A1" working; hook "$A1" idle
expect "A1 done" "opt $A1 @agent_state" done
expect "menu title" "mb --print | head -1" "title: ×1 ✓1"
- expect "menu rows: herdr priority, names as titles, harness when unnamed" \
+ expect "menu rows: herdr priority; idle most recent first (C1 since its jump in step 4, B1 since the start)" \
+ "mb --print | tail -n +2 | cut -f1,2 | tr '\t\n' '|;'" "× blocked|pi;✓ done|Deploy the widget;○ idle|pi;○ idle|Review PR 42;"
+ hook "$B1" working; hook "$B1" idle
+ expect "B1 finishes a turn while watched: idle" "opt $B1 @agent_state" idle
+ expect "and is now the most recent idle agent: listed first" \
"mb --print | tail -n +2 | cut -f1,2 | tr '\t\n' '|;'" "× blocked|pi;✓ done|Deploy the widget;○ idle|Review PR 42;○ idle|pi;"
expect "subtitle: location, harness, waiting time" "mb --print | grep 'Deploy the widget' | cut -f3" "a · wa1 · pi · done now"
expect "idle subtitle has no waiting time" "mb --print | grep 'Review PR 42' | cut -f3" "b · wb1 · pi"
@@ -302,9 +306,11 @@ if [ -x "$MENUBAR" ]; then
DINGGER_TMUX_SOCKET="$SOCK" "$DINGGER" focus --client "$CLIENT" --pane "$A2"
expect "A2 idle after the jump" "opt $A2 @agent_state" idle
expect "panel with nothing waiting" "mb --print-panel" "Nothing waiting · ○ 4 idle"
+ # Most recent first: A2 (just jumped to), A1 (clicked in step 11), B1 (finished
+ # in step 11, before that click), C1.
expect "full list: every agent, then the summary with the toggle" \
"mb --print-panel --full | cut -f1,2 | tr '\t\n' '|;'" \
- "○ idle|Deploy the widget;○ idle|pi;○ idle|Review PR 42;○ idle|pi;Nothing waiting · ○ 4 idle|[Show less ▴];"
+ "○ idle|pi;○ idle|Deploy the widget;○ idle|Review PR 42;○ idle|pi;Nothing waiting · ○ 4 idle|[Show less ▴];"
expect "compact in Always mode offers 'Show all'" "mb --print-panel --toggle" "Nothing waiting · ○ 4 idle [Show all ▾]"
hook "$A1" working; hook "$A1" idle
expect "A1 done" "opt $A1 @agent_state" done