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>
1.3 KiB
1.3 KiB
R4 — Routing & URLs
TL;DR
Zero dynamic routes today. Every user lands on / which hardcodes projectId="local-editor".
Route tree
apps/editor/app/
├── page.tsx (Home: <Editor projectId="local-editor">)
├── layout.tsx
├── privacy/page.tsx
├── terms/page.tsx
├── api/health/route.ts
└── fonts/
- No
[id],[projectId],[sceneId], or[[...slug]]segments. - No middleware.
- No
rewrites()/redirects()innext.config.ts. - No query-param driven state.
- No hash routing.
Latent expectation (dead code)
packages/editor/src/components/ui/action-menu/view-toggles.tsx:79:
const projectId = window.location.pathname.split('/editor/')[1]?.split('/')[0]
Code expects URLs of shape /editor/<projectId>/…. No such routes exist. Falls through to undefined gracefully today but signals a planned structure.
Options to add
| Option | Route | Effort |
|---|---|---|
| A | /?sceneId=<id> — reuse / + useSearchParams |
XS |
| B | /editor/[projectId] |
S |
| C | /editor/[projectId]/[sceneId] |
M |
| D | /scene/[id] — flat, project-agnostic |
S |
Recommended: B for projects, /scene/[id] short-link for sharing. Matches the latent expectation in view-toggles.tsx.