Several Claude Code sessions on one pill no longer clobber each other (upstream #562)

PillSessionRegistry (upstream 5652ea8, after #245 by @TheodoreRiant) tracks the live
sessions behind each pill: only the last session takes the card and its diffs down, a
Stop finishes the pill only when no sibling is mid-turn, the 5.2 s idle reset is skipped
when a new turn started, and the oldest live session owns the name and folder (passed on
when it ends). Upstream tests pass on our copy: bash scripts/test-session-registry.sh.

Co-Authored-By: TheodoreRiant <57949703+TheodoreRiant@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maksarsanjeev
2026-10-14 00:16:01 +03:00
parent 08949d136c
commit c0447ca327
4 changed files with 452 additions and 12 deletions
+8
View File
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/.."
TEST_DIR="$(mktemp -d "${TMPDIR:-/tmp}/coucou-session-registry.XXXXXX")"
trap 'rm -rf "$TEST_DIR"' EXIT
swiftc NotchBuddy/Sources/App/PillSessionRegistry.swift \
tests/PillSessionRegistryTests.swift -o "$TEST_DIR/session-registry-tests"
"$TEST_DIR/session-registry-tests"