Bench split into modules, cameras and anchors adjusted 16NOV2026
Status: bench code split into modules and working on the phone; the string test fails until its file list is updated (Open).
What changed in the code
- The last camera patch from 15 Nov was reverted to the old
nextCamera. The wall and build-extent code stayed. This fixed touch mode, where the wall never showed (Decided). - Front corner cameras and iso sit 6 studs further out from the canvas front edge, using
CAM_FRONT_PAD = 120(Decided). - The canvas front edge stays at z +160. The first anchor moved back 6 studs, from z 130 to z 10, so the second anchor in each 16 by 16 area lands on the back row of studs (Decided).
bench.tsis now the entry point only, 283 lines. The code moved intoapp/src/bench/in nine steps, one commit each: config, types, strings, pack, scene, rows, state, cameras, palette, collide-ui, actions, input, andanchors.ts.- Shared mutable state (
cursor,activeRow,selId,hCur,busy) lives in onectxobject.selected,opsandststay inbench.tsand reach the modules through getters. - Duplicated constants now live in
bench/config.ts, in LDU. The unused anchor code (isFree,nextFree,seatFirstFree,CLEAR) was deleted. - Decided: settings are stored in LDU with no conversion.
STUD,PLATEandBRICKstay plain constants. The registry replacesbench/config.tsafter the merge.
Untested
npm testfailed on "no app string is unused".app/i18n.test.mjsline 11 lists onlysrc/bench.ts, so it cannot see thet()calls now insrc/bench/. The typecheck step passed. The fix is not applied (Open).npm run test:snapwas not reached, sosnap/anchor.test.tshas not run since the lattice shift and the import move (Verify).- The phone test after the
anchors.tsmove was not reported (Verify). - Whether
collide-client,collide-storeandcollide.workerbelong inbench/is undecided.app/build.mjsandcollide-client.tswere not read (Open).
Next three steps
- Add the
bench/*.tsfiles to theFILESlist inapp/i18n.test.mjs, then runnpm testin full. - Merge
bench-split-6-collideinto the main branch. All the split work sits on that one branch. - Build the settings registry in LDU, replacing
bench/config.ts.
Links
- Design: Bench design session 11NOV2026 attach ring anchors wall order, in the bench blog folder (Verify the link target).
- Previous post: Bench anchors as parts, floating wall and cameras 15NOV2026.
- Working rules:
CLAUDE.mdin the repo root.