revert: remove test clone scene button from settings panel

Reverts changes from commit a87fe56d53
to remove the Test Clone Scene functionality from the settings panel.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
John Doe
2026-03-25 23:57:40 -04:00
co-authored by factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
parent 8731da9afa
commit b47d4a6a15
@@ -1,7 +1,7 @@
import { cloneSceneGraph, emitter, useScene } from '@pascal-app/core'
import { emitter, useScene } from '@pascal-app/core'
import { useViewer } from '@pascal-app/viewer'
import { TreeView, VisualJson } from '@visual-json/react'
import { Camera, Copy, Download, Save, Trash2, Upload } from 'lucide-react'
import { Camera, Download, Save, Trash2, Upload } from 'lucide-react'
import {
type KeyboardEvent,
type SyntheticEvent,
@@ -250,29 +250,6 @@ export function SettingsPanel({
setPhase('site')
}
const handleTestClone = () => {
const collections = useScene.getState().collections
const sceneGraph = { nodes, rootNodeIds, ...(collections && { collections }) }
const cloned = cloneSceneGraph(sceneGraph)
// Show before/after comparison
const oldIds = Object.keys(nodes).slice(0, 5)
const newIds = Object.keys(cloned.nodes).slice(0, 5)
const comparison = oldIds.map((oldId, i) => `${oldId}${newIds[i]}`).join('\n')
// Apply cloned scene (setScene clears collections, so apply them after)
setScene(cloned.nodes, cloned.rootNodeIds)
if (cloned.collections) {
useScene.setState({ collections: cloned.collections })
}
resetSelection()
setPhase('site')
alert(
`Scene cloned successfully!\n\nNode count: ${Object.keys(nodes).length}${Object.keys(cloned.nodes).length}\n\nSample ID mapping:\n${comparison}\n\nCheck the Scene Graph explorer to verify new IDs.`
)
}
const handleGenerateThumbnail = () => {
if (!projectId) return
setIsGeneratingThumbnail(true)
@@ -381,11 +358,6 @@ export function SettingsPanel({
Load Build
</Button>
<Button className="w-full justify-start gap-2" onClick={handleTestClone} variant="outline">
<Copy className="size-4" />
Test Clone Scene
</Button>
<input
accept="application/json"
className="hidden"