$npx -y skills add rengwu/wayfinder-maps --skill verifyBuild, launch and drive wayfinder-maps to verify a change end-to-end (server + headless browser).
| 1 | # Verifying wayfinder-maps |
| 2 | |
| 3 | ## Build & fixture |
| 4 | |
| 5 | ```bash |
| 6 | go build -o /tmp/wayfinder-maps ./cmd/wayfinder-maps |
| 7 | ``` |
| 8 | |
| 9 | There is no sample map in the repo. Create an effort dir with `map.md` + |
| 10 | `tickets/NN-slug.md`. Ticket format: YAML frontmatter (`type:`, `blocked_by: [01]`, |
| 11 | `claimed_by:`, `undermined_by: [NN]`) then `# Title`, `## Question`; a `## Answer` |
| 12 | section with prose = resolved, `## Ruled out` = out_of_scope. Map format: `# Name`, |
| 13 | `## Destination`, and fog under `## Not yet specified` as |
| 14 | `- **Title.** clears-with: NN`. Sanity-check the fixture with |
| 15 | `wayfinder-maps status <effort-dir>`. |
| 16 | |
| 17 | ## Launch |
| 18 | |
| 19 | ```bash |
| 20 | PORT=78xx /tmp/wayfinder-maps serve <effort-dir> # pick a fresh port EVERY time |
| 21 | ``` |
| 22 | |
| 23 | Gotcha: the user often has an instance (binary `wm`) already listening; a bind |
| 24 | failure only shows in the log while curl happily talks to the OLD server — check |
| 25 | the serve log says "serving", don't trust the port being answerable. |
| 26 | |
| 27 | Dev mode: `WAYFINDER_DEV=cmd/wayfinder-maps/web` (path to web/ from cwd) serves |
| 28 | the frontend from disk with `Cache-Control: no-store` instead of the go:embed copy. |
| 29 | |
| 30 | ## Drive (GUI surface) |
| 31 | |
| 32 | Playwright's cached headless shell works without a full playwright install: |
| 33 | |
| 34 | ```bash |
| 35 | cd <scratch> && npm i playwright-core |
| 36 | # executablePath: ~/Library/Caches/ms-playwright/chromium_headless_shell-*/chrome-headless-shell-mac-arm64/chrome-headless-shell |
| 37 | ``` |
| 38 | |
| 39 | - Wait ~4s after goto: the constellation fades in over 2.2s (a plain |
| 40 | `--screenshot --virtual-time-budget` capture shows HUD but NO stars — artifact, |
| 41 | not a bug). |
| 42 | - App state is inside ES modules (not on window). To click a specific star, find |
| 43 | it by pixel colour on the canvas (frontier glow is gold) — layout is |
| 44 | deterministic (fixed PRNG seed), so positions repeat across runs. |
| 45 | - Live-reload probe: append `## Answer\ntext` to a ticket while the map is open; |
| 46 | the 1.5s poller updates the HUD counts in ~2-3s. |
| 47 | - Recents on the splash come from the user's real config — don't dismiss entries. |
| 48 | |
| 49 | Flows worth driving: map render (all statuses + fog + edges), click star → panel |
| 50 | markdown, `data-goto` cross-ticket link, Escape closes, wheel zoom (labels thin |
| 51 | out), back button → splash/maplist. |
| 52 | |
| 53 | ## WebKit |
| 54 | |
| 55 | `npx playwright-core install webkit` (~77MB, cached in ms-playwright) then |
| 56 | `require("playwright-core").webkit.launch()` — no executablePath needed. |
| 57 | Covered headlessly: full map render, the label-alpha fade workaround (capture a |
| 58 | frame ~600ms into loadMap: labels must be dim WITH the stars, not opaque over |
| 59 | them), touch tap via a hasTouch context, wheel zoom, panel markdown. |
| 60 | |
| 61 | NOT reachable headlessly — manual Safari checklist: |
| 62 | - Trackpad pinch zooms the map, not the page (gesture* events; Playwright's |
| 63 | WebKit cannot construct GestureEvent, and Chromium never fires them). |
| 64 | - Touch pan/pinch on a real iOS device or simulator. |