Merge Characters and Locations (#31) #77

Merged
crowmaki merged 1 commit from issue-31-merge-entities into main 2026-10-07 09:58:10 +00:00
Owner

Closes #31. 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 V6: merged_into on character and location, plus character_alias and location_alias.
  • merge_characters moves dialogue Lines, Looks and Wardrobe items (clashing names get a suffix, and the survivor keeps its default Look). merge_locations moves Scenes and drops the absorbed Location's folder membership. Blank survivor fields are filled from the absorbed Entity.
  • The absorbed Entity becomes a tombstone, hidden from lists, and its name becomes an alias of the survivor. Creating or renaming to an alias is refused and names the survivor. Chained merges re-point to the live survivor.
  • Merges are undoable and restore every row exactly.
  • Hook: merge.rs reassign_character_references / reassign_location_references. Later tables that store Character or Location ids must be reassigned there and restored in revert.

Tests

tests/merge.rs.

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 #31. 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 V6: `merged_into` on `character` and `location`, plus `character_alias` and `location_alias`. - `merge_characters` moves dialogue Lines, Looks and Wardrobe items (clashing names get a suffix, and the survivor keeps its default Look). `merge_locations` moves Scenes and drops the absorbed Location's folder membership. Blank survivor fields are filled from the absorbed Entity. - The absorbed Entity becomes a tombstone, hidden from lists, and its name becomes an alias of the survivor. Creating or renaming to an alias is refused and names the survivor. Chained merges re-point to the live survivor. - Merges are undoable and restore every row exactly. - **Hook:** `merge.rs` `reassign_character_references` / `reassign_location_references`. Later tables that store Character or Location ids must be reassigned there and restored in `revert`. ## Tests `tests/merge.rs`. ## 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>
crowmaki changed target branch from issue-30-entity-editors to main 2026-10-07 09:58:03 +00:00
crowmaki deleted branch issue-31-merge-entities 2026-10-07 09:58:10 +00:00
Sign in to join this conversation.
No description provided.