Files
marcandClaude Opus 5 9507761bce Colour, a page you can see the edge of, and a document on its own
Five of the nine things on the list, and one finding that came out of them.

Colour: a marker pen and an ink colour, written as marks here rather than
installed — the schema of a note decides what can be stored in it forever. A
highlight is a <mark> so a reader that drops the colour still shows the word
as marked, and marked text is painted dark whatever the theme. Both travel as
HTML in Markdown, like underline, and both are read back.

The PDF fills the screen: the browser's own full screen for the window frame,
an overlay for the sidebar and the list, Escape and a visible button for the
way out.

The dashboard leads with the recent notes, sorted by time whatever order the
notebooks are in. A tap on the blank part of a page puts the caret at the
nearest position instead of nowhere. A drag from the left edge shows the
sidebar. The page has an edge on a phone, where it had none.

The finding: at the speed a robot types, a long note loses keystrokes between
the editor and the pagination measuring after each one — 87 of 220
paragraphs. Nothing is lost at 50 characters a second, so the page-count
check now pastes its bulk text rather than measuring typing throughput. And
the history suite asked for "the first note in the list" without waiting for
the note to reach the server; it asks by name now.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-26 12:40:21 +02:00

50 lines
1.6 KiB
Bash
Executable File

#!/usr/bin/env bash
# Runs the browser suites against a running InkNote.
#
# ./e2e/run.sh # all suites
# ./e2e/run.sh editor drawing # only these
#
# Needs the dev stack up (docker compose -f docker-compose.dev.yml up -d) and an
# admin account to create throwaway users with — marc/geheim123 by default,
# override with INKNOTE_ADMIN / INKNOTE_ADMIN_PASS.
set -uo pipefail
cd "$(dirname "$0")"
IMAGE="mcr.microsoft.com/playwright:v1.49.0-noble"
URL="${INKNOTE_URL:-http://localhost:3000}"
SUITES=("$@")
[ ${#SUITES[@]} -eq 0 ] && SUITES=(admin oidc shell editor search-attachments history drawing export conflict pdf attachments-lifecycle organise chapters tables offline sync)
mkdir -p shots
if [ ! -d node_modules ]; then
echo "→ installing playwright once"
docker run --rm -v "$PWD:/w" -w /w "$IMAGE" npm install --no-audit --no-fund >/dev/null
fi
if ! curl -sf -o /dev/null "$URL"; then
echo "✗ $URL is not answering — start the stack first:"
echo " docker compose -f docker-compose.dev.yml up -d --build"
exit 1
fi
failed=()
for s in "${SUITES[@]}"; do
echo
echo "═══ $s ═══"
docker run --rm --network host \
--add-host idp.test:127.0.0.1 \
-v "$PWD:/w" -v "$PWD/shots:/out" -w /w \
-e INKNOTE_URL="$URL" \
-e INKNOTE_ADMIN="${INKNOTE_ADMIN:-marc}" \
-e INKNOTE_ADMIN_PASS="${INKNOTE_ADMIN_PASS:-geheim123}" \
"$IMAGE" node "$s.mjs" || failed+=("$s")
done
echo
if [ ${#failed[@]} -eq 0 ]; then
echo "═══ all suites passed ═══"
else
echo "═══ FAILED: ${failed[*]} ═══"
exit 1
fi