aboutsummaryrefslogtreecommitdiff
path: root/tests/pi-live.sh
diff options
context:
space:
mode:
authorIgor Soarez <igor@soarez.org>2026-11-05 19:45:08 +0200
committerIgor Soarez <igor@soarez.org>2026-11-05 19:45:08 +0200
commit9575ead9c637a2dc482c00f417a1d784d46e076a (patch)
treea47abc5722d4f978e7c94428e06634e88101152a /tests/pi-live.sh
parent5842b093cc502b46076423e4f8efdbbc568f86aa (diff)
name pi agents by their reported session name, not the terminal title; scroll a panel list taller than the screen
Diffstat (limited to 'tests/pi-live.sh')
-rwxr-xr-xtests/pi-live.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/pi-live.sh b/tests/pi-live.sh
index 04ef04a..3c8604d 100755
--- a/tests/pi-live.sh
+++ b/tests/pi-live.sh
@@ -302,6 +302,21 @@ expect "a run that works: done" "st fail" done 80
expect "with no failure" "t show -pv -t main:fail @dingger_error 2>/dev/null" ""
t kill-window -t main:fail
+# Its name is the session's, whatever the terminal title says.
+t new-window -d -t main: -n named -c "$D/work3"
+t send-keys -t main:named "pi $NO_MCP" Enter
+expect "names: an agent of its own" "st named" idle 150
+name() { t show -pv -t main:named @agent_name 2>/dev/null; }
+expect "an unnamed session: no name" name "" 30
+t select-pane -t main:named -T "π - Not its name - work3"; "$DINGGER" poke; sleep 1
+expect "a title cannot name it" name ""
+type_line named "/name Find the sidecar"
+expect "/name names it" name "Find the sidecar" 50
+t select-pane -t main:named -T "pi:c"; "$DINGGER" poke; sleep 1
+expect "a title written over keeps the name" name "Find the sidecar"
+expect "the menu shows it" "\"$MENU\" --print | grep -c 'Find the sidecar'" 1
+t kill-window -t main:named
+
echo "2. screen detection (pi without the extension)"
t send-keys -t main:plain "PI_CODING_AGENT_DIR=$D/agent-plain pi $NO_MCP" Enter
expect "identified as pi" "t show -pv -t main:plain @agent 2>/dev/null" pi 150