diff options
| author | Igor Soarez <igor@soarez.org> | 2026-10-20 13:59:29 +0300 |
|---|---|---|
| committer | Igor Soarez <igor@soarez.org> | 2026-10-20 13:59:29 +0300 |
| commit | 6bccc5f786c479a335c55ad83487e077195cff44 (patch) | |
| tree | 7777eb50a5e264719a92bd34c653aba9edd133c5 /tests/e2e.sh | |
| parent | 3731a80384f5e2b7d3343eb3e4999f626bbc7f91 (diff) | |
menu rows lead with the agent's session name; harness and place move below
herdr's sidebar shows the session name in place of the harness label (via
the user's herdr-session-name extension). dingger reads it from the title
pi already sets ("π - <name> - <dir>"); other agents use herdr's
terminal_title_stripped rule, and claude's default "Claude Code" title or
tmux's host-name title count as no name. the daemon stores it as
@agent_name for every surface.
menu rows: colored status symbol + name as the title (the harness, dimmed,
only when unnamed), and a native subtitle "session · window · harness",
plus how long done/blocked agents have been waiting; one separator between
agents waiting for you and the rest. dingger status shows the same.
Diffstat (limited to 'tests/e2e.sh')
| -rwxr-xr-x | tests/e2e.sh | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/tests/e2e.sh b/tests/e2e.sh index b63260c..015d6aa 100755 --- a/tests/e2e.sh +++ b/tests/e2e.sh @@ -81,15 +81,20 @@ mkdir -p "$DIR/bin" printf '#!/bin/sh\nexec sleep 100000\n' >"$DIR/bin/pi" chmod +x "$DIR/bin/pi" -t -f /dev/null new-session -d -s a -n wa1 -x 120 -y 40 "$DIR/bin/pi" -t new-window -d -t a: -n wa2 "$DIR/bin/pi" -t new-session -d -s b -n wb1 -x 120 -y 40 "$DIR/bin/pi" -t new-session -d -s c -n wc1 -x 120 -y 40 "$DIR/bin/pi" +t -f /dev/null new-session -d -s a -n wa1 -c "$DIR" -x 120 -y 40 "$DIR/bin/pi" +t new-window -d -t a: -n wa2 -c "$DIR" "$DIR/bin/pi" +t new-session -d -s b -n wb1 -c "$DIR" -x 120 -y 40 "$DIR/bin/pi" +t new-session -d -s c -n wc1 -c "$DIR" -x 120 -y 40 "$DIR/bin/pi" t set -g mouse on A1=$(t display -p -t a:wa1 '#{pane_id}') A2=$(t display -p -t a:wa2 '#{pane_id}') B1=$(t display -p -t b:wb1 '#{pane_id}') C1=$(t display -p -t c:wc1 '#{pane_id}') +# pi titles its pane "π - <session name> - <cwd basename>", or "π - <dir>" +D=$(basename "$DIR") +t select-pane -t "$A1" -T "π - Deploy the widget - $D" +t select-pane -t "$A2" -T "π - $D" +t select-pane -t "$B1" -T "π - Review PR 42 - $D" t new-session -d -s viewer -x 120 -y 40 "env -u TMUX tmux -u -L $SOCK attach -t b" for _ in $(seq 50); do CLIENT=$(t list-clients -F '#{client_name}' | head -1); [ -n "$CLIENT" ] && break; sleep 0.1; done [ -z "$CLIENT" ] && { echo "no client attached"; exit 1; } @@ -108,6 +113,9 @@ expect "A1 idle on first sight" "opt $A1 @agent_state" idle expect "A2 idle on first sight" "opt $A2 @agent_state" idle expect "B1 idle on first sight" "opt $B1 @agent_state" idle expect "queue empty" "gopt @dingger_queue" "" +expect "A1 name from pi's title" "opt $A1 @agent_name" "Deploy the widget" +expect "A2 unnamed pi session has no name" "opt $A2 @agent_name" "" +expect "B1 name from pi's title" "opt $B1 @agent_name" "Review PR 42" # --- 2. working, then completion away from the window -> done ---------------- echo "2. completion while away" @@ -230,7 +238,10 @@ 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 in herdr priority order" "mb --print | tail -n +2 | cut -d' ' -f2,4 | tr '\n' ' '" "blocked a:wa2 done a:wa1 idle b:wb1 idle c:wc1 " + expect "menu rows: herdr priority, names as titles, harness when unnamed" \ + "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" mb --click "$A1" expect "row click jumped to wa1" "client_window" wa1 expect "row click marked A1 idle" "opt $A1 @agent_state" idle |
