From 9ade2b34a591293b52712e1380033a16b685036d Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 14 Jul 2026 07:24:21 -0700 Subject: [PATCH] docs: fold session-memory lessons into committed docs (closes #261) Extracted from persistent agent memory (ICM + auto-memory) so the committed docs are self-sufficient: - README: Node 22 requirement for local dev (better-sqlite3 prebuilds) - pitfalls: getAlbumList2 inline-SQL exception to #130 hoisting rule - pitfalls: merge-worker must stay dependency-light - pitfalls: never proxy the Navidrome native API to peers - pitfalls (Process): concurrent agent sessions need git worktrees; live hub is not a test bed (no DB resets, verify uptime + logs) - frontend-testing: duplicate img alt-text collision, scope with within(dialog) - CLAUDE.md: Write-tool control-character gotcha (Claude Code only) Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01SwwPcrohddTUN7kmQVedQC --- CLAUDE.md | 4 ++++ README.md | 2 ++ docs/frontend-testing.md | 1 + docs/pitfalls.md | 7 +++++-- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 1cf03ac..4e5a29f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -6,6 +6,10 @@ When posting comments, ALWAYS prefix comments with `FROM @claude:` and use blockquote style +### Tool gotchas + +* The Write tool can emit literal control characters for `\u0000`–`\u001f` escapes inside regex character classes; a later Edit `old_string` then never matches. Repair the bytes with `perl -i -pe`. (Hit twice.) + ### Workflow Default flow should be to use Pull Requests. diff --git a/README.md b/README.md index f701f39..63aa2fd 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,8 @@ Full env var list: [docs/hub-internals.md#environment-variables](docs/hub-intern ## Local development (without Docker) +Requires **Node 22** (what CI and the Docker image run). Newer majors ship before `better-sqlite3` publishes a prebuild — tests then fail with a `NODE_MODULE_VERSION` mismatch or fall back to a source build. + ```bash pnpm install pnpm dev # Hub on :3000 (tsx watch) diff --git a/docs/frontend-testing.md b/docs/frontend-testing.md index 5a65acf..624f105 100644 --- a/docs/frontend-testing.md +++ b/docs/frontend-testing.md @@ -47,3 +47,4 @@ Zustand stores expose `setState` / `getState` directly — reset in `beforeEach` - `vi.mock` is hoisted — no top-level variables inside the factory. - jsdom does not implement `HTMLMediaElement` playback; test the surrounding logic (state, toast dispatch) rather than `