A run's own notification (run.notification, server dev) gives the body (the
result's first lines) and the actions with labels in the person's language;
they become the notification's action type. Every notification is
remembered by id (watch::Notes) so a click opens the chat or the task, and
Run again / Pause post /schedules/{id}/run|pause without the window. An
older server's run is said as before. Fixtures re-pinned at server dev
e0c2332, schedule.json added.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
1.6 KiB
Bash
Executable File
30 lines
1.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Copy the server's /api/v2 contract fixtures that tests/ui reads into tests/ui/fixtures/:
|
|
#
|
|
# scripts/fetch-fixtures.sh <server-ref> (a tag such as v2.0.0-beta.8, or a branch)
|
|
#
|
|
# The server is a git checkout, LLeMbas beside this repository by default (LEMBAS_SERVER names
|
|
# another); the files are read from the ref, not from its working tree. SOURCE records the ref and
|
|
# the commit, so the tests say which server they hold the app to. CI has no server checkout: the
|
|
# copies are committed.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
|
|
SERVER="${LEMBAS_SERVER:-../LLeMbas}"
|
|
FROM="tests/fixtures/api_v2"
|
|
OUT="tests/ui/fixtures"
|
|
FILES="chat_agent.json event_ask.json event_status.json event_status_idle.json event_status_person.json
|
|
event_status_stopped.json event_tree.json models_agent.json subagent_findings.json subagent_transcript.json tree.json
|
|
me.json folders.json folder.json search.json memories.json memory.json scope.json push_schedule.json push_schedule_failed.json
|
|
event_schedules.json schedule.json schedule_run.json chat.json chats_listed.json files_listing.json"
|
|
|
|
[ $# -eq 1 ] || { echo "usage: scripts/fetch-fixtures.sh <server-ref>" >&2; exit 2; }
|
|
commit="$(git -C "$SERVER" rev-parse --verify --quiet "$1^{commit}")" \
|
|
|| { echo "fetch-fixtures: $1 is not a commit in $SERVER" >&2; exit 1; }
|
|
mkdir -p "$OUT"
|
|
for f in $FILES; do
|
|
git -C "$SERVER" show "$commit:$FROM/$f" > "$OUT/$f" || { echo "fetch-fixtures: $f is not at $1" >&2; exit 1; }
|
|
done
|
|
printf 'LLeMbas %s (%s) %s\n' "$1" "$commit" "$FROM" > "$OUT/SOURCE"
|
|
echo "fetch-fixtures: $(echo $FILES | wc -w) files from LLeMbas $1 (${commit:0:12}) -> $OUT"
|