Write down the dev-stack and Playwright traps (sow-nodebb-plugin-support#10)

Assume the dev stack is dirty on arrival and leave it clean; the compiled
templates/client JS need an explicit build, and the build marker lives on the
container filesystem so a plain restart skips it. Also records this forum's
login selectors and the fact that waitForURL('**/') never matches NodeBB's
post-login /?loggedin=true.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-24 22:25:11 +02:00
co-authored by Claude Opus 5
parent 4acf32ec09
commit 9d4adca127
+15
View File
@@ -57,6 +57,21 @@ for driving a headless browser on this NixOS box (the Playwright MCP server
does not work here). Point any browser tooling at `http://localhost:4567` to does not work here). Point any browser tooling at `http://localhost:4567` to
load pages, take screenshots, and compare before/after. load pages, take screenshots, and compare before/after.
**Assume the stack is dirty when you arrive, and leave it clean.** Reset it
(`make dev-reset`) before the first boot of a testing session and tear it down
after every cycle, including a failed one; a stack carrying the last session's
data is the usual reason a screenshot shows something that no longer exists in
the code. Full hygiene rules live in `../sow-nodebb/AGENTS.md`. Two things
that bite here in particular:
- **Templates and client JS are compiled**, so a browser reload alone proves
nothing after editing them. `make dev-build` — and note the build marker
lives on the container filesystem, so a plain `restart` skips the rebuild.
- **Playwright login on this forum**: the form is `#username` / `#password`
with a `#login` submit button, and a successful login lands on
`/?loggedin=true`, which `page.waitForURL('**/')` never matches. Wait on
`page.waitForLoadState('networkidle')` instead.
## Design Context ## Design Context
- `PRODUCT.md`: strategic design context — register, users, purpose, - `PRODUCT.md`: strategic design context — register, users, purpose,