Drop wall + fence feature flags: register unconditionally; remove verification logs

Parity comparison against deployed prod is now cleaner than juggling
env-var flag toggles locally. Both kinds enter builtinPlugin.nodes
unconditionally; the Phase 0 dispatch shims (<LegacySystem kind="X">
wrappers + NodeRenderer's registry-first branch) handle the cutover.

Files deleted:
 - packages/nodes/src/wall/feature-flag.ts
 - packages/nodes/src/fence/feature-flag.ts

Files changed:
 - packages/nodes/src/index.ts: drops isWallRegistryEnabled /
   isFenceRegistryEnabled gates; wallDefinition + fenceDefinition
   land directly in builtinPlugin.nodes.
 - packages/nodes/src/{wall,fence}/index.ts: drop the flag re-export.
 - packages/nodes/src/{wall,fence}/renderer.tsx: drop the one-shot
   verification console.info. Same for the system.tsx wrappers.
 - packages/viewer/src/components/renderers/{wall,fence}/{wall,fence}-
   renderer.tsx: drop the paired [X:legacy] verification logs (no
   longer comparing flag-toggled paths).

Net DX: no env var to remember when starting `bun dev:community`. To
A/B test, compare against editor.pascal.app deployed prod.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Wassim SAMAD
2026-05-15 11:59:09 -04:00
co-authored by Claude Opus 4.7
parent 9883f1cdc1
commit 6a4de8cff5
11 changed files with 20 additions and 147 deletions
-13
View File
@@ -1,13 +0,0 @@
/**
* Feature flag for the registry-driven fence.
*
* Same pattern as wall (Phase 3) and spawn (Phase 2): with the flag on,
* `fenceDefinition` is appended to `builtinPlugin.nodes` and the Phase 0
* dispatch shims hand fence over to the registry. With the flag off,
* the legacy fence paths run unchanged.
*
* Drops the moment Phase 5 fence parity is signed off.
*/
export const isFenceRegistryEnabled = (): boolean => {
return process.env.NEXT_PUBLIC_USE_REGISTRY_FOR_FENCE === 'true'
}
-1
View File
@@ -1,3 +1,2 @@
export { fenceDefinition } from './definition'
export { isFenceRegistryEnabled } from './feature-flag'
export { FenceNode } from './schema'
+1 -11
View File
@@ -2,7 +2,7 @@
import { type FenceNode, useRegistry, useScene } from '@pascal-app/core'
import { DEFAULT_STAIR_MATERIAL, useNodeEvents } from '@pascal-app/viewer'
import { useEffect, useLayoutEffect, useMemo, useRef } from 'react'
import { useLayoutEffect, useMemo, useRef } from 'react'
import type { Mesh } from 'three'
/**
@@ -17,8 +17,6 @@ import type { Mesh } from 'three'
* Material is `DEFAULT_STAIR_MATERIAL` (legacy reuse; fence and stairs
* share the wood-tone preset).
*/
let didLogFirstRegistryFenceMount = false
const FenceRenderer = ({ node }: { node: FenceNode }) => {
const ref = useRef<Mesh>(null!)
const handlers = useNodeEvents(node, 'fence')
@@ -29,14 +27,6 @@ const FenceRenderer = ({ node }: { node: FenceNode }) => {
useScene.getState().markDirty(node.id)
}, [node.id])
useEffect(() => {
if (didLogFirstRegistryFenceMount) return
didLogFirstRegistryFenceMount = true
console.info(
'[fence:registry] first registry-driven FenceRenderer mounted — legacy FenceRenderer is NOT in use',
)
}, [])
return (
<mesh
castShadow
+1 -10
View File
@@ -1,7 +1,6 @@
'use client'
import { FenceSystem } from '@pascal-app/viewer'
import { useEffect } from 'react'
/**
* Registry-driven fence system bundle.
@@ -10,8 +9,7 @@ import { useEffect } from 'react'
* via `RegisteredSystems` when fence is registry-driven. The legacy
* `<LegacySystem kind="fence">` wrapper around `<FenceSystem />` in
* `viewer/components/viewer/index.tsx` short-circuits whenever
* `nodeRegistry.has('fence')` is true — same pattern wall used in
* milestone B.
* `nodeRegistry.has('fence')` is true — same pattern wall uses.
*
* Phase 6 deletes the legacy mount point; until then this bundle is the
* single mount surface for fence's per-frame work when registry-driven.
@@ -22,13 +20,6 @@ import { useEffect } from 'react'
* the rebuild loop and this bundle can be deleted.
*/
const FenceSystems = () => {
useEffect(() => {
console.info('[fence:registry] system bundle mounted — registry path active')
return () => {
console.info('[fence:registry] system bundle unmounted')
}
}, [])
return <FenceSystem />
}