Files
shotdeck/scripts/render-panels.sh
T
Claude Fable 5 02fa791b78 feat(sessions): keep every session, record review details, name and stamp the PDF
Sessions are now the unit of the product instead of an implicit capture run.

- Nothing is deleted by default: the fixed 10-session cap is gone. An age limit
  (Never / 7 / 14 / 30 / 90 / 180 / 365 days) is chosen in Settings > Sessions and
  applied on launch, after archiving, and by "Clean up now". Sent PDFs are never
  touched.
- Each session carries review details: lane, deployed version, commit, reviewer
  (pre-filled with the Mac user) and a free note. They persist in session.json and
  are inherited by the next session, so a review run is typed once.
- PDF file names are Redline-<yyyyMMdd-HHmm>-<LANE>-<SHORTID>.pdf, and every page
  carries a two-line reference footer (tool, build time, session / lane, deployed
  build, commit, reviewer, note). The PDF document info carries the same values in
  Author and Keywords.
- Verification: 159 tests, a headless panel self-test, and a LaunchServices-driven
  end-to-end run that types and clicks the real panel.
2026-10-31 11:32:54 +04:00

28 lines
947 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# Renders the headless panel PNGs and a sample review PDF for visual verification.
#
# ./scripts/render-panels.sh [output-directory]
#
# Builds nothing: run `swift build` (or ./scripts/build-app.sh) first. The output
# directory is printed at the end; nothing outside it is touched, and the isolated
# model means the real Application Support spool and the real age-limit preference
# are never read or written.
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
OUT_DIR="${1:-$(mktemp -d /tmp/redline-panels.XXXXXX)}"
BINARY="${ROOT}/.build/Redline.app/Contents/MacOS/Shotdeck"
if [[ ! -x "${BINARY}" ]]; then
BINARY="${ROOT}/.build/debug/Shotdeck"
fi
if [[ ! -x "${BINARY}" ]]; then
echo "No Shotdeck binary found. Run swift build or ./scripts/build-app.sh first." >&2
exit 1
fi
mkdir -p "${OUT_DIR}"
SHOTDECK_SNAPSHOT_DIR="${OUT_DIR}" "${BINARY}"
echo "Panels written to ${OUT_DIR}"