M4: real-phone playtest gate (Note 10, 60 fps) #77

Open
opened 2026-11-20 22:31:45 +01:00 by SirStone · 5 comments
Owner

Part of #63

Goal

Human run: laptop-hosted scene, Full HD tiled map (1920x1080 max; the import shrinks any larger image, #85), 50 tokens, fog active, phone over LAN TLS/h2.

Acceptance criteria

  • Checklist with fps/load numbers (Note 10 and laptop), sign-in with the phone keyboard, drag and pinch, reconnect on network toggle
  • Failures filed as issues
  • Pass/fail recorded
  • Standing gate: devbox run test and devbox run e2e green on the build under test on a clean checkout, no test weakened or skipped; the manual steps above are recorded with real numbers.

User stories covered

  • 64 — As the owner, I want the real-phone run as one explicit human checklist, so that the remaining risk is visible and bounded.

Proven at

manual

Notes

  • Size: S (about one agent session, ~100K tokens). Lane: H (human).
Part of #63 ## Goal Human run: laptop-hosted scene, Full HD tiled map (1920x1080 max; the import shrinks any larger image, #85), 50 tokens, fog active, phone over LAN TLS/h2. ## Acceptance criteria - [ ] Checklist with fps/load numbers (Note 10 and laptop), sign-in with the phone keyboard, drag and pinch, reconnect on network toggle - [ ] Failures filed as issues - [ ] Pass/fail recorded - [ ] Standing gate: `devbox run test` and `devbox run e2e` green on the build under test on a clean checkout, no test weakened or skipped; the manual steps above are recorded with real numbers. ## User stories covered - 64 — As the owner, I want the real-phone run as one explicit human checklist, so that the remaining risk is visible and bounded. ## Proven at manual ## Notes - Size: S (about one agent session, ~100K tokens). Lane: H (human).
SirStone added the ready-for-humanenhancement labels 2026-11-20 22:31:45 +01:00
SirStone added a new dependency 2026-11-20 22:31:46 +01:00
SirStone added a new dependency 2026-11-20 22:31:46 +01:00
SirStone added a new dependency 2026-11-21 15:09:52 +01:00
SirStone added a new dependency 2026-11-21 15:09:52 +01:00
SirStone added a new dependency 2026-11-21 15:09:52 +01:00
Author
Owner

Superseded by this comment — kept for history. The hand-written nginx/TLS block, the manual scene row patch and the fixture tiles below are replaced by devbox run serve and fff-vtt import.

Playtest checklist — Note 10 + laptop, 16384 px map, 50 tokens

Build under test: the commit this comment is posted against (git rev-parse HEAD). First prove it:
devbox run test, devbox run client-test, devbox run e2e green on a clean checkout (standing
gate in this ticket). Do not run the phone pass on a tree that has not passed those.

The recipe below was smoke-tested locally over TLS/h2 (healthz {"status":"ok"}, / 200 h2,
/_tiles/ 404, 50-token seed). It uses the same vhost shape as tools/nginx.mjs, but binds the
LAN IP and uses a certificate whose SAN is that IP.

1. One-time on the laptop (repo root, in devbox shell or with devbox run --)

devbox run test                       # server gate + Node harnesses (run client-test/e2e too)
devbox run -- nimble install -d -y
devbox run -- nim c --mm:orc --nimblePath:.devbox/nimble/pkgs2 \
    --nimcache:run/nimcache/fff-vtt -o:run/fff-vtt server/main.nim
devbox run -- bash -c 'cd client && npm ci --no-audit --no-fund && npm run build'

LAN_IP=$(ip -4 route get 1.1.1.1 | awk '{print $7; exit}')
echo "LAN_IP=$LAN_IP"                 # put this in the phone URL
mkdir -p run/lan/tls run/lan/nginx/{client_body,proxy,fastcgi,uwsgi,scgi}
GM_KEY=$(devbox run -- ./run/fff-vtt gm-key --state-dir=run/lan | sed -n 's/^GM key[^:]*: //p')
echo "GM_KEY=$GM_KEY"

# The 16384 px target scene (w/h are importer-only fields; write the row before boot).
devbox run -- sqlite3 run/lan/state.db "UPDATE scene SET w=16384,h=16384,tile_size=32,cell=32 WHERE id=1"

# Fixture tiles for the centre window (solid colours are fine for an fps gate; swap in real art
# later and keep the same 32 px grid). This is ~20k small PNGs, a few seconds.
devbox run -- node --input-type=module -e "
import { writeTileGrid } from './tools/tilefixture.mjs';
writeTileGrid('run/lan', { scene: 1, artVersion: 1, size: 32, x0: 186, x1: 326, y0: 186, y1: 326 });
"

2. Certificate + vhost (laptop, still repo root)

devbox run -- openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -nodes -sha256 \
  -days 3 -keyout run/lan/tls/key.pem -out run/lan/tls/cert.pem -subj "/CN=fff-vtt lan" \
  -addext "subjectAltName=IP:$LAN_IP" -addext "basicConstraints=critical,CA:TRUE" \
  -addext "keyUsage=critical,digitalSignature,keyCertSign" -addext "extendedKeyUsage=serverAuth"

cat > run/lan/nginx/nginx.conf <<EOF
daemon off;
worker_processes 1;
pid $PWD/run/lan/nginx/nginx.pid;
error_log $PWD/run/lan/nginx/error.log warn;
events { worker_connections 128; }
http {
  access_log $PWD/run/lan/nginx/access.log;
  client_body_temp_path $PWD/run/lan/nginx/client_body;
  proxy_temp_path $PWD/run/lan/nginx/proxy;
  fastcgi_temp_path $PWD/run/lan/nginx/fastcgi;
  uwsgi_temp_path $PWD/run/lan/nginx/uwsgi;
  scgi_temp_path $PWD/run/lan/nginx/scgi;
  server_tokens off;
  default_type application/octet-stream;
  types { text/html html; text/css css; application/javascript js; application/json json; image/png png; }
  map \$http_upgrade \$conn_up { default upgrade; '' close; }
  server {
    listen $LAN_IP:8443 ssl;
    http2 on;
    ssl_certificate $PWD/run/lan/tls/cert.pem;
    ssl_certificate_key $PWD/run/lan/tls/key.pem;
    ssl_protocols TLSv1.2 TLSv1.3;
    server_name $LAN_IP;
    location = /healthz { proxy_pass http://127.0.0.1:8080; }
    location = /join { proxy_pass http://127.0.0.1:8080; access_log off; }
    location /tiles/ { proxy_pass http://127.0.0.1:8080; }
    location = /ws {
      proxy_pass http://127.0.0.1:8080;
      proxy_http_version 1.1;
      proxy_set_header Upgrade \$http_upgrade;
      proxy_set_header Connection \$conn_up;
      proxy_read_timeout 1h;
      proxy_buffering off;
    }
    location /_tiles/ { internal; alias $PWD/run/lan/tiles/; }
    location /assets/ { root $PWD/client/dist; try_files \$uri =404; add_header Cache-Control "public, max-age=31536000, immutable" always; }
    location = /index.html { root $PWD/client/dist; try_files /index.html =404; add_header Cache-Control "no-cache" always; }
    location / { root $PWD/client/dist; try_files \$uri \$uri/ /index.html; add_header Cache-Control "no-cache" always; }
  }
}
EOF

Start the two processes in separate terminals:

devbox run -- ./run/fff-vtt --port=8080 --state-dir=run/lan --public-origin=https://$LAN_IP:8443
devbox run -- nginx -p "$PWD/run/lan/nginx" -c "$PWD/run/lan/nginx/nginx.conf"

Laptop sanity check (expect {"status":"ok"} and HTTP/2):

curl -s --http2 -k https://$LAN_IP:8443/healthz; echo
curl -s -o /dev/null -w "%{http_code} %{http_version}\n" --http2 -k https://$LAN_IP:8443/
curl -s -o /dev/null -w "%{http_code}\n" -k https://$LAN_IP:8443/_tiles/1/v1/256_256.png   # 404

3. Seed the 50-token scene and the player key (third terminal)

export NODE_EXTRA_CA_CERTS=$PWD/run/lan/tls/cert.pem
ORIGIN="https://$LAN_IP:8443" GM_KEY="$GM_KEY" devbox run -- node --input-type=module -e '
import { openAs } from "./tools/withserver.mjs";
import { createPlayer, namePlayer } from "./tools/lib.mjs";
const origin = process.env.ORIGIN, gmKey = process.env.GM_KEY;
const gm = await openAs(origin, gmKey);
await gm.ws.waitText("hello"); await gm.ws.waitText("walls");
const p = await createPlayer(gm.ws);
await namePlayer(origin, p.key, "Player");
const own = await gm.ws.request({ t: "token.create", scene: 1, kind: "pc", pos: [8192, 8192],
  descriptive_name: "Player", actual_name: "Player", controller: p.id,
  flags: { vision: true }, vision_radius: 400, radius: 20 });
if (!own.ok) throw new Error(JSON.stringify(own));
for (let i = 0; i < 49; i++) {
  const a = await gm.ws.request({ t: "token.create", scene: 1, kind: "npc",
    pos: [8192 + ((i % 7) - 3) * 28, 8192 + (Math.floor(i / 7) - 3) * 28],
    descriptive_name: "T" + i, actual_name: "T" + i });
  if (!a.ok) throw new Error(JSON.stringify(a));
}
console.log("PLAYER_KEY=" + p.key);
gm.ws.close();
'

Copy the printed PLAYER_KEY. The GM can sign in on the laptop at the same URL with $GM_KEY
(roster/panels control).

4. Phone setup and measurement

  1. Phone on the same Wi-Fi. Chrome → https://$LAN_IP:8443 → “Advanced” → “Proceed” (self-signed
    cert). Paste the player key into the sign-in field (this is the phone-keyboard check), submit,
    choose the display name once.
  2. Measurement rig: enable Android USB debugging, connect USB, accept the prompt, open
    chrome://inspect/#devices on the laptop, “inspect” the phone tab. In DevTools:
    ⋮ → More tools → Rendering → tick Frame Rendering Stats (FPS meter); use the Performance
    panel for a 10 s recording and read the frame track for p95.
  3. Cold load (3 runs): Chrome → Settings → Privacy → clear cached images (or use Incognito),
    then stopwatch from tapping Sign in to the map fully painted (no black placeholders). Record
    the median.
  4. Warm reload (3 runs): reload the page with the session cookie; same stopwatch. Record median.
  5. FPS runs (10 s each, same zoom 1, fog active): idle; pan by dragging empty floor; drag your
    token around for 10 s; pinch in/out. Record the FPS meter median and the Performance p95 frame.
  6. Reconnect: airplane mode on for 5 s (badge must go offline/reconnecting), off; time from
    network return to connected with the same map, no reload.
  7. Laptop control: repeat 4-6 in the laptop Chrome (no throttle) against the same URL; the
    laptop is expected to sit at ~60 fps.

Pass thresholds (record actuals, do not round up)

Item Pass
FPS, idle / pan / drag / pinch (phone) median ≥ 55 fps and p95 frame ≤ 25 ms in every run
Cold first viewport (phone, tile 32) ≤ 1.5 s; if over, set tile_size=64 (scene row + regenerate 64 px tiles), restart, re-measure; pass if either meets it
Warm reload (phone) ≤ 1.0 s
Reconnect ≤ 5 s after network returns, no reload, same map
Correctness no black tile holes after load, no console errors, drag/pinch/grid work, sign-in by phone keyboard works

If the phone misses a threshold, that is a fail for this ticket: file one Gitea issue per distinct
cause with the numbers and the DevTools trace, link it here, and note whether the 64 px fallback
rescues it.

5. Record and clean up

Post one comment on this ticket with:

Run Device Build SHA Cold fill Warm reload fps idle/pan/drag/pinch p95 frame Reconnect Pass/fail

Add: browser version, LAN_IP, tile_size, Wi-Fi band, date, and the path to any DevTools trace /
screen recording. Then Ctrl-C both terminals; keep run/lan/ if you filed a bug, otherwise
rm -rf run/lan (it holds the keys). #63/#62 close only after this comment says pass.

**Superseded by [this comment](https://git.fossellini.top/SirStone/FFF_vtt/issues/77#issuecomment-2983)** — kept for history. The hand-written nginx/TLS block, the manual `scene` row patch and the fixture tiles below are replaced by `devbox run serve` and `fff-vtt import`. ## Playtest checklist — Note 10 + laptop, 16384 px map, 50 tokens Build under test: the commit this comment is posted against (`git rev-parse HEAD`). First prove it: `devbox run test`, `devbox run client-test`, `devbox run e2e` green on a clean checkout (standing gate in this ticket). Do not run the phone pass on a tree that has not passed those. The recipe below was smoke-tested locally over TLS/h2 (healthz `{"status":"ok"}`, `/` 200 h2, `/_tiles/` 404, 50-token seed). It uses the same vhost shape as `tools/nginx.mjs`, but binds the LAN IP and uses a certificate whose SAN is that IP. ### 1. One-time on the laptop (repo root, in `devbox shell` or with `devbox run --`) ```sh devbox run test # server gate + Node harnesses (run client-test/e2e too) devbox run -- nimble install -d -y devbox run -- nim c --mm:orc --nimblePath:.devbox/nimble/pkgs2 \ --nimcache:run/nimcache/fff-vtt -o:run/fff-vtt server/main.nim devbox run -- bash -c 'cd client && npm ci --no-audit --no-fund && npm run build' LAN_IP=$(ip -4 route get 1.1.1.1 | awk '{print $7; exit}') echo "LAN_IP=$LAN_IP" # put this in the phone URL mkdir -p run/lan/tls run/lan/nginx/{client_body,proxy,fastcgi,uwsgi,scgi} GM_KEY=$(devbox run -- ./run/fff-vtt gm-key --state-dir=run/lan | sed -n 's/^GM key[^:]*: //p') echo "GM_KEY=$GM_KEY" # The 16384 px target scene (w/h are importer-only fields; write the row before boot). devbox run -- sqlite3 run/lan/state.db "UPDATE scene SET w=16384,h=16384,tile_size=32,cell=32 WHERE id=1" # Fixture tiles for the centre window (solid colours are fine for an fps gate; swap in real art # later and keep the same 32 px grid). This is ~20k small PNGs, a few seconds. devbox run -- node --input-type=module -e " import { writeTileGrid } from './tools/tilefixture.mjs'; writeTileGrid('run/lan', { scene: 1, artVersion: 1, size: 32, x0: 186, x1: 326, y0: 186, y1: 326 }); " ``` ### 2. Certificate + vhost (laptop, still repo root) ```sh devbox run -- openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -nodes -sha256 \ -days 3 -keyout run/lan/tls/key.pem -out run/lan/tls/cert.pem -subj "/CN=fff-vtt lan" \ -addext "subjectAltName=IP:$LAN_IP" -addext "basicConstraints=critical,CA:TRUE" \ -addext "keyUsage=critical,digitalSignature,keyCertSign" -addext "extendedKeyUsage=serverAuth" cat > run/lan/nginx/nginx.conf <<EOF daemon off; worker_processes 1; pid $PWD/run/lan/nginx/nginx.pid; error_log $PWD/run/lan/nginx/error.log warn; events { worker_connections 128; } http { access_log $PWD/run/lan/nginx/access.log; client_body_temp_path $PWD/run/lan/nginx/client_body; proxy_temp_path $PWD/run/lan/nginx/proxy; fastcgi_temp_path $PWD/run/lan/nginx/fastcgi; uwsgi_temp_path $PWD/run/lan/nginx/uwsgi; scgi_temp_path $PWD/run/lan/nginx/scgi; server_tokens off; default_type application/octet-stream; types { text/html html; text/css css; application/javascript js; application/json json; image/png png; } map \$http_upgrade \$conn_up { default upgrade; '' close; } server { listen $LAN_IP:8443 ssl; http2 on; ssl_certificate $PWD/run/lan/tls/cert.pem; ssl_certificate_key $PWD/run/lan/tls/key.pem; ssl_protocols TLSv1.2 TLSv1.3; server_name $LAN_IP; location = /healthz { proxy_pass http://127.0.0.1:8080; } location = /join { proxy_pass http://127.0.0.1:8080; access_log off; } location /tiles/ { proxy_pass http://127.0.0.1:8080; } location = /ws { proxy_pass http://127.0.0.1:8080; proxy_http_version 1.1; proxy_set_header Upgrade \$http_upgrade; proxy_set_header Connection \$conn_up; proxy_read_timeout 1h; proxy_buffering off; } location /_tiles/ { internal; alias $PWD/run/lan/tiles/; } location /assets/ { root $PWD/client/dist; try_files \$uri =404; add_header Cache-Control "public, max-age=31536000, immutable" always; } location = /index.html { root $PWD/client/dist; try_files /index.html =404; add_header Cache-Control "no-cache" always; } location / { root $PWD/client/dist; try_files \$uri \$uri/ /index.html; add_header Cache-Control "no-cache" always; } } } EOF ``` Start the two processes in separate terminals: ```sh devbox run -- ./run/fff-vtt --port=8080 --state-dir=run/lan --public-origin=https://$LAN_IP:8443 devbox run -- nginx -p "$PWD/run/lan/nginx" -c "$PWD/run/lan/nginx/nginx.conf" ``` Laptop sanity check (expect `{"status":"ok"}` and HTTP/2): ```sh curl -s --http2 -k https://$LAN_IP:8443/healthz; echo curl -s -o /dev/null -w "%{http_code} %{http_version}\n" --http2 -k https://$LAN_IP:8443/ curl -s -o /dev/null -w "%{http_code}\n" -k https://$LAN_IP:8443/_tiles/1/v1/256_256.png # 404 ``` ### 3. Seed the 50-token scene and the player key (third terminal) ```sh export NODE_EXTRA_CA_CERTS=$PWD/run/lan/tls/cert.pem ORIGIN="https://$LAN_IP:8443" GM_KEY="$GM_KEY" devbox run -- node --input-type=module -e ' import { openAs } from "./tools/withserver.mjs"; import { createPlayer, namePlayer } from "./tools/lib.mjs"; const origin = process.env.ORIGIN, gmKey = process.env.GM_KEY; const gm = await openAs(origin, gmKey); await gm.ws.waitText("hello"); await gm.ws.waitText("walls"); const p = await createPlayer(gm.ws); await namePlayer(origin, p.key, "Player"); const own = await gm.ws.request({ t: "token.create", scene: 1, kind: "pc", pos: [8192, 8192], descriptive_name: "Player", actual_name: "Player", controller: p.id, flags: { vision: true }, vision_radius: 400, radius: 20 }); if (!own.ok) throw new Error(JSON.stringify(own)); for (let i = 0; i < 49; i++) { const a = await gm.ws.request({ t: "token.create", scene: 1, kind: "npc", pos: [8192 + ((i % 7) - 3) * 28, 8192 + (Math.floor(i / 7) - 3) * 28], descriptive_name: "T" + i, actual_name: "T" + i }); if (!a.ok) throw new Error(JSON.stringify(a)); } console.log("PLAYER_KEY=" + p.key); gm.ws.close(); ' ``` Copy the printed `PLAYER_KEY`. The GM can sign in on the laptop at the same URL with `$GM_KEY` (roster/panels control). ### 4. Phone setup and measurement 1. Phone on the same Wi-Fi. Chrome → `https://$LAN_IP:8443` → “Advanced” → “Proceed” (self-signed cert). Paste the player key into the sign-in field (this is the phone-keyboard check), submit, choose the display name once. 2. Measurement rig: enable Android USB debugging, connect USB, accept the prompt, open `chrome://inspect/#devices` on the laptop, “inspect” the phone tab. In DevTools: ⋮ → More tools → Rendering → tick **Frame Rendering Stats** (FPS meter); use the Performance panel for a 10 s recording and read the frame track for p95. 3. **Cold load** (3 runs): Chrome → Settings → Privacy → clear cached images (or use Incognito), then stopwatch from tapping *Sign in* to the map fully painted (no black placeholders). Record the median. 4. **Warm reload** (3 runs): reload the page with the session cookie; same stopwatch. Record median. 5. **FPS runs** (10 s each, same zoom 1, fog active): idle; pan by dragging empty floor; drag your token around for 10 s; pinch in/out. Record the FPS meter median and the Performance p95 frame. 6. **Reconnect:** airplane mode on for 5 s (badge must go `offline`/`reconnecting`), off; time from network return to `connected` with the same map, no reload. 7. **Laptop control:** repeat 4-6 in the laptop Chrome (no throttle) against the same URL; the laptop is expected to sit at ~60 fps. ### Pass thresholds (record actuals, do not round up) | Item | Pass | |---|---| | FPS, idle / pan / drag / pinch (phone) | median **≥ 55 fps** and p95 frame **≤ 25 ms** in every run | | Cold first viewport (phone, tile 32) | **≤ 1.5 s**; if over, set `tile_size=64` (scene row + regenerate 64 px tiles), restart, re-measure; pass if either meets it | | Warm reload (phone) | **≤ 1.0 s** | | Reconnect | **≤ 5 s** after network returns, no reload, same map | | Correctness | no black tile holes after load, no console errors, drag/pinch/grid work, sign-in by phone keyboard works | If the phone misses a threshold, that is a **fail** for this ticket: file one Gitea issue per distinct cause with the numbers and the DevTools trace, link it here, and note whether the 64 px fallback rescues it. ### 5. Record and clean up Post one comment on this ticket with: | Run | Device | Build SHA | Cold fill | Warm reload | fps idle/pan/drag/pinch | p95 frame | Reconnect | Pass/fail | |---|---|---|---|---|---|---|---|---| Add: browser version, `LAN_IP`, `tile_size`, Wi-Fi band, date, and the path to any DevTools trace / screen recording. Then `Ctrl-C` both terminals; keep `run/lan/` if you filed a bug, otherwise `rm -rf run/lan` (it holds the keys). `#63`/`#62` close only after this comment says **pass**.
Author
Owner

Superseded by #issuecomment-2993 (v3 checklist: one-command import, devbox run seed, ?perf=1 overlay).

Playtest checklist v2 — Note 10 + laptop, 16384 px map, 50 tokens

Replaces the first checklist. What changed: devbox run serve replaces the hand-written nginx/TLS block, fff-vtt import replaces the manual scene row patch + fixture tiles, and the GM token panel now sets vision (#78). Budget: ~20 min of gates, ~1 h hands-on.

Build under test: git rev-parse --short HEAD — write it down. Everything below assumes 3567058 or later (that is the tree with devbox run serve and fff-vtt import).

0. Prove the build first (once)

  1. Repo root, clean checkout.
  2. devbox run test → ends green (server gate + Node harnesses).
  3. devbox run client-test → green. Then devbox run e2e → green.
    Any red line: stop, the phone numbers are not valid.

1. Make the map file (once, a few minutes, needs ~2 GB temp)

  1. Generate the 16384 px source (or use your own single-frame 16384×16384 PNG/WebP):
devbox run -- magick -limit memory 256MiB -limit map 512MiB \
  -size 16384x16384 -define gradient:angle=135 gradient:'#2f3b33-#8a8f7a' -depth 8 \
  -fill '#5b4636' -draw 'rectangle 4096,4096 12288,12288' \
  -fill '#7a5c3e' -draw 'rectangle 6144,7168 10240,9216' \
  run/map16384.png

Expect: run/map16384.png; devbox run -- magick identify run/map16384.png prints PNG 16384x16384 ... 8-bit.

2. First start — this creates the state dir, scene, GM key, cert (once)

  1. devbox run serve (~2 min; builds server + client).
  2. Copy from its output: the URL: (https://<lan-ip>:8443), the GM key:, and the cert: path.
    Expect: it also prints the phone (Android) and laptop certificate-trust steps.
  3. In a second terminal: curl -sk https://<lan-ip>:8443/healthz → {"status":"ok"}.
  4. Ctrl-C the serve terminal. Expect: stopped; state, GM key and certificate are on disk.

3. Import the map — the server must be stopped

  1. devbox run -- ./run/fff-vtt import --state-dir=run/lan --image=run/map16384.png --tile-size=64
    Expect: after a few minutes, imported run/map16384.png: 16384x16384 px, tile 64 px, 256x256 tiles -> .../run/lan/tiles/1/v1 (art_version 1).
    64 px is deliberate: 32 px on 16384 px is 262,144 tile files; 64 is the README's designed fallback.
  2. devbox run serve again. Expect: same URL: and same GM key: as step 6 (the server only reads the scene row at startup, hence the restart).

4. Trust the certificate (once per device, per LAN address)

  1. Laptop: run the line serve printed for your OS (Linux: sudo cp run/lan/tls/cert.pem /usr/local/share/ca-certificates/fff-vtt-lan.crt && sudo update-ca-certificates).
  2. Phone: Chrome → the URL → Advanced → Proceed. That tap alone is enough.
  3. Optional, to stop the warning: adb push run/lan/tls/cert.pem /sdcard/Download/fff-vtt-lan.crt, then Settings → Security → Encryption & credentials → Install a certificate → CA certificate.
    adb is not in devbox.json; on this NixOS host use nix shell nixpkgs#android-tools -c adb ... (or install platform-tools). You need adb at step 32 anyway.

5. GM on the laptop

  1. Open the URL, paste the GM key, Sign in.
    Expect: the map centred on 8192,8192 (grey-green gradient with two brown rectangles) and the right-hand GM column: GM table, Characters, Walls.
  2. GM table → Create player key → copy the key.
    Expect: one roster entry; key is 5 groups of 4.

6. Phone: first sign-in (before the token exists — black screen is correct)

  1. Phone Chrome → same URL → paste the player key → Sign in.
  2. Type a display name → continue.
  3. Expect: badge Connected, screen black/empty fog. The player has no token with vision yet, so the server serves no tiles — this is the #78 behaviour, not a bug.

7. Seed 49 NPC tokens — script, because the UI has no bulk create

  1. Replace URL and key, run:
cd ~/Projects/GDR/FFF_vtt
export NODE_EXTRA_CA_CERTS=$PWD/run/lan/tls/cert.pem
ORIGIN="https://<lan-ip>:8443" GM_KEY="<gm-key>" devbox run -- node --input-type=module -e '
import { openAs } from "./tools/withserver.mjs";
const gm = await openAs(process.env.ORIGIN, process.env.GM_KEY);
await gm.ws.waitText("hello");
for (let i = 0; i < 49; i++) {
  const a = await gm.ws.request({ t: "token.create", scene: 1, kind: "npc",
    pos: [8192 + ((i % 7) - 3) * 28, 8192 + (Math.floor(i / 7) - 3) * 28],
    descriptive_name: "T" + i, actual_name: "T" + i });
  if (!a.ok) throw new Error(JSON.stringify(a));
}
gm.ws.close(); process.exit(0);
'

Expect: exit 0, no output; the GM page's token list grows to 49 live.
Panel-only alternative: the token form 49 times (~10 min of clicking, same result).
Why a script: the token panel creates one token per submit; nothing in the client mass-creates tokens.

8. The player's token with sight — the #78 check

  1. GM table → token form: Kind pc, Descriptive name Player, Actual name Player, X 8192, Y 8192 (the form defaults to 400,400 — change both), Radius blank, Vision ✓, Vision radius 400, Controller = your player → Create token.
  2. Expect: 50th token at the centre; the phone's black screen becomes map inside a clear disc of radius 400, dimmed where already explored, black elsewhere.
    Still black? The Vision flag did not take: select the token, tick Vision, Save token (that edit path is part of #78).

9. What to try on the phone

  1. One-finger drag → the map pans, no lag, no rubber-banding.
  2. Pinch → zoom in and out, clamp 0.5×–4×.
  3. Drag your token ~100 px → it follows the finger, then stays where you dropped it.
  4. Drag your own token into a wall → it snaps back to the last position. Expect: no hint where the wall is.
  5. Look at the fog: opaque black = never seen, dimmed = seen earlier, clear = visible now.
  6. Laptop, Walls → Window, click two points beside the player → Players see a marker on. Expect: a lit-window icon on the phone once that window has been in sight.
  7. Door, click two points, select it, Open door → the phone's sight and fog update immediately; Close → back.
  8. Select the door, tick Secret → Expect: the phone shows nothing at all (looks like solid wall).
  9. One-way, draw it between the player and a token, click Flip direction → Expect: the far token disappears/appears with the flip.
  10. Laptop → Who sees it section (under Characters) → move the player's token or a wall so a token enters/leaves sight. Expect: that token's row flips between nobody (0 %) and <player> (100 %).

10. Measure fps — the client has no fps counter, so use USB debugging

  1. Phone: Settings → About phone → tap Build number 7× → Developer options → USB debugging on. Plug in USB, accept the prompt.
  2. Laptop: nix shell nixpkgs#android-tools -c adb devices → the phone's serial is listed.
  3. Laptop Chrome: chrome://inspect/#devices → your phone's tab → inspect.
  4. In that DevTools: ⋮ → More tools → Rendering → tick Frame Rendering Stats. An FPS meter overlays the phone page.
  5. Record 10 s median fps for: idle, one-finger pan, dragging your token, pinching. Same zoom (1×), fog active, all 50 tokens in sight.
  6. p95: Performance panel → record 10 s of the drag run → read the frame track. (Note 10 is a 60 Hz panel, so 60 fps is the cap, not a floor to beat.)
  7. Laptop control: same four runs in the laptop's own DevTools (no adb needed) at the same URL.

11. Load times

  1. Cold, 3 runs: Chrome → ⋮ → History → Clear browsing data → cached images and files (or an Incognito tab + paste the key). Stopwatch from tapping Sign in to the map fully painted, no black squares. Record the median.
  2. Warm, 3 runs: reload the tab (session cookie still valid), same stopwatch.

12. Reconnect

  1. Wi-Fi off for 5 s → badge Reconnecting… or Offline → Wi-Fi on → Connected within ~5 s, same map, no reload.
  2. Ctrl-C devbox run serve, start it again → phone returns to Connected with the same map and token positions; the GM page too, no re-key.

13. Record

  1. Post one comment on this ticket with the table below plus: device + Android/Chrome version, laptop OS + Chrome version, LAN_IP, tile size (64), Wi-Fi band, date, and paths to any trace/screen recording.
  2. Any miss → one new issue per distinct cause with the numbers and the trace, linked here. Then Ctrl-C serve; keep run/lan/ if you filed a bug (it holds the keys), otherwise rm -rf run/lan.

Pass/fail (write the numbers in your comment)

Item Pass Write here
fps idle / pan / drag / pinch, phone 60 fps (DESIGN §13 M4 gate). Median ≥ 55 with p95 frame ≤ 25 ms counts as holding 60; median < 55 is a fail median fps + p95 ms, per run
Same four runs, laptop same median fps + p95 ms
Cold first paint, phone no phone number in DESIGN — record it. Black tiles still streaming in after the map is up = fail median ms of 3
Warm reload, phone record it; should be clearly under cold median ms of 3
Reconnect after Wi-Fi toggle Connected ≤ 5 s, no reload, same map seconds
Reconnect after server restart same map, no re-key, no GM action seconds
Fog: 3 states, window marker, door open/close, secret door, one-way flip, who-sees-it behaves as in steps 26–31 pass/fail + note
Sign-in by phone keyboard (paste or type), display name once works pass/fail
Console no errors in the inspected tab's console pass/fail + first error
Build gate (steps 2–3) test, client-test, e2e green on HEAD HEAD sha + green

#63 / #62 close only after this comment says pass.

> **Superseded by [#issuecomment-2993](#issuecomment-2993)** (v3 checklist: one-command import, `devbox run seed`, `?perf=1` overlay). ## Playtest checklist v2 — Note 10 + laptop, 16384 px map, 50 tokens Replaces the [first checklist](#issuecomment-2962). What changed: `devbox run serve` replaces the hand-written nginx/TLS block, `fff-vtt import` replaces the manual `scene` row patch + fixture tiles, and the GM token panel now sets vision (#78). Budget: ~20 min of gates, ~1 h hands-on. Build under test: `git rev-parse --short HEAD` — write it down. Everything below assumes **3567058 or later** (that is the tree with `devbox run serve` and `fff-vtt import`). ### 0. Prove the build first (once) 1. Repo root, clean checkout. 2. `devbox run test` → ends green (server gate + Node harnesses). 3. `devbox run client-test` → green. Then `devbox run e2e` → green. Any red line: stop, the phone numbers are not valid. ### 1. Make the map file (once, a few minutes, needs ~2 GB temp) 4. Generate the 16384 px source (or use your own single-frame 16384×16384 PNG/WebP): ```sh devbox run -- magick -limit memory 256MiB -limit map 512MiB \ -size 16384x16384 -define gradient:angle=135 gradient:'#2f3b33-#8a8f7a' -depth 8 \ -fill '#5b4636' -draw 'rectangle 4096,4096 12288,12288' \ -fill '#7a5c3e' -draw 'rectangle 6144,7168 10240,9216' \ run/map16384.png ``` **Expect:** `run/map16384.png`; `devbox run -- magick identify run/map16384.png` prints `PNG 16384x16384 ... 8-bit`. ### 2. First start — this creates the state dir, scene, GM key, cert (once) 5. `devbox run serve` (~2 min; builds server + client). 6. Copy from its output: the `URL:` (`https://<lan-ip>:8443`), the `GM key:`, and the `cert:` path. **Expect:** it also prints the phone (Android) and laptop certificate-trust steps. 7. In a second terminal: `curl -sk https://<lan-ip>:8443/healthz` → `{"status":"ok"}`. 8. Ctrl-C the `serve` terminal. **Expect:** `stopped; state, GM key and certificate are on disk`. ### 3. Import the map — the server must be stopped 9. `devbox run -- ./run/fff-vtt import --state-dir=run/lan --image=run/map16384.png --tile-size=64` **Expect:** after a few minutes, `imported run/map16384.png: 16384x16384 px, tile 64 px, 256x256 tiles -> .../run/lan/tiles/1/v1 (art_version 1)`. 64 px is deliberate: 32 px on 16384 px is 262,144 tile files; 64 is the README's designed fallback. 10. `devbox run serve` again. **Expect:** same `URL:` and same `GM key:` as step 6 (the server only reads the scene row at startup, hence the restart). ### 4. Trust the certificate (once per device, per LAN address) 11. Laptop: run the line `serve` printed for your OS (Linux: `sudo cp run/lan/tls/cert.pem /usr/local/share/ca-certificates/fff-vtt-lan.crt && sudo update-ca-certificates`). 12. Phone: Chrome → the URL → `Advanced` → `Proceed`. That tap alone is enough. 13. Optional, to stop the warning: `adb push run/lan/tls/cert.pem /sdcard/Download/fff-vtt-lan.crt`, then Settings → Security → Encryption & credentials → Install a certificate → CA certificate. `adb` is **not** in `devbox.json`; on this NixOS host use `nix shell nixpkgs#android-tools -c adb ...` (or install platform-tools). You need adb at step 32 anyway. ### 5. GM on the laptop 14. Open the URL, paste the GM key, `Sign in`. **Expect:** the map centred on 8192,8192 (grey-green gradient with two brown rectangles) and the right-hand GM column: `GM table`, `Characters`, `Walls`. 15. `GM table` → `Create player key` → copy the key. **Expect:** one roster entry; key is 5 groups of 4. ### 6. Phone: first sign-in (before the token exists — black screen is correct) 16. Phone Chrome → same URL → paste the player key → `Sign in`. 17. Type a display name → continue. 18. **Expect:** badge `Connected`, screen black/empty fog. The player has no token with vision yet, so the server serves no tiles — this is the #78 behaviour, not a bug. ### 7. Seed 49 NPC tokens — script, because the UI has no bulk create 19. Replace URL and key, run: ```sh cd ~/Projects/GDR/FFF_vtt export NODE_EXTRA_CA_CERTS=$PWD/run/lan/tls/cert.pem ORIGIN="https://<lan-ip>:8443" GM_KEY="<gm-key>" devbox run -- node --input-type=module -e ' import { openAs } from "./tools/withserver.mjs"; const gm = await openAs(process.env.ORIGIN, process.env.GM_KEY); await gm.ws.waitText("hello"); for (let i = 0; i < 49; i++) { const a = await gm.ws.request({ t: "token.create", scene: 1, kind: "npc", pos: [8192 + ((i % 7) - 3) * 28, 8192 + (Math.floor(i / 7) - 3) * 28], descriptive_name: "T" + i, actual_name: "T" + i }); if (!a.ok) throw new Error(JSON.stringify(a)); } gm.ws.close(); process.exit(0); ' ``` **Expect:** exit 0, no output; the GM page's token list grows to 49 live. Panel-only alternative: the token form 49 times (~10 min of clicking, same result). Why a script: the token panel creates one token per submit; nothing in the client mass-creates tokens. ### 8. The player's token with sight — the #78 check 20. `GM table` → token form: Kind `pc`, Descriptive name `Player`, Actual name `Player`, **X `8192`**, **Y `8192`** (the form defaults to 400,400 — change both), Radius blank, **Vision ✓**, Vision radius `400`, Controller = your player → `Create token`. 21. **Expect:** 50th token at the centre; the phone's black screen becomes map inside a clear disc of radius 400, dimmed where already explored, black elsewhere. Still black? The Vision flag did not take: select the token, tick `Vision`, `Save token` (that edit path is part of #78). ### 9. What to try on the phone 22. One-finger drag → the map pans, no lag, no rubber-banding. 23. Pinch → zoom in and out, clamp 0.5×–4×. 24. Drag your token ~100 px → it follows the finger, then stays where you dropped it. 25. Drag your own token into a wall → it snaps back to the last position. **Expect:** no hint where the wall is. 26. Look at the fog: opaque black = never seen, dimmed = seen earlier, clear = visible now. 27. Laptop, `Walls` → `Window`, click two points beside the player → `Players see a marker` on. **Expect:** a lit-window icon on the phone once that window has been in sight. 28. `Door`, click two points, select it, `Open door` → the phone's sight and fog update immediately; `Close` → back. 29. Select the door, tick `Secret` → **Expect:** the phone shows nothing at all (looks like solid wall). 30. `One-way`, draw it between the player and a token, click `Flip direction` → **Expect:** the far token disappears/appears with the flip. 31. Laptop → `Who sees it` section (under `Characters`) → move the player's token or a wall so a token enters/leaves sight. **Expect:** that token's row flips between `nobody (0 %)` and `<player> (100 %)`. ### 10. Measure fps — the client has no fps counter, so use USB debugging 32. Phone: Settings → About phone → tap Build number 7× → Developer options → USB debugging on. Plug in USB, accept the prompt. 33. Laptop: `nix shell nixpkgs#android-tools -c adb devices` → the phone's serial is listed. 34. Laptop Chrome: `chrome://inspect/#devices` → your phone's tab → `inspect`. 35. In that DevTools: ⋮ → More tools → Rendering → tick **Frame Rendering Stats**. An FPS meter overlays the phone page. 36. Record 10 s median fps for: idle, one-finger pan, dragging your token, pinching. Same zoom (1×), fog active, all 50 tokens in sight. 37. p95: Performance panel → record 10 s of the drag run → read the frame track. (Note 10 is a 60 Hz panel, so 60 fps is the cap, not a floor to beat.) 38. Laptop control: same four runs in the laptop's own DevTools (no adb needed) at the same URL. ### 11. Load times 39. Cold, 3 runs: Chrome → ⋮ → History → Clear browsing data → cached images and files (or an Incognito tab + paste the key). Stopwatch from tapping `Sign in` to the map fully painted, no black squares. Record the median. 40. Warm, 3 runs: reload the tab (session cookie still valid), same stopwatch. ### 12. Reconnect 41. Wi-Fi off for 5 s → badge `Reconnecting…` or `Offline` → Wi-Fi on → `Connected` within ~5 s, same map, no reload. 42. Ctrl-C `devbox run serve`, start it again → phone returns to `Connected` with the same map and token positions; the GM page too, no re-key. ### 13. Record 43. Post one comment on this ticket with the table below plus: device + Android/Chrome version, laptop OS + Chrome version, `LAN_IP`, tile size (64), Wi-Fi band, date, and paths to any trace/screen recording. 44. Any miss → one new issue per distinct cause with the numbers and the trace, linked here. Then Ctrl-C `serve`; keep `run/lan/` if you filed a bug (it holds the keys), otherwise `rm -rf run/lan`. ### Pass/fail (write the numbers in your comment) | Item | Pass | Write here | |---|---|---| | fps idle / pan / drag / pinch, **phone** | **60 fps** (DESIGN §13 M4 gate). Median ≥ 55 with p95 frame ≤ 25 ms counts as holding 60; median < 55 is a fail | median fps + p95 ms, per run | | Same four runs, **laptop** | same | median fps + p95 ms | | Cold first paint, phone | no phone number in DESIGN — record it. Black tiles still streaming in after the map is up = fail | median ms of 3 | | Warm reload, phone | record it; should be clearly under cold | median ms of 3 | | Reconnect after Wi-Fi toggle | `Connected` ≤ 5 s, no reload, same map | seconds | | Reconnect after server restart | same map, no re-key, no GM action | seconds | | Fog: 3 states, window marker, door open/close, secret door, one-way flip, who-sees-it | behaves as in steps 26–31 | pass/fail + note | | Sign-in by phone keyboard (paste or type), display name once | works | pass/fail | | Console | no errors in the inspected tab's console | pass/fail + first error | | Build gate (steps 2–3) | `test`, `client-test`, `e2e` green on HEAD | HEAD sha + green | `#63` / `#62` close only after this comment says **pass**.
Author
Owner

Superseded by #issuecomment-3050 (v4 checklist: Full HD cap, auto-shrink on import, no tile-size recipe).

Playtest checklist v3 — one-command import, seeded tokens, in-app fps

Supersedes the v2 checklist in #issuecomment-2983. What changed: devbox run serve -- --image=… imports and starts in one command, devbox run seed makes the 49 NPC tokens over the real WebSocket, and ?perf=1 shows fps on the phone without USB/adb. Budget: ~20 min gates, ~45 min hands-on.

Build under test: git rev-parse --short HEAD — write it down. This assumes 30b3559 or later (#82 overlay/fresh import/seed, #84 -- args actually reaching the scripts).

0. Prove the build first (once)

  1. Repo root, clean checkout at 9c7f9de or later.
  2. devbox run test → ends green.
  3. devbox run client-test → green.
  4. devbox run e2e → green. If a red line: stop; phone numbers are not valid.
    4b. Sanity-check the command seam: devbox run serve -- --dry-run prints serve: dry-run and the parsed host/port/state-dir/image/tile-size (no build, no server). That proves the -- arguments reach serve.mjs on this build (#84); an unknown flag now exits non-zero instead of being ignored.

1. Make the map file (once, a few minutes, ~2 GB temp)

  1. Generate the 16384 px source (or use your own single-frame 16384×16384 PNG/WebP):
devbox run -- magick -limit memory 256MiB -limit map 512MiB \
  -size 16384x16384 -define gradient:angle=135 gradient:'#2f3b33-#8a8f7a' -depth 8 \
  -fill '#5b4636' -draw 'rectangle 4096,4096 12288,12288' \
  -fill '#7a5c3e' -draw 'rectangle 6144,7168 10240,9216' \
  run/map16384.png
  1. Expect: devbox run -- magick identify run/map16384.png prints PNG 16384x16384 ... 8-bit.

2. First start — import and serve in one command (once)

  1. devbox run serve -- --image=run/map16384.png --tile-size=64
  2. Expect: first a line serve: importing run/map16384.png before starting the server... and fff-vtt import: created/migrated .../state.db ..., then imported ... 16384x16384 px, tile 64 px, 256x256 tiles; then URL:, GM key:, cert: and the certificate-trust steps. No second start needed.
  3. Copy the URL: (https://<lan-ip>:8443), the GM key: and the cert: path.
  4. In a second terminal: curl -sk https://<lan-ip>:8443/healthz → {"status":"ok"}.

3. Trust the certificate (once per device, per LAN address)

  1. Laptop: run the line serve printed for your OS. NixOS prints security.pki.certificateFiles = [ "<state>/tls/cert.pem" ]; then sudo nixos-rebuild switch (or home-manager switch); Chrome's Advanced → Proceed alone is enough for the playtest. Debian/other Linux prints sudo cp run/lan/tls/cert.pem /usr/local/share/ca-certificates/fff-vtt-lan.crt && sudo update-ca-certificates. macOS/Firefox lines are printed too.
  2. Phone Chrome → the URL → Advanced → Proceed. That tap alone is enough.
  3. Optional, to stop the warning: adb push run/lan/tls/cert.pem /sdcard/Download/fff-vtt-lan.crt, then Settings → Security → Encryption & credentials → Install a certificate → CA certificate. adb is not in devbox; use nix shell nixpkgs#android-tools -c adb ... on this host.

4. GM on the laptop

  1. Open the URL, paste the GM key, Sign in.
  2. Expect: the map centred on 8192,8192 and the GM panels (GM table, Characters, Walls).
  3. GM table → Create player key → copy the key. Expect: one roster entry, key in 5 groups of 4.

5. Phone: first sign-in (black screen is correct)

  1. Phone Chrome → same URL → paste the player key → Sign in; type a display name once.
  2. Expect: badge Connected, screen black/empty fog. The player has no vision token yet, so the server serves no tiles — that is #78 behaviour, not a bug.

6. Seed 49 NPC tokens (one command, not 49 submits)

  1. In the laptop terminal, trust the LAN certificate for Node:
export NODE_EXTRA_CA_CERTS=$PWD/run/lan/tls/cert.pem
  1. Run (replace <lan-ip>; --key is optional — without it the key is read from run/lan):
devbox run seed -- --url=https://<lan-ip>:8443 --tokens=49 --vision=1
  1. Expect: exit 0 and seeded 49 tokens (49 created, 0 already present, 0 removed) ... scene 1 16384x16384, seed 1, vision 1 x 400 px; the GM token list grows to 49 live.
  2. Rerun the same command. Expect: seeded 49 tokens (0 created, 49 already present, 0 removed) — it does not double up. To rebuild the layout: add --replace (or change --seed=).

7. The player's token with sight

  1. GM table → token form: Kind pc, Descriptive name Player, Actual name Player. Leave X/Y as they are — they now default to the current viewport centre (8192,8192 at the initial view). Radius blank, Vision ✓, Vision radius 400, Controller = your player → Create token.
  2. Expect: the 50th token at the centre; the phone's black screen becomes map inside a clear disc of radius 400, dimmed where explored, black elsewhere.
  3. If it stays black: select the token, tick Vision, Save token (the edit path is #78).

8. What to try on the phone

  1. One-finger drag → the map pans with no rubber-banding.
  2. Pinch → zoom in/out; it clamps at 0.5× and 4×.
  3. Drag your token ~100 px → it follows the finger, then stays where you dropped it.
  4. Drag your token into a wall → it snaps back. Expect: no hint where the wall is.
  5. Fog: opaque black = never seen, dimmed = seen earlier, clear = visible now.
  6. Laptop Walls → Window, click two points beside the player → Players see a marker. Expect: a lit-window icon on the phone once seen.
  7. Door, click two points, select it, Open door / Close. Expect: the phone's sight and fog update immediately.
  8. Select the door, tick Secret → Expect: the phone shows nothing (looks like solid wall).
  9. One-way, draw it between the player and a token, click Flip direction → Expect: the far token appears/disappears with the flip.
  10. Who sees it → move the player's token or a wall so a token enters/leaves sight. Expect: nobody (0 %) ↔ <player> (100 %).

9. Measure fps — the overlay, no USB

  1. On the phone, edit the URL to end in ?perf=1 (e.g. https://<lan-ip>:8443/?perf=1) and reload; sign in if asked.
  2. Expect: a top-right overlay reading like fps 59.8 · frame p50 16.6 p95 17.1 ms · JS p50 1.20 p95 2.40 ms · tokens 50 · zoom 1.00. It is off by default and costs nothing when off.
  3. Same zoom (1×), fog active, all 50 tokens in sight: hold still 10 s and write the overlay numbers. Then repeat while panning, while dragging your token, while pinching.
  4. Optional cross-check: nix shell nixpkgs#android-tools -c adb devices, then laptop Chrome chrome://inspect/#devices → inspect → ⋮ More tools → Rendering → Frame Rendering Stats. The overlay is the primary number; this is the independent check.
  5. Laptop control: open the same ?perf=1 URL in the laptop's Chrome and record the same four runs.

10. Load times

  1. Cold, 3 runs: clear cached images and files (or an Incognito tab + paste the key), stopwatch from tapping Sign in to the map fully painted, no black squares. Record the median.
  2. Warm, 3 runs: reload the tab (session cookie still valid), same stopwatch.

11. Reconnect

  1. Wi-Fi off for 5 s → badge Reconnecting…/Offline → Wi-Fi on → Connected, same map, no reload. Record the seconds.
  2. Ctrl-C devbox run serve, start it again (no --image this time) → first it prints serve: no --image given, keeping current map (16384x16384, tile 64, art v<N>), then phone and GM return to Connected with the same map and token positions, no re-key. Record the seconds.

12. Record

  1. Post one comment here with the table below plus: device + Android/Chrome version, laptop OS + Chrome version, LAN_IP, tile size (64), Wi-Fi band, date, and paths to any trace/screen recording.
  2. Any miss → one new issue per distinct cause with the numbers/trace, linked here. Then Ctrl-C serve; keep run/lan/ if you filed a bug (it holds the keys), otherwise rm -rf run/lan.

Pass/fail (write the numbers in your comment)

Item Pass Write here
fps idle / pan / drag / pinch, phone 60 fps (DESIGN §13 M4 gate: 50 tokens, 16384 px tiled map, fog active). 60 Hz panel: 60 is the cap median fps + p95 frame ms, per run
Same four runs, laptop 60 fps median fps + p95 frame ms
First viewport fill, phone DESIGN §13 tile-size gate (b) is a manual phone run with no fixed number — record; black tiles still streaming once the map is up is a fail ms/visual, 3 runs
Cold first paint, phone no DESIGN number — record median ms of 3
Warm reload, phone no DESIGN number — record median ms of 3
Reconnect after Wi-Fi toggle no DESIGN number — record seconds
Reconnect after server restart same map, no re-key, no GM action; record seconds
Fog: 3 states, window marker, door open/close, secret door, one-way flip, who-sees-it behaves as in steps 26–35 pass/fail + note
Sign-in by phone keyboard (paste or type), display name once works pass/fail
Console no errors in the inspected tab's console pass/fail + first error
Build gate (steps 2–4) test, client-test, e2e green on HEAD HEAD sha + green

#63 / #62 close only after this comment says pass.

> **Superseded by [#issuecomment-3050](#issuecomment-3050)** (v4 checklist: Full HD cap, auto-shrink on import, no tile-size recipe). ## Playtest checklist v3 — one-command import, seeded tokens, in-app fps Supersedes the v2 checklist in [#issuecomment-2983](#issuecomment-2983). What changed: `devbox run serve -- --image=…` imports and starts in one command, `devbox run seed` makes the 49 NPC tokens over the real WebSocket, and `?perf=1` shows fps on the phone without USB/adb. Budget: ~20 min gates, ~45 min hands-on. Build under test: `git rev-parse --short HEAD` — write it down. This assumes **30b3559 or later** (#82 overlay/fresh import/seed, #84 `--` args actually reaching the scripts). ### 0. Prove the build first (once) 1. Repo root, clean checkout at 9c7f9de or later. 2. `devbox run test` → ends green. 3. `devbox run client-test` → green. 4. `devbox run e2e` → green. If a red line: stop; phone numbers are not valid. 4b. Sanity-check the command seam: `devbox run serve -- --dry-run` prints `serve: dry-run` and the parsed `host/port/state-dir/image/tile-size` (no build, no server). That proves the `--` arguments reach `serve.mjs` on this build (#84); an unknown flag now exits non-zero instead of being ignored. ### 1. Make the map file (once, a few minutes, ~2 GB temp) 5. Generate the 16384 px source (or use your own single-frame 16384×16384 PNG/WebP): ```sh devbox run -- magick -limit memory 256MiB -limit map 512MiB \ -size 16384x16384 -define gradient:angle=135 gradient:'#2f3b33-#8a8f7a' -depth 8 \ -fill '#5b4636' -draw 'rectangle 4096,4096 12288,12288' \ -fill '#7a5c3e' -draw 'rectangle 6144,7168 10240,9216' \ run/map16384.png ``` 6. **Expect:** `devbox run -- magick identify run/map16384.png` prints `PNG 16384x16384 ... 8-bit`. ### 2. First start — import and serve in one command (once) 7. `devbox run serve -- --image=run/map16384.png --tile-size=64` 8. **Expect:** first a line `serve: importing run/map16384.png before starting the server...` and `fff-vtt import: created/migrated .../state.db ...`, then `imported ... 16384x16384 px, tile 64 px, 256x256 tiles`; then `URL:`, `GM key:`, `cert:` and the certificate-trust steps. No second start needed. 9. Copy the `URL:` (`https://<lan-ip>:8443`), the `GM key:` and the `cert:` path. 10. In a second terminal: `curl -sk https://<lan-ip>:8443/healthz` → `{"status":"ok"}`. ### 3. Trust the certificate (once per device, per LAN address) 11. Laptop: run the line `serve` printed for your OS. NixOS prints `security.pki.certificateFiles = [ "<state>/tls/cert.pem" ];` then `sudo nixos-rebuild switch` (or home-manager switch); Chrome's `Advanced` → `Proceed` alone is enough for the playtest. Debian/other Linux prints `sudo cp run/lan/tls/cert.pem /usr/local/share/ca-certificates/fff-vtt-lan.crt && sudo update-ca-certificates`. macOS/Firefox lines are printed too. 12. Phone Chrome → the URL → `Advanced` → `Proceed`. That tap alone is enough. 13. Optional, to stop the warning: `adb push run/lan/tls/cert.pem /sdcard/Download/fff-vtt-lan.crt`, then Settings → Security → Encryption & credentials → Install a certificate → CA certificate. `adb` is not in devbox; use `nix shell nixpkgs#android-tools -c adb ...` on this host. ### 4. GM on the laptop 14. Open the URL, paste the GM key, `Sign in`. 15. **Expect:** the map centred on 8192,8192 and the GM panels (`GM table`, `Characters`, `Walls`). 16. `GM table` → `Create player key` → copy the key. **Expect:** one roster entry, key in 5 groups of 4. ### 5. Phone: first sign-in (black screen is correct) 17. Phone Chrome → same URL → paste the player key → `Sign in`; type a display name once. 18. **Expect:** badge `Connected`, screen black/empty fog. The player has no vision token yet, so the server serves no tiles — that is #78 behaviour, not a bug. ### 6. Seed 49 NPC tokens (one command, not 49 submits) 19. In the laptop terminal, trust the LAN certificate for Node: ```sh export NODE_EXTRA_CA_CERTS=$PWD/run/lan/tls/cert.pem ``` 20. Run (replace `<lan-ip>`; `--key` is optional — without it the key is read from `run/lan`): ```sh devbox run seed -- --url=https://<lan-ip>:8443 --tokens=49 --vision=1 ``` 21. **Expect:** exit 0 and `seeded 49 tokens (49 created, 0 already present, 0 removed) ... scene 1 16384x16384, seed 1, vision 1 x 400 px`; the GM token list grows to 49 live. 22. Rerun the same command. **Expect:** `seeded 49 tokens (0 created, 49 already present, 0 removed)` — it does not double up. To rebuild the layout: add `--replace` (or change `--seed=`). ### 7. The player's token with sight 23. `GM table` → token form: Kind `pc`, Descriptive name `Player`, Actual name `Player`. Leave X/Y as they are — they now default to the **current viewport centre** (8192,8192 at the initial view). Radius blank, **Vision ✓**, Vision radius `400`, Controller = your player → `Create token`. 24. **Expect:** the 50th token at the centre; the phone's black screen becomes map inside a clear disc of radius 400, dimmed where explored, black elsewhere. 25. If it stays black: select the token, tick `Vision`, `Save token` (the edit path is #78). ### 8. What to try on the phone 26. One-finger drag → the map pans with no rubber-banding. 27. Pinch → zoom in/out; it clamps at 0.5× and 4×. 28. Drag your token ~100 px → it follows the finger, then stays where you dropped it. 29. Drag your token into a wall → it snaps back. **Expect:** no hint where the wall is. 30. Fog: opaque black = never seen, dimmed = seen earlier, clear = visible now. 31. Laptop `Walls` → `Window`, click two points beside the player → `Players see a marker`. **Expect:** a lit-window icon on the phone once seen. 32. `Door`, click two points, select it, `Open door` / `Close`. **Expect:** the phone's sight and fog update immediately. 33. Select the door, tick `Secret` → **Expect:** the phone shows nothing (looks like solid wall). 34. `One-way`, draw it between the player and a token, click `Flip direction` → **Expect:** the far token appears/disappears with the flip. 35. `Who sees it` → move the player's token or a wall so a token enters/leaves sight. **Expect:** `nobody (0 %)` ↔ `<player> (100 %)`. ### 9. Measure fps — the overlay, no USB 36. On the phone, edit the URL to end in `?perf=1` (e.g. `https://<lan-ip>:8443/?perf=1`) and reload; sign in if asked. 37. **Expect:** a top-right overlay reading like `fps 59.8 · frame p50 16.6 p95 17.1 ms · JS p50 1.20 p95 2.40 ms · tokens 50 · zoom 1.00`. It is off by default and costs nothing when off. 38. Same zoom (1×), fog active, all 50 tokens in sight: hold still 10 s and write the overlay numbers. Then repeat while panning, while dragging your token, while pinching. 39. Optional cross-check: `nix shell nixpkgs#android-tools -c adb devices`, then laptop Chrome `chrome://inspect/#devices` → inspect → ⋮ More tools → Rendering → Frame Rendering Stats. The overlay is the primary number; this is the independent check. 40. Laptop control: open the same `?perf=1` URL in the laptop's Chrome and record the same four runs. ### 10. Load times 41. Cold, 3 runs: clear `cached images and files` (or an Incognito tab + paste the key), stopwatch from tapping `Sign in` to the map fully painted, no black squares. Record the median. 42. Warm, 3 runs: reload the tab (session cookie still valid), same stopwatch. ### 11. Reconnect 43. Wi-Fi off for 5 s → badge `Reconnecting…`/`Offline` → Wi-Fi on → `Connected`, same map, no reload. Record the seconds. 44. Ctrl-C `devbox run serve`, start it again (no `--image` this time) → first it prints `serve: no --image given, keeping current map (16384x16384, tile 64, art v<N>)`, then phone and GM return to `Connected` with the same map and token positions, no re-key. Record the seconds. ### 12. Record 45. Post one comment here with the table below plus: device + Android/Chrome version, laptop OS + Chrome version, `LAN_IP`, tile size (64), Wi-Fi band, date, and paths to any trace/screen recording. 46. Any miss → one new issue per distinct cause with the numbers/trace, linked here. Then Ctrl-C `serve`; keep `run/lan/` if you filed a bug (it holds the keys), otherwise `rm -rf run/lan`. ### Pass/fail (write the numbers in your comment) | Item | Pass | Write here | |---|---|---| | fps idle / pan / drag / pinch, **phone** | **60 fps** (DESIGN §13 M4 gate: 50 tokens, 16384 px tiled map, fog active). 60 Hz panel: 60 is the cap | median fps + p95 frame ms, per run | | Same four runs, **laptop** | **60 fps** | median fps + p95 frame ms | | First viewport fill, phone | DESIGN §13 tile-size gate (b) is a manual phone run with no fixed number — **record**; black tiles still streaming once the map is up is a fail | ms/visual, 3 runs | | Cold first paint, phone | no DESIGN number — **record** | median ms of 3 | | Warm reload, phone | no DESIGN number — **record** | median ms of 3 | | Reconnect after Wi-Fi toggle | no DESIGN number — **record** | seconds | | Reconnect after server restart | same map, no re-key, no GM action; **record** | seconds | | Fog: 3 states, window marker, door open/close, secret door, one-way flip, who-sees-it | behaves as in steps 26–35 | pass/fail + note | | Sign-in by phone keyboard (paste or type), display name once | works | pass/fail | | Console | no errors in the inspected tab's console | pass/fail + first error | | Build gate (steps 2–4) | `test`, `client-test`, `e2e` green on HEAD | HEAD sha + green | `#63` / `#62` close only after this comment says **pass**.
SirStone added a new dependency 2026-11-21 20:19:06 +01:00
SirStone added a new dependency 2026-11-21 21:38:40 +01:00
SirStone added a new dependency 2026-11-21 21:38:59 +01:00
Author
Owner

Superseded by #issuecomment-3083 — kept for history (v5 fixes the token count, 403, wall-line and seed-spacing wording).

Playtest checklist v4 — Full HD cap, auto-shrink on import, seeded tokens

Supersedes the v3 checklist in #issuecomment-2993. What changed: map images are capped at Full HD (#85, ADR-0023). Any image works — the import shrinks a larger one automatically and prints scaled WxH → WxH; scene w,h become the shrunk size. The 16384/64 tile-size recipe is gone. The gate scene is the Full HD maximum (1920×1080); the old square run/map16384.png still imports but becomes 1080×1080, so regenerate the map at 16:9 for the max-scene numbers.

Build under test: git rev-parse --short HEAD — write it down. This assumes 43947d1 or later (#85, on top of #84's -- forwarding and #82's seed/overlay).

0. Prove the build first (once)

  1. Repo root, clean checkout at 43947d1 or later.
  2. devbox run test → green.
  3. devbox run client-test → green.
  4. devbox run e2e → green. If a red line: stop, phone numbers are not valid.
    4b. devbox run serve -- --dry-run prints serve: dry-run and the parsed options (proves -- reaches the script).

1. Make the map file (once, a few minutes, ~2 GB temp)

  1. Generate a 16:9 source, or use any single-frame PNG/WebP:
rm -f run/map16384.png
devbox run -- magick -limit memory 256MiB -limit map 512MiB \
  -size 16384x9216 -define gradient:angle=135 gradient:'#2f3b33-#8a8f7a' -depth 8 \
  -fill '#5b4636' -draw 'rectangle 4096,2304 12288,6912' \
  -fill '#7a5c3e' -draw 'rectangle 6144,4032 10240,5184' \
  run/map16384.png
  1. Expect: devbox run -- magick identify run/map16384.png prints PNG 16384x9216 ... 8-bit. (An older 16384×16384 file also imports; it shrinks to 1080×1080, not the max.)

2. First start — import and serve in one command (once)

  1. devbox run serve -- --image=run/map16384.png (no --tile-size: the cap makes 32 px practical)
  2. Expect, in order: serve: importing ..., then the import's own scaled 16384×9216 → 1920×1080 and imported ...: 1920x1080 px, tile 32 px, 60x34 tiles, then URL:, GM key:, cert: and the trust steps. No second start.
  3. Copy the URL: (https://<lan-ip>:8443), the GM key: and the cert: path. If the state dir still holds an old 16384 scene and you start without --image, serve now also prints WARNING: map is 16384x16384, above the Full HD cap ...; re-import to shrink.
  4. Second terminal: curl -sk https://<lan-ip>:8443/healthz → {"status":"ok"}.

3. Trust the certificate (once per device, per LAN address)

  1. Laptop: run the line serve printed for your OS. NixOS prints security.pki.certificateFiles = [ "<state>/tls/cert.pem" ]; + sudo nixos-rebuild switch; Chrome's Advanced → Proceed alone is enough. Debian prints the update-ca-certificates pair. macOS/Firefox lines are printed too.
  2. Phone Chrome → the URL → Advanced → Proceed.
  3. Optional (no more warning): adb push run/lan/tls/cert.pem /sdcard/Download/fff-vtt-lan.crt, then Settings → Security → Encryption & credentials → Install a certificate → CA certificate. adb is not in devbox; use nix shell nixpkgs#android-tools -c adb ....

4. GM on the laptop

  1. Open the URL, paste the GM key, Sign in.
  2. Expect: the map centred on 960,540 and the GM panels (GM table, Characters, Walls).
  3. GM table → Create player key → copy the key.

5. Phone: first sign-in (black screen is correct)

  1. Phone Chrome → same URL → paste the player key → Sign in; type a display name once.
  2. Expect: badge Connected, screen black/empty fog (the player has no vision token yet — #78 behaviour, not a bug).

6. Seed 49 NPC tokens (one command)

  1. In the laptop terminal:
export NODE_EXTRA_CA_CERTS=$PWD/run/lan/tls/cert.pem
devbox run seed -- --url=https://<lan-ip>:8443 --tokens=49 --vision=1
  1. Expect: exit 0 and seeded 49 tokens (49 created, 0 already present, 0 removed) ... scene 1 1920x1080, seed 1, vision 1 x 400 px; the GM token list grows to 49. On the Full HD map the 7×7 grid spacing is ≥~130 px in both axes (token diameter 40 px), so nothing overlaps badly; on a 1080×1080 square it is ≥~86 px, still clear.
  2. Rerun → 0 created, 49 already present, 0 removed. --replace rebuilds; --seed= changes the layout.

7. The player's token with sight

  1. GM table → token form: Kind pc, names Player, leave X/Y at their current viewport centre (960,540 here), Radius blank, Vision ✓, Vision radius 400, Controller = your player → Create token.
  2. Expect: 50th token at the centre; the phone's black screen becomes map inside a clear disc of radius 400, dimmed where explored, black elsewhere.
  3. Still black: select the token, tick Vision, Save token (#78).

8. What to try on the phone

  1. One-finger drag → pan with no rubber-banding.
  2. Pinch → zoom, clamps 0.5×–4×.
  3. Drag your token ~100 px → follows then stays; drag into a wall → snaps back with no wall hint.
  4. Fog: opaque black = never seen, dimmed = seen earlier, clear = visible now.
  5. Laptop Walls → Window beside the player → Players see a marker; Door + open/close updates sight; tick Secret looks like a wall; One-way + flip toggles a token in/out of sight.
  6. Who sees it while moving the token/a wall.
  7. Reconnect: toggle Wi-Fi/airplane mode; badge reconnecting → connected, same view, no reload. Repeat with the laptop server killed and restarted.

9. Record the numbers

  1. Phone, ?perf=1 appended to the URL: record fps, frame ms, JS ms, tokens (50), zoom. The M4 target is 60 fps (PROPOSED) with 50 tokens and fog active; also record the first-load time and the laptop's view.
  2. File any failure as an issue (label bug, link this ticket) and record pass/fail in this ticket.

Standing gate for the pass: devbox run test, devbox run client-test, devbox run e2e green on the commit under test, no test weakened or skipped.

> **Superseded by [#issuecomment-3083](https://git.fossellini.top/SirStone/FFF_vtt/issues/77#issuecomment-3083)** — kept for history (v5 fixes the token count, 403, wall-line and seed-spacing wording). ## Playtest checklist v4 — Full HD cap, auto-shrink on import, seeded tokens Supersedes the v3 checklist in [#issuecomment-2993](#issuecomment-2993). What changed: map images are capped at Full HD (#85, ADR-0023). Any image works — the import shrinks a larger one automatically and prints `scaled WxH → WxH`; scene `w,h` become the shrunk size. The 16384/64 tile-size recipe is gone. The gate scene is the Full HD maximum (1920×1080); the old square `run/map16384.png` still imports but becomes 1080×1080, so regenerate the map at 16:9 for the max-scene numbers. Build under test: `git rev-parse --short HEAD` — write it down. This assumes **43947d1 or later** (#85, on top of #84's `--` forwarding and #82's seed/overlay). ### 0. Prove the build first (once) 1. Repo root, clean checkout at 43947d1 or later. 2. `devbox run test` → green. 3. `devbox run client-test` → green. 4. `devbox run e2e` → green. If a red line: stop, phone numbers are not valid. 4b. `devbox run serve -- --dry-run` prints `serve: dry-run` and the parsed options (proves `--` reaches the script). ### 1. Make the map file (once, a few minutes, ~2 GB temp) 5. Generate a 16:9 source, or use any single-frame PNG/WebP: ```sh rm -f run/map16384.png devbox run -- magick -limit memory 256MiB -limit map 512MiB \ -size 16384x9216 -define gradient:angle=135 gradient:'#2f3b33-#8a8f7a' -depth 8 \ -fill '#5b4636' -draw 'rectangle 4096,2304 12288,6912' \ -fill '#7a5c3e' -draw 'rectangle 6144,4032 10240,5184' \ run/map16384.png ``` 6. **Expect:** `devbox run -- magick identify run/map16384.png` prints `PNG 16384x9216 ... 8-bit`. (An older 16384×16384 file also imports; it shrinks to 1080×1080, not the max.) ### 2. First start — import and serve in one command (once) 7. `devbox run serve -- --image=run/map16384.png` (no `--tile-size`: the cap makes 32 px practical) 8. **Expect**, in order: `serve: importing ...`, then the import's own `scaled 16384×9216 → 1920×1080` and `imported ...: 1920x1080 px, tile 32 px, 60x34 tiles`, then `URL:`, `GM key:`, `cert:` and the trust steps. No second start. 9. Copy the `URL:` (`https://<lan-ip>:8443`), the `GM key:` and the `cert:` path. If the state dir still holds an old 16384 scene and you start **without** `--image`, `serve` now also prints `WARNING: map is 16384x16384, above the Full HD cap ...; re-import to shrink.` 10. Second terminal: `curl -sk https://<lan-ip>:8443/healthz` → `{"status":"ok"}`. ### 3. Trust the certificate (once per device, per LAN address) 11. Laptop: run the line `serve` printed for your OS. NixOS prints `security.pki.certificateFiles = [ "<state>/tls/cert.pem" ];` + `sudo nixos-rebuild switch`; Chrome's `Advanced` → `Proceed` alone is enough. Debian prints the `update-ca-certificates` pair. macOS/Firefox lines are printed too. 12. Phone Chrome → the URL → `Advanced` → `Proceed`. 13. Optional (no more warning): `adb push run/lan/tls/cert.pem /sdcard/Download/fff-vtt-lan.crt`, then Settings → Security → Encryption & credentials → Install a certificate → CA certificate. `adb` is not in devbox; use `nix shell nixpkgs#android-tools -c adb ...`. ### 4. GM on the laptop 14. Open the URL, paste the GM key, `Sign in`. 15. **Expect:** the map centred on 960,540 and the GM panels (`GM table`, `Characters`, `Walls`). 16. `GM table` → `Create player key` → copy the key. ### 5. Phone: first sign-in (black screen is correct) 17. Phone Chrome → same URL → paste the player key → `Sign in`; type a display name once. 18. **Expect:** badge `Connected`, screen black/empty fog (the player has no vision token yet — #78 behaviour, not a bug). ### 6. Seed 49 NPC tokens (one command) 19. In the laptop terminal: ```sh export NODE_EXTRA_CA_CERTS=$PWD/run/lan/tls/cert.pem devbox run seed -- --url=https://<lan-ip>:8443 --tokens=49 --vision=1 ``` 20. **Expect:** exit 0 and `seeded 49 tokens (49 created, 0 already present, 0 removed) ... scene 1 1920x1080, seed 1, vision 1 x 400 px`; the GM token list grows to 49. On the Full HD map the 7×7 grid spacing is ≥~130 px in both axes (token diameter 40 px), so nothing overlaps badly; on a 1080×1080 square it is ≥~86 px, still clear. 21. Rerun → `0 created, 49 already present, 0 removed`. `--replace` rebuilds; `--seed=` changes the layout. ### 7. The player's token with sight 22. `GM table` → token form: Kind `pc`, names `Player`, leave X/Y at their **current viewport centre** (960,540 here), Radius blank, **Vision ✓**, Vision radius `400`, Controller = your player → `Create token`. 23. **Expect:** 50th token at the centre; the phone's black screen becomes map inside a clear disc of radius 400, dimmed where explored, black elsewhere. 24. Still black: select the token, tick `Vision`, `Save token` (#78). ### 8. What to try on the phone 25. One-finger drag → pan with no rubber-banding. 26. Pinch → zoom, clamps 0.5×–4×. 27. Drag your token ~100 px → follows then stays; drag into a wall → snaps back with no wall hint. 28. Fog: opaque black = never seen, dimmed = seen earlier, clear = visible now. 29. Laptop `Walls` → `Window` beside the player → `Players see a marker`; `Door` + open/close updates sight; tick `Secret` looks like a wall; `One-way` + flip toggles a token in/out of sight. 30. `Who sees it` while moving the token/a wall. 31. Reconnect: toggle Wi-Fi/airplane mode; badge reconnecting → connected, same view, no reload. Repeat with the laptop server killed and restarted. ### 9. Record the numbers 32. Phone, `?perf=1` appended to the URL: record fps, frame ms, JS ms, tokens (50), zoom. The M4 target is 60 fps (PROPOSED) with 50 tokens and fog active; also record the first-load time and the laptop's view. 33. File any failure as an issue (label `bug`, link this ticket) and record pass/fail in this ticket. Standing gate for the pass: `devbox run test`, `devbox run client-test`, `devbox run e2e` green on the commit under test, no test weakened or skipped.
SirStone added a new dependency 2026-11-21 23:23:52 +01:00
SirStone added a new dependency 2026-11-21 23:23:52 +01:00
Author
Owner

Supersedes the v4 checklist in #issuecomment-3050. Wording fixes from the M4 dry-run: what the perf tokens number counts, which 403s are expected, why a player never sees wall lines, the seed/player-token overlap, the expected first-run "LAN address is new" note, and no pre-auth /ws noise.

Playtest checklist v5 — Full HD cap, seeded tokens, collapsible GM column

Build under test: git rev-parse --short HEAD — write it down. This assumes the HEAD that closes the "GM panel and phone HUD usability" issue (full-HD import, seed, perf overlay, collapsible Panels).

0. Prove the build first (once)

  1. Repo root, clean checkout at that commit.
  2. devbox run test → green.
  3. devbox run client-test → green.
  4. devbox run e2e → green. Any red line: stop; phone numbers are not valid.
  5. devbox run serve -- --dry-run prints serve: dry-run and the parsed options (proves -- reaches the script).

1. Make the map file (once, a few minutes, ~2 GB temp)

  1. Generate a 16:9 source, or use any single-frame PNG/WebP:
rm -f run/map16384.png
devbox run -- magick -limit memory 256MiB -limit map 512MiB \
  -size 16384x9216 -define gradient:angle=135 gradient:'#2f3b33-#8a8f7a' -depth 8 \
  -fill '#5b4636' -draw 'rectangle 4096,2304 12288,6912' \
  -fill '#7a5c3e' -draw 'rectangle 6144,4032 10240,5184' \
  run/map16384.png
  1. Expect: PNG 16384x9216 ... 8-bit; the import shrinks it to 1920×1080.

2. First start — import and serve in one command (once)

  1. devbox run serve -- --image=run/map16384.png (no --tile-size: 32 px is practical at the cap).
  2. Expect, in order: serve: importing ...; scaled 16384×9216 → 1920×1080; imported ...: 1920x1080 px, tile 32 px, 60x34 tiles; URL:; GM key:; cert: and the trust steps.
    On a first run (no saved LAN address/cert) serve also prints NOTE: the LAN address is new (<ip>); the certificate was regenerated. Trust it again. — expected, not an error: trust the printed certificate.
  3. Copy URL: (https://<lan-ip>:8443), GM key: and cert:. Second terminal: curl -sk https://<lan-ip>:8443/healthz → {"status":"ok"}.

3. Trust the certificate (once per device, per LAN address)

  1. Laptop: run the line serve printed (NixOS: security.pki.certificateFiles = [ ... ] + nixos-rebuild switch; Debian: update-ca-certificates). Chrome's Advanced → Proceed alone is enough for the playtest.
  2. Phone Chrome → the URL → Advanced → Proceed.
  3. Optional, to stop the warning: push the cert and install it as a CA (adb is not in devbox; nix shell nixpkgs#android-tools -c adb ... on this host).

4. GM on the laptop — the new column layout

  1. Open the URL, paste the GM key, Sign in.
  2. Expect: the map centred on 960,540. The right-hand column now starts with Walls, then GM table, then Who sees it, then folded Characters / Encountered. Tokens and New token are folded; Roster is open (at most six rows).
  3. GM table → Create player key → copy the key (5 groups of 4).
  4. Select any existing token: Expect its editor scrolls into view near the top; the token list itself is collapsed and capped (own scroll) even with 50 tokens.
  5. Walls is the first block: draw presets, the selected wall's fields and Undo are reachable without scrolling past the lists. Selecting a wall on the map scrolls its editor to the top.

5. Phone: first sign-in (black screen is correct)

  1. Phone Chrome → same URL → paste the player key → Sign in; type a display name once.
  2. Expect: badge Connected, black/empty fog (the player has no vision token yet — #78 behaviour, not a bug). The HUD is one wrapped row (Player · <scene> · <name> · Connected · zoom 1.00); the player's My characters / Encountered panels are folded to two summary rows and each opens to a capped, scrolling list.

6. Seed 49 NPC tokens (one command)

  1. In the laptop terminal:
export NODE_EXTRA_CA_CERTS=$PWD/run/lan/tls/cert.pem
devbox run seed -- --url=https://<lan-ip>:8443 --tokens=49 --vision=1
  1. Expect: exit 0 and seeded 49 tokens (49 created, 0 already present, 0 removed) ... scene 1 1920x1080, seed 1, vision 1 x 400 px; the GM's folded Tokens (49) count updates.
  2. Rerun → 0 created, 49 already present, 0 removed. --replace rebuilds; --seed= changes the jitter.

7. The player's token with sight — mind the seed grid

  1. GM table → open New token: Kind pc, names Player, X 845, Y 540 (the seeded grid puts a token in the centre cell — Seed 25 sits at ~968,554, 16 px from 960,540, so the old "leave X/Y at the viewport centre" advice overlaps it). Radius blank, Vision ✓, Vision radius 400, Controller = your player → Create token.
  2. Expect: the phone's black screen becomes map inside a clear disc of radius 400, dimmed where explored, black elsewhere.
  3. Still black: select the token, tick Vision, Save token (#78).

8. What to try on the phone

  1. One-finger drag → pan, no rubber-banding. Pinch → zoom, clamps 0.5×–4×; the HUD's zoom readout follows.
  2. Drag your token ~100 px → follows, then stays. Drag into a wall → snaps back.
  3. Wall lines never reach a player: the server sends no wall records, so a player cannot see any wall outline — not even the shape of a secret door. A secret door is indistinguishable from a plain wall by design; that is the check, not a failure.
  4. Fog: opaque black = never seen, dimmed = seen earlier, clear = visible now.
  5. Laptop Walls → Window beside the player → Players see a marker: the phone draws the yellow marker once the window has been seen.
  6. Door + open/close updates sight and fog immediately. Tick Secret → the phone shows nothing at all.
  7. One-way + Flip direction toggles a token in/out of sight.
  8. Who sees it while moving the token/a wall: nobody (0 %) ↔ <player> (100 %).

9. Measure fps — the overlay, no USB

  1. On the phone, append ?perf=1 and reload; sign in if asked.
  2. Expect a top-right line like fps 59.8 · frame p50 16.6 p95 17.1 ms · JS p50 1.20 p95 2.40 ms · tokens visible 50 / total 50 · zoom 1.00. The number counts the tokens this client draws: a player only receives tokens in sight, so its total is what that client knows; the GM's total is the whole table.
  3. Same zoom, fog active, all 50 in sight: record 10 s each for idle, pan, token drag, pinch. Laptop control: same four runs at the same ?perf=1 URL.
  4. Optional independent check: nix shell nixpkgs#android-tools -c adb devices, then chrome://inspect/#devices → inspect → ⋮ More tools → Rendering → Frame Rendering Stats.

10. Load times

  1. Cold, 3 runs: clear cached images and files (or Incognito + paste key), stopwatch from tapping Sign in to the map fully painted, no black squares. Record the median.
  2. Warm, 3 runs: reload the tab, same stopwatch. Record the median.

11. Reconnect

  1. Wi-Fi/airplane mode off for 5 s → badge Reconnecting…/Offline → back on → Connected, same map, no reload. Record the seconds.
  2. Ctrl-C serve, start it again without --image (expect serve: no --image given, keeping current map ...) → phone and GM return to Connected, same token positions, no re-key. Record the seconds.

12. Console (what not to file)

  1. On a fresh browser profile the boot no longer dials /ws before sign-in, so there is no refused WebSocket upgrade on a healthy first load. If one appears, that is a bug: file it.
  2. /tiles/... 403s are expected for tiles the player has not seen (or for an unexplored/unknown area). The server refuses them by design and the browser logs the failed request; this is not an app error and must not be filed. A tile that stays black in an area the player should see is the bug.
  3. Any other console error is real: file one issue per distinct cause with the DevTools text.

13. Record

  1. Post one comment here with the table below plus: device + Android/Chrome version, laptop OS + Chrome version, LAN_IP, tile size (32), Wi-Fi band, date, and paths to any trace/screen recording.
  2. Any miss → one issue per distinct cause with the numbers/trace, linked here. Then Ctrl-C serve; keep run/lan/ if you filed a bug (it holds the keys), otherwise rm -rf run/lan.

Pass/fail (write the numbers in your comment)

Item Pass Write here
fps idle / pan / drag / pinch, phone 60 fps (DESIGN §13 M4 gate: 50 tokens, Full HD tiled map, fog active). 60 Hz panel: 60 is the cap median fps + p95 frame ms, per run
Same four runs, laptop 60 fps median fps + p95 frame ms
First viewport fill, phone DESIGN §13 tile-size gate (b): record; black tiles still streaming once the map is up is a fail ms/visual, 3 runs
Cold first paint, phone no DESIGN number — record median ms of 3
Warm reload, phone no DESIGN number — record median ms of 3
Reconnect after Wi-Fi toggle no DESIGN number — record seconds
Reconnect after server restart same map, no re-key, no GM action; record seconds
Fog: 3 states, window marker, door open/close, secret door, one-way flip, who-sees-it behaves as in steps 27–34; wall lines are GM-only and a secret door looks like a wall pass/fail + note
Sign-in by phone keyboard (paste or type), display name once works pass/fail
Console no errors except the expected tile 403s (step 44) pass/fail + first unexpected error
Build gate (steps 2–4) test, client-test, e2e green on HEAD HEAD sha + green

#63 / #62 close only after this comment says pass.

> **Supersedes the v4 checklist in [#issuecomment-3050](#issuecomment-3050).** Wording fixes from the M4 dry-run: what the perf `tokens` number counts, which 403s are expected, why a player never sees wall lines, the seed/player-token overlap, the expected first-run "LAN address is new" note, and no pre-auth `/ws` noise. ## Playtest checklist v5 — Full HD cap, seeded tokens, collapsible GM column Build under test: `git rev-parse --short HEAD` — write it down. This assumes the HEAD that closes the "GM panel and phone HUD usability" issue (full-HD import, seed, perf overlay, collapsible Panels). ### 0. Prove the build first (once) 1. Repo root, clean checkout at that commit. 2. `devbox run test` → green. 3. `devbox run client-test` → green. 4. `devbox run e2e` → green. Any red line: stop; phone numbers are not valid. 5. `devbox run serve -- --dry-run` prints `serve: dry-run` and the parsed options (proves `--` reaches the script). ### 1. Make the map file (once, a few minutes, ~2 GB temp) 6. Generate a 16:9 source, or use any single-frame PNG/WebP: ```sh rm -f run/map16384.png devbox run -- magick -limit memory 256MiB -limit map 512MiB \ -size 16384x9216 -define gradient:angle=135 gradient:'#2f3b33-#8a8f7a' -depth 8 \ -fill '#5b4636' -draw 'rectangle 4096,2304 12288,6912' \ -fill '#7a5c3e' -draw 'rectangle 6144,4032 10240,5184' \ run/map16384.png ``` 7. **Expect:** `PNG 16384x9216 ... 8-bit`; the import shrinks it to 1920×1080. ### 2. First start — import and serve in one command (once) 8. `devbox run serve -- --image=run/map16384.png` (no `--tile-size`: 32 px is practical at the cap). 9. **Expect**, in order: `serve: importing ...`; `scaled 16384×9216 → 1920×1080`; `imported ...: 1920x1080 px, tile 32 px, 60x34 tiles`; `URL:`; `GM key:`; `cert:` and the trust steps. On a first run (no saved LAN address/cert) `serve` also prints `NOTE: the LAN address is new (<ip>); the certificate was regenerated. Trust it again.` — **expected**, not an error: trust the printed certificate. 10. Copy `URL:` (`https://<lan-ip>:8443`), `GM key:` and `cert:`. Second terminal: `curl -sk https://<lan-ip>:8443/healthz` → `{"status":"ok"}`. ### 3. Trust the certificate (once per device, per LAN address) 11. Laptop: run the line `serve` printed (NixOS: `security.pki.certificateFiles = [ ... ]` + `nixos-rebuild switch`; Debian: `update-ca-certificates`). Chrome's `Advanced` → `Proceed` alone is enough for the playtest. 12. Phone Chrome → the URL → `Advanced` → `Proceed`. 13. Optional, to stop the warning: push the cert and install it as a CA (`adb` is not in devbox; `nix shell nixpkgs#android-tools -c adb ...` on this host). ### 4. GM on the laptop — the new column layout 14. Open the URL, paste the GM key, `Sign in`. 15. **Expect:** the map centred on 960,540. The right-hand column now starts with `Walls`, then `GM table`, then `Who sees it`, then folded `Characters` / `Encountered`. `Tokens` and `New token` are folded; `Roster` is open (at most six rows). 16. `GM table` → `Create player key` → copy the key (5 groups of 4). 17. Select any existing token: **Expect** its editor scrolls into view near the top; the token list itself is collapsed and capped (own scroll) even with 50 tokens. 18. `Walls` is the first block: draw presets, the selected wall's fields and Undo are reachable without scrolling past the lists. Selecting a wall on the map scrolls its editor to the top. ### 5. Phone: first sign-in (black screen is correct) 19. Phone Chrome → same URL → paste the player key → `Sign in`; type a display name once. 20. **Expect:** badge `Connected`, black/empty fog (the player has no vision token yet — #78 behaviour, not a bug). The HUD is one wrapped row (`Player · <scene> · <name> · Connected · zoom 1.00`); the player's `My characters` / `Encountered` panels are folded to two summary rows and each opens to a capped, scrolling list. ### 6. Seed 49 NPC tokens (one command) 21. In the laptop terminal: ```sh export NODE_EXTRA_CA_CERTS=$PWD/run/lan/tls/cert.pem devbox run seed -- --url=https://<lan-ip>:8443 --tokens=49 --vision=1 ``` 22. **Expect:** exit 0 and `seeded 49 tokens (49 created, 0 already present, 0 removed) ... scene 1 1920x1080, seed 1, vision 1 x 400 px`; the GM's folded `Tokens (49)` count updates. 23. Rerun → `0 created, 49 already present, 0 removed`. `--replace` rebuilds; `--seed=` changes the jitter. ### 7. The player's token with sight — mind the seed grid 24. `GM table` → open `New token`: Kind `pc`, names `Player`, **X `845`**, **Y `540`** (the seeded grid puts a token in the centre cell — Seed 25 sits at ~968,554, 16 px from 960,540, so the old "leave X/Y at the viewport centre" advice overlaps it). Radius blank, **Vision ✓**, Vision radius `400`, Controller = your player → `Create token`. 25. **Expect:** the phone's black screen becomes map inside a clear disc of radius 400, dimmed where explored, black elsewhere. 26. Still black: select the token, tick `Vision`, `Save token` (#78). ### 8. What to try on the phone 27. One-finger drag → pan, no rubber-banding. Pinch → zoom, clamps 0.5×–4×; the HUD's `zoom` readout follows. 28. Drag your token ~100 px → follows, then stays. Drag into a wall → snaps back. 29. **Wall lines never reach a player:** the server sends no wall records, so a player cannot see any wall outline — not even the shape of a secret door. A secret door is indistinguishable from a plain wall **by design**; that is the check, not a failure. 30. Fog: opaque black = never seen, dimmed = seen earlier, clear = visible now. 31. Laptop `Walls` → `Window` beside the player → `Players see a marker`: the phone draws the yellow marker once the window has been seen. 32. `Door` + open/close updates sight and fog immediately. Tick `Secret` → the phone shows nothing at all. 33. `One-way` + `Flip direction` toggles a token in/out of sight. 34. `Who sees it` while moving the token/a wall: `nobody (0 %)` ↔ `<player> (100 %)`. ### 9. Measure fps — the overlay, no USB 35. On the phone, append `?perf=1` and reload; sign in if asked. 36. **Expect** a top-right line like `fps 59.8 · frame p50 16.6 p95 17.1 ms · JS p50 1.20 p95 2.40 ms · tokens visible 50 / total 50 · zoom 1.00`. The number counts the tokens this client draws: a player only receives tokens in sight, so its `total` is what that client knows; the GM's total is the whole table. 37. Same zoom, fog active, all 50 in sight: record 10 s each for idle, pan, token drag, pinch. Laptop control: same four runs at the same `?perf=1` URL. 38. Optional independent check: `nix shell nixpkgs#android-tools -c adb devices`, then `chrome://inspect/#devices` → inspect → ⋮ More tools → Rendering → Frame Rendering Stats. ### 10. Load times 39. Cold, 3 runs: clear cached images and files (or Incognito + paste key), stopwatch from tapping `Sign in` to the map fully painted, no black squares. Record the median. 40. Warm, 3 runs: reload the tab, same stopwatch. Record the median. ### 11. Reconnect 41. Wi-Fi/airplane mode off for 5 s → badge `Reconnecting…`/`Offline` → back on → `Connected`, same map, no reload. Record the seconds. 42. Ctrl-C `serve`, start it again without `--image` (expect `serve: no --image given, keeping current map ...`) → phone and GM return to `Connected`, same token positions, no re-key. Record the seconds. ### 12. Console (what not to file) 43. On a fresh browser profile the boot no longer dials `/ws` before sign-in, so there is no refused WebSocket upgrade on a healthy first load. If one appears, that is a bug: file it. 44. `/tiles/...` **403s are expected** for tiles the player has not seen (or for an unexplored/unknown area). The server refuses them by design and the browser logs the failed request; this is not an app error and must not be filed. A tile that stays black in an area the player should see is the bug. 45. Any other console error is real: file one issue per distinct cause with the DevTools text. ### 13. Record 46. Post one comment here with the table below plus: device + Android/Chrome version, laptop OS + Chrome version, `LAN_IP`, tile size (32), Wi-Fi band, date, and paths to any trace/screen recording. 47. Any miss → one issue per distinct cause with the numbers/trace, linked here. Then Ctrl-C `serve`; keep `run/lan/` if you filed a bug (it holds the keys), otherwise `rm -rf run/lan`. ### Pass/fail (write the numbers in your comment) | Item | Pass | Write here | |---|---|---| | fps idle / pan / drag / pinch, **phone** | **60 fps** (DESIGN §13 M4 gate: 50 tokens, Full HD tiled map, fog active). 60 Hz panel: 60 is the cap | median fps + p95 frame ms, per run | | Same four runs, **laptop** | **60 fps** | median fps + p95 frame ms | | First viewport fill, phone | DESIGN §13 tile-size gate (b): record; black tiles still streaming once the map is up is a fail | ms/visual, 3 runs | | Cold first paint, phone | no DESIGN number — record | median ms of 3 | | Warm reload, phone | no DESIGN number — record | median ms of 3 | | Reconnect after Wi-Fi toggle | no DESIGN number — record | seconds | | Reconnect after server restart | same map, no re-key, no GM action; record | seconds | | Fog: 3 states, window marker, door open/close, secret door, one-way flip, who-sees-it | behaves as in steps 27–34; wall lines are GM-only and a secret door looks like a wall | pass/fail + note | | Sign-in by phone keyboard (paste or type), display name once | works | pass/fail | | Console | no errors except the expected tile 403s (step 44) | pass/fail + first unexpected error | | Build gate (steps 2–4) | `test`, `client-test`, `e2e` green on HEAD | HEAD sha + green | `#63` / `#62` close only after this comment says **pass**.
SirStone added a new dependency 2026-11-21 23:38:59 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: SirStone/FFF_vtt_frozen#77