Scene cast (#32) #78

Merged
crowmaki merged 3 commits from issue-32-scene-cast into main 2026-10-07 09:58:15 +00:00
Owner

Closes #32. Part of #24.

Stacked PR. Review and merge in order: #26 → #27 → #28 → #29 → #30 → #31 → #32. Each PR targets the branch of the one before it.

What

  • Migration V7: scene_cast(scene, character, look, wardrobe_item?). Deferred composite FKs ensure the Look and Wardrobe item belong to the Character. Projects imported earlier are backfilled.
  • Speaking Characters are added on their default Look at import.
  • Undoable edits: add a non-speaker, remove (refused for speakers), change Look, set or clear Wardrobe item. Deleting a Look or Wardrobe item in use is refused. Deleting a non-speaking Character removes its cast rows and restores them on undo.
  • Merge hook: the absorbed Character's cast rows move to the survivor. If both are cast in a Scene, the survivor's row wins.
  • UI: cast block per Scene.

Also in this PR (review fixes across the stack)

  • 6045214:
    • Leading script content attaches to the first Scene that isn't omitted, instead of being dropped.
    • A successful import clears the undo history, so undoing a pre-import title edit can no longer overwrite the imported title.
    • Doc comment on put_blob.
  • bf0708e: rustfmt on files left over from earlier tickets.

Tests

tests/scene_cast.rs, plus new tests in tests/script_import.rs for the fixes.

Checks

  • cargo test --workspace --all-features, cargo clippy --workspace --all-targets --all-features -- -D warnings and bun run check pass.
  • The Svelte UI is type-checked only. It has not been run in the app.
Closes #32. Part of #24. > **Stacked PR.** Review and merge in order: #26 → #27 → #28 → #29 → #30 → #31 → #32. Each PR targets the branch of the one before it. ## What - Migration V7: `scene_cast(scene, character, look, wardrobe_item?)`. Deferred composite FKs ensure the Look and Wardrobe item belong to the Character. Projects imported earlier are backfilled. - Speaking Characters are added on their default Look at import. - Undoable edits: add a non-speaker, remove (refused for speakers), change Look, set or clear Wardrobe item. Deleting a Look or Wardrobe item in use is refused. Deleting a non-speaking Character removes its cast rows and restores them on undo. - Merge hook: the absorbed Character's cast rows move to the survivor. If both are cast in a Scene, the survivor's row wins. - UI: cast block per Scene. ## Also in this PR (review fixes across the stack) - `6045214`: - Leading script content attaches to the first Scene that isn't omitted, instead of being dropped. - A successful import clears the undo history, so undoing a pre-import title edit can no longer overwrite the imported title. - Doc comment on `put_blob`. - `bf0708e`: rustfmt on files left over from earlier tickets. ## Tests `tests/scene_cast.rs`, plus new tests in `tests/script_import.rs` for the fixes. ## Checks - `cargo test --workspace --all-features`, `cargo clippy --workspace --all-targets --all-features -- -D warnings` and `bun run check` pass. - The Svelte UI is type-checked only. It has not been run in the app.
Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
Co-Authored-By: Claude Opus <noreply@anthropic.com>
crowmaki changed target branch from issue-31-merge-entities to main 2026-10-07 09:58:10 +00:00
crowmaki deleted branch issue-32-scene-cast 2026-10-07 09:58:15 +00:00
Sign in to join this conversation.
No description provided.