BS-PR-604 - Multi-scene tabs, subscenes, and level composition #42

Closed
opened 2026-07-10 04:03:29 -04:00 by Rbanh · 1 comment
Owner

Summary

Support working across multiple scenes and composing levels without forcing one monolithic scene document.

Scope

  • Add scene tabs with independent dirty state, close confirmation, save, save-as, and recent-scene behavior.
  • Define subscene references and ownership boundaries in the scene document.
  • Support load/unload, visibility, lock, focus, and validation for composed subscenes.
  • Keep raw Bevy Entity IDs out of cross-scene references.
  • Document migration from current single-scene projects.

Acceptance criteria

  • Multiple scenes can be opened, switched, saved, and closed independently.
  • A level can compose at least two authored subscenes with stable IDs.
  • Missing or cyclic subscene references are diagnosed without crashing.
  • PIE and build validation use the active composition consistently.
  • Architecture decision and fixture coverage ship with the implementation.
## Summary Support working across multiple scenes and composing levels without forcing one monolithic scene document. ## Scope - Add scene tabs with independent dirty state, close confirmation, save, save-as, and recent-scene behavior. - Define subscene references and ownership boundaries in the scene document. - Support load/unload, visibility, lock, focus, and validation for composed subscenes. - Keep raw Bevy Entity IDs out of cross-scene references. - Document migration from current single-scene projects. ## Acceptance criteria - [ ] Multiple scenes can be opened, switched, saved, and closed independently. - [ ] A level can compose at least two authored subscenes with stable IDs. - [ ] Missing or cyclic subscene references are diagnosed without crashing. - [ ] PIE and build validation use the active composition consistently. - [ ] Architecture decision and fixture coverage ship with the implementation.
Rbanh added this to the M6 - Reliability, recovery, and project workflow milestone 2026-07-10 04:03:29 -04:00
Rbanh added the
type:architecture
priority:P1
area:scene-io
roadmap:production
labels 2026-07-10 04:03:29 -04:00
Author
Owner

Implemented and validated locally.

Delivered

  • Independent multi-scene tabs now live at the right end of the existing main editor toolbar below the menu bar; no extra row or vertical toolbar is introduced. Tabs preserve independent path, dirty state, authored snapshot, close confirmation, and saved-scene recovery state.
  • Persisted SceneComposition resources use stable scene/reference IDs and project-relative .scn.ron paths.
  • Visible subscenes materialize into the active ECS world for editing and PIE while runtime ownership tags prevent child actors from flattening into the owner scene on save. Composition locks reuse hierarchy locking.
  • Recursive preflight rejects missing references, duplicate IDs, path traversal, invalid extensions, and composition cycles before replacing the active world.
  • Composition add/remove/load/lock edits participate in undo/redo. Legacy scenes receive a deterministic path-derived identity and migrate on their next normal save.
  • ADR 0026 and the editor workflow/architecture/README documentation now describe the active-document and composition contract.

QA

  • Live editor: created, switched, rematerialized, and closed scene tabs; the original 29-actor authored scene restored correctly.
  • Live editor: Composition menu opens and focuses owned actors without a runtime panic.
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo clippy -p editor --all-targets --features dev -- -D warnings
  • cargo test --workspace --all-features -q: 159 passed, 1 intentionally ignored
  • cargo validate-levels: passed
  • Formatting, diff whitespace, and VS Code launch JSON validation: passed

Final UI placement

Scene tabs integrated into the existing main toolbar

Composition menu

Implemented and validated locally. ### Delivered - Independent multi-scene tabs now live at the right end of the existing main editor toolbar below the menu bar; no extra row or vertical toolbar is introduced. Tabs preserve independent path, dirty state, authored snapshot, close confirmation, and saved-scene recovery state. - Persisted `SceneComposition` resources use stable scene/reference IDs and project-relative `.scn.ron` paths. - Visible subscenes materialize into the active ECS world for editing and PIE while runtime ownership tags prevent child actors from flattening into the owner scene on save. Composition locks reuse hierarchy locking. - Recursive preflight rejects missing references, duplicate IDs, path traversal, invalid extensions, and composition cycles before replacing the active world. - Composition add/remove/load/lock edits participate in undo/redo. Legacy scenes receive a deterministic path-derived identity and migrate on their next normal save. - ADR 0026 and the editor workflow/architecture/README documentation now describe the active-document and composition contract. ### QA - Live editor: created, switched, rematerialized, and closed scene tabs; the original 29-actor authored scene restored correctly. - Live editor: Composition menu opens and focuses owned actors without a runtime panic. - `cargo clippy --workspace --all-targets --all-features -- -D warnings` - `cargo clippy -p editor --all-targets --features dev -- -D warnings` - `cargo test --workspace --all-features -q`: 159 passed, 1 intentionally ignored - `cargo validate-levels`: passed - Formatting, diff whitespace, and VS Code launch JSON validation: passed ### Final UI placement ![Scene tabs integrated into the existing main toolbar](https://git.spacetrainclubhouse.com/attachments/98f375b8-11fe-49ea-a33f-d94d3f3b0339) ![Composition menu](https://git.spacetrainclubhouse.com/attachments/aad129f7-bc63-402a-a724-a5558e47267d)
Rbanh closed this issue 2026-07-10 14:34:10 -04:00
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Falling-Metal-Interactive/Blacksite#42
No description provided.