Wall: paired verification logs for registry vs legacy dispatch

Three one-shot console.info calls so the Phase 3 milestone-B parity
check is unambiguous from the browser console alone:

- [wall:registry] system bundle mounted — fires when RegisteredSystems
  lazy-loads nodes/src/wall/system.tsx (exactly once per viewer mount
  when the flag is on).
- [wall:registry] first WallRenderer mounted — fires once when the
  first registry-driven WallRenderer mounts.
- [wall:legacy] first legacy WallRenderer mounted — fires once if the
  legacy path is active (flag off, or kind not registered).

Module-level booleans gate the renderer logs so they don't spam in
scenes with many walls. Drop all three alongside the feature flag at
Phase 3 sign-off.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Wassim SAMAD
2026-05-15 09:18:36 -04:00
co-authored by Claude Opus 4.7
parent 02aeca8439
commit 375914a07c
3 changed files with 40 additions and 0 deletions
@@ -5,6 +5,12 @@ import { useNodeEvents } from '../../../hooks/use-node-events'
import { getVisibleWallMaterials } from '../../../systems/wall/wall-materials'
import { NodeRenderer } from '../node-renderer'
// Phase 3 verification — see the matching `[wall:registry]` log in
// nodes/src/wall/renderer.tsx. When this fires, wall is on the legacy
// path; the registry-driven WallRenderer is not in use. Drop alongside
// the legacy file at Phase 6.
let didLogFirstLegacyWallMount = false
function createEmptyWallGeometry() {
const geometry = new BufferGeometry()
geometry.setAttribute('position', new Float32BufferAttribute([], 3))
@@ -29,6 +35,14 @@ export const WallRenderer = ({ node }: { node: WallNode }) => {
useScene.getState().markDirty(node.id)
}, [node.id])
useEffect(() => {
if (didLogFirstLegacyWallMount) return
didLogFirstLegacyWallMount = true
console.info(
'[wall:legacy] first legacy WallRenderer mounted — registry-driven WallRenderer is NOT in use',
)
}, [])
useEffect(() => {
return () => {
placeholderGeometry.dispose()