You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move the scenes and project domain onto the store. Line refs are at 793b4a4; after #460 the code lives in src/domains/scenes.js and the scene/project panels.
Store-owned state:scenes, activeSceneId (:2274-2275), scenesRef (read-only projection), projectName :4308, projectDirty :4309. projectHandleRef stays a runtime handle, off the document. Persistence keeps persistScenes to localStorage (:4277) and the .cclayproject file (:4500). None of this has undo today; scene add, rename, duplicate and reorder get one entry each.
UI writers through run (38 sites, App.jsx:12888 and nearby): scene add/rename/duplicate/reorder/switch/delete, project new/open/save/rename, export.
Semantic commands in src/commands/scene.js, src/commands/project.js, src/commands/export.js: the 6 registered scene/project actions plus the unrouted ones. Exposure follows plan v3:
confirm: scene.delete, scene/project loads that replace the document (including the legacy load_scenes path, :5567), project.save when it overwrites a file (it needs user activation, :909), export.shotVideo, file pickers;
open: everything that produces one retained undo entry.
Generic fields: add the scene kind to <kind>.set (name, order) and the scene list plus project metadata to inspect_studio document.
Touches: src/domains/scenes.js (owned by this issue), src/commands/scene.js, src/commands/project.js, src/commands/export.js, src/commands/elements.js (adds the scene kind), src/scenes.js, src/project.js, test/bus/parity-pending.json, test/bus/verify-scene-commands.mjs.
Each check is a red test(...) commit that fails, then a green commit that makes it pass.
The scene/project rows of the parity matrix, all origins x all checks: pending before -> green after, removed from parity-pending.json.
scene.rename from the agent then edit.undo: no undo before -> name restored after.
Non-UI scene.delete, a replacing project.open and an overwriting project.save: run or unreachable before -> CONFIRMATION_REQUIRED after; the UI path still runs.
inspect_studio document lists the scenes and project name matching the saved .cclayproject projection: missing before -> equal after.
A direct setScenes outside a run in dev: allowed before -> throws after.
Metric: (b) about +38 sites.
npm run build exits 0, the existing suites pass unchanged, and the browser smoke tests pass.
PR rules
One PR on feat/issue-461 with (#461) in the title, against main. Attach the red/green commit list and the test output. Do not merge.
Part of #434 (plan v3).
Scope
Move the scenes and project domain onto the store. Line refs are at 793b4a4; after #460 the code lives in
src/domains/scenes.jsand the scene/project panels.Store-owned state:
scenes,activeSceneId(:2274-2275),scenesRef(read-only projection),projectName:4308,projectDirty:4309.projectHandleRefstays a runtime handle, off the document. Persistence keepspersistScenesto localStorage (:4277) and the.cclayprojectfile (:4500). None of this has undo today; scene add, rename, duplicate and reorder get one entry each.UI writers through
run(38 sites, App.jsx:12888 and nearby): scene add/rename/duplicate/reorder/switch/delete, project new/open/save/rename, export.Semantic commands in
src/commands/scene.js,src/commands/project.js,src/commands/export.js: the 6 registered scene/project actions plus the unrouted ones. Exposure follows plan v3:confirm:scene.delete, scene/project loads that replace the document (including the legacyload_scenespath, :5567),project.savewhen it overwrites a file (it needs user activation, :909),export.shotVideo, file pickers;open: everything that produces one retained undo entry.Generic fields: add the
scenekind to<kind>.set(name, order) and the scene list plus project metadata toinspect_studio document.Depends on
Files and concurrency
Acceptance
Each check is a red
test(...)commit that fails, then a green commit that makes it pass.parity-pending.json.scene.renamefrom the agent thenedit.undo: no undo before -> name restored after.scene.delete, a replacingproject.openand an overwritingproject.save: run or unreachable before ->CONFIRMATION_REQUIREDafter; the UI path still runs.inspect_studio documentlists the scenes and project name matching the saved.cclayprojectprojection: missing before -> equal after.setScenesoutside a run in dev: allowed before -> throws after.npm run buildexits 0, the existing suites pass unchanged, and the browser smoke tests pass.PR rules
One PR on
feat/issue-461with(#461)in the title, againstmain. Attach the red/green commit list and the test output. Do not merge.