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
+14
View File
@@ -25,6 +25,12 @@ import { BufferGeometry, Float32BufferAttribute, type Mesh } from 'three'
* That decision lands in a later milestone; for now the system retains
* ownership of the rebuild loop.
*/
// Phase 3 verification — set once when the first registry-driven wall
// renderer mounts. Stops the log firing per wall (a scene with 200 walls
// would spam the console). Drop alongside the feature flag at Phase 3
// sign-off.
let didLogFirstRegistryWallMount = false
function createEmptyWallGeometry(): BufferGeometry {
const geometry = new BufferGeometry()
geometry.setAttribute('position', new Float32BufferAttribute([], 3))
@@ -49,6 +55,14 @@ const WallRenderer = ({ node }: { node: WallNode }) => {
useScene.getState().markDirty(node.id)
}, [node.id])
useEffect(() => {
if (didLogFirstRegistryWallMount) return
didLogFirstRegistryWallMount = true
console.info(
'[wall:registry] first registry-driven WallRenderer mounted — legacy WallRenderer is NOT in use',
)
}, [])
useEffect(() => {
return () => {
placeholderGeometry.dispose()
+12
View File
@@ -1,6 +1,7 @@
'use client'
import { WallCutout, WallSystem } from '@pascal-app/viewer'
import { useEffect } from 'react'
/**
* Registry-driven wall system bundle.
@@ -27,6 +28,17 @@ import { WallCutout, WallSystem } from '@pascal-app/viewer'
* then this file is the single mount surface for wall's per-frame work.
*/
const WallSystems = () => {
// Phase 3 verification log — confirms the registry took over the wall
// dispatch. Fires once when RegisteredSystems lazy-loads this bundle (so
// exactly once per viewer mount when NEXT_PUBLIC_USE_REGISTRY_FOR_WALL=true).
// Drop alongside the feature flag at Phase 3 sign-off.
useEffect(() => {
console.info('[wall:registry] system bundle mounted — registry path active')
return () => {
console.info('[wall:registry] system bundle unmounted')
}
}, [])
return (
<>
<WallSystem />