mirror of
https://github.com/Louis-CFM/coucou.git
synced 2026-12-07 07:32:35 +09:00
A pure model of the sessions sharing a client's pill. Each keeps its own title, state, steps and last message. The pill shows one of them: the most urgent (waiting for you, a turn that just failed, one that just finished, work, an older finish, idle), else the one active last, held 6 s so the pill does not flip between busy sessions. A session that starts waiting while another, active lately, shares the pill pops out into "<pill>#2"…; it folds back once no longer waiting, after 3 s at least, or at once when nobody is left inside. SessionBoard.slots lays out the 4 places beside the focused pill: pills keep their order; a waiting one that would not show takes a free place, else an idle pill's, else a finished one's; working and waiting pills keep theirs; waiting pills left over share a "+N" stack in the last place, the ones waiting longest staying in sight. Tests in scripts/test-session-board.sh, in the Build workflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9 lines
361 B
Bash
Executable File
9 lines
361 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
TEST_DIR="$(mktemp -d "${TMPDIR:-/tmp}/coucou-session-board.XXXXXX")"
|
|
trap 'rm -rf "$TEST_DIR"' EXIT
|
|
swiftc -swift-version 6 -strict-concurrency=complete \
|
|
NotchBuddy/Sources/App/SessionBoard.swift tests/SessionBoardTests.swift -o "$TEST_DIR/session-board-tests"
|
|
"$TEST_DIR/session-board-tests"
|