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:
co-authored by
Claude Opus 4.7
parent
9883f1cdc1
commit
6a4de8cff5
+10
-24
@@ -1,8 +1,8 @@
|
||||
import type { AnyNodeDefinition, Plugin } from '@pascal-app/core'
|
||||
import { fenceDefinition, isFenceRegistryEnabled } from './fence'
|
||||
import { fenceDefinition } from './fence'
|
||||
import { shelfDefinition } from './shelf'
|
||||
import { spawnDefinition } from './spawn'
|
||||
import { isWallRegistryEnabled, wallDefinition } from './wall'
|
||||
import { wallDefinition } from './wall'
|
||||
|
||||
/**
|
||||
* Built-in plugin bundling every node kind shipped with the Pascal editor.
|
||||
@@ -15,35 +15,21 @@ import { isWallRegistryEnabled, wallDefinition } from './wall'
|
||||
* `loadPlugin` call path. This is intentional: the API is stress-tested
|
||||
* by built-ins before any third-party plugin lands.
|
||||
*
|
||||
* Status by kind:
|
||||
* - **shelf**: brand-new kind, registry-driven, no legacy. Registered
|
||||
* unconditionally.
|
||||
* - **spawn**: migrated to the registry path during Phase 2. Legacy
|
||||
* SpawnRenderer / SpawnTool files still present in viewer/editor but
|
||||
* short-circuited by the Phase 0 shims. Registered unconditionally.
|
||||
* - **wall**: registry-driven behind `NEXT_PUBLIC_USE_REGISTRY_FOR_WALL`.
|
||||
* Phase 3 stress test; flag drops when fixture parity signs off.
|
||||
* - **fence**: registry-driven behind `NEXT_PUBLIC_USE_REGISTRY_FOR_FENCE`.
|
||||
* First Phase 5 batch-migration kind. Same shape as wall (thin
|
||||
* renderer + system re-export); pure geometry / floor-plan / tool
|
||||
* affordance ports as later milestones.
|
||||
* All four current kinds are registered unconditionally. Parity is
|
||||
* verified by comparing against deployed production rather than an
|
||||
* in-app env-var flag toggle. Legacy paths still exist in `viewer/` and
|
||||
* `editor/` for kinds undergoing migration; they short-circuit via the
|
||||
* Phase 0 `<LegacySystem>` wrapper + `NodeRenderer`'s registry-first
|
||||
* dispatch. Phase 6 deletes the legacy paths.
|
||||
*/
|
||||
const wallEntries: AnyNodeDefinition[] = isWallRegistryEnabled()
|
||||
? [wallDefinition as unknown as AnyNodeDefinition]
|
||||
: []
|
||||
|
||||
const fenceEntries: AnyNodeDefinition[] = isFenceRegistryEnabled()
|
||||
? [fenceDefinition as unknown as AnyNodeDefinition]
|
||||
: []
|
||||
|
||||
export const builtinPlugin: Plugin = {
|
||||
id: 'pascal:core',
|
||||
apiVersion: 1,
|
||||
nodes: [
|
||||
shelfDefinition as unknown as AnyNodeDefinition,
|
||||
spawnDefinition as unknown as AnyNodeDefinition,
|
||||
...wallEntries,
|
||||
...fenceEntries,
|
||||
wallDefinition as unknown as AnyNodeDefinition,
|
||||
fenceDefinition as unknown as AnyNodeDefinition,
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user