Brickheart

Bench split into modules, cameras and anchors adjusted 16NOV2026

: Written by a human with AI assistance.

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.ts is now the entry point only, 283 lines. The code moved into app/src/bench/ in nine steps, one commit each: config, types, strings, pack, scene, rows, state, cameras, palette, collide-ui, actions, input, and anchors.ts.
  • Shared mutable state (cursor, activeRow, selId, hCur, busy) lives in one ctx object. selected, ops and st stay in bench.ts and 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, PLATE and BRICK stay plain constants. The registry replaces bench/config.ts after the merge.

Untested

  • npm test failed on "no app string is unused". app/i18n.test.mjs line 11 lists only src/bench.ts, so it cannot see the t() calls now in src/bench/. The typecheck step passed. The fix is not applied (Open).
  • npm run test:snap was not reached, so snap/anchor.test.ts has not run since the lattice shift and the import move (Verify).
  • The phone test after the anchors.ts move was not reported (Verify).
  • Whether collide-client, collide-store and collide.worker belong in bench/ is undecided. app/build.mjs and collide-client.ts were not read (Open).

Next three steps

  1. Add the bench/*.ts files to the FILES list in app/i18n.test.mjs, then run npm test in full.
  2. Merge bench-split-6-collide into the main branch. All the split work sits on that one branch.
  3. Build the settings registry in LDU, replacing bench/config.ts.
  • 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.md in the repo root.