From 9d4adca127850c52c23a3d1a56dc6143b2974962 Mon Sep 17 00:00:00 2001 From: vickydotbat Date: Fri, 24 Jul 2026 22:25:11 +0200 Subject: [PATCH] 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) --- AGENTS.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index e55c369..f434b95 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -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 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 - `PRODUCT.md`: strategic design context — register, users, purpose,