Files
editor/packages/mcp/test-reports/research/R3-scene-ui.md
T
Adrian PerezandClaude Opus 4.7 42bd05db9c docs(mcp): add 10-agent research on scene-save workflow
10 parallel research agents (R1-R10) investigated whether MCP can save
scenes as saveable entities that the user later opens in the editor —
rather than injecting via a dev-only window.__pascalScene hook.

Key findings:
- Editor is already backend-agnostic via onLoad/onSave callbacks (R2,R7)
- Current persistence is localStorage-only, single key (R1)
- Zero dynamic routes and no backend code yet — env declared (R4,R5)
- File import exists as "Load Build" but lacks Zod validation (R6)
- MCP-written scenes load cleanly into the editor today (R6, Casa del
  Sol test already proved this)
- Best path: filesystem-handoff this week, Supabase in weeks 2-4,
  Supabase Realtime for live mode in Q2. Skip Yjs for now. (R8)
- 4-5 weeks to private beta, 10-14 to GA (R9)
- 10 high-value ideas ranked; "photo -> scene" is the unblocker (R10)

SYNTHESIS.md pulls all 10 reports together with the recommended
implementation plan.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 18:47:36 +02:00

2.1 KiB
Raw Blame History

R3 — Scene-management UI

What exists today

Feature File Line
"Save Build" → download layout_YYYY-MM-DD.json packages/editor/src/components/ui/sidebar/panels/settings-panel/index.tsx 205216, 362365
"Load Build" → file picker .jsonsetScene …settings-panel/index.tsx 218239, 367383
"Export Scene (JSON)" in command palette editor-commands.tsx 328346
"Export GLB / STL / OBJ" export-manager.tsx
"Clear & Start New" destructive button settings-panel/index.tsx 427434
"Explore scene graph" read-only tree dialog settings-panel/index.tsx 398421
Autosave hook (1 s debounce → onSave or localStorage fallback) use-auto-save.ts 1191
Scene-dirty tracking exposed to host via onDirty / onSaveStatusChange use-auto-save.ts 56187

What's missing from a typical editor

  1. New scene dialog with naming. Saves are all date-stamped; no user-given names.
  2. Scene list / picker. No sidebar panel that lists saved scenes.
  3. Open recent.
  4. Delete scene (the destructive button clears current, can't delete a stored scene).
  5. No Ctrl+S / Cmd+S save shortcut registered in use-keyboard.ts.
  6. No top-bar File menu. appMenuButton slot exists for host to inject one, but nothing ships by default.

Where new UI should live

  • Scene picker panel via extraSidebarPanels prop — non-invasive, no Editor-core change.
  • Quick actions via useCommandRegistry().register([...])editor.scene.open, editor.scene.new, editor.scene.save-as.
  • Save-status badge next to the navbar via navbarSlot (v2 layout).
  • "Created by MCP" toast via a new Toast provider in the editor's runtime init.

Verdict

UI foundation is ~40% of the way there. The infrastructure (autosave, callbacks, dialogs, palette extensibility) is all present. The missing pieces are UI-only: a scene-list panel (~150 LOC) + a few palette commands + a status indicator. No Editor core changes required if we keep it callback-driven and plug a host-side scene switcher.