fix: v0.10.1 usage ping uses tab presence; CI-safe test
The usage ping now treats "away" like the needs-you notifier: no DevDesk tab in view for ~2 minutes. The test sets a presence marker instead of attaching a tmux client, which never attached in CI. 0.10.0 was never published. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WHRLCCdXYm41Qx5kNhehaP
This commit is contained in:
+4
-5
@@ -1173,12 +1173,11 @@ JSONL
|
||||
sleep 0.5
|
||||
[ "$(posts)" -eq 1 ]
|
||||
[[ "$(jq -r .text "$TMP/posts")" == *"91% of the 5-hour window"* ]]
|
||||
# next window, but a client is attached: no post, and that window is done
|
||||
tmux -S "$DEVDESK_SOCKET" new-session -d -s watcher 'sleep 30'
|
||||
script -qc "tmux -S '$DEVDESK_SOCKET' attach -t =alpha" /dev/null </dev/null >/dev/null 2>&1 &
|
||||
for _ in $(seq 1 30); do [ -n "$(tmux -S "$DEVDESK_SOCKET" list-clients -F x)" ] && break; sleep 0.1; done
|
||||
# next window, but a DevDesk tab is in view: no post, and that window is done
|
||||
mkdir -p "$DEVDESK_PRESENCE_DIR" && touch "$DEVDESK_PRESENCE_DIR/1"
|
||||
sl 95 2000018000
|
||||
sleep 1
|
||||
for _ in $(seq 1 30); do [ "$(cat "$DEVDESK_STATE_DIR/usage-warned")" = 2000018000 ] && break; sleep 0.1; done
|
||||
sleep 0.5
|
||||
[ "$(posts)" -eq 1 ]
|
||||
[ "$(cat "$DEVDESK_STATE_DIR/usage-warned")" = 2000018000 ]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user