Skip to content

Move semantics: copy speakers into new scope instead of unlinking#2

Draft
asg017 wants to merge 1 commit into
asg017/sharing-v2from
asg017/copy-on-move-speakers
Draft

Move semantics: copy speakers into new scope instead of unlinking#2
asg017 wants to merge 1 commit into
asg017/sharing-v2from
asg017/copy-on-move-speakers

Conversation

@asg017

@asg017 asg017 commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Stacked on top of #1 (sharing-v2).

Changes move semantics so that moving a transcript between scopes (standalone↔collection, collection→collection) no longer unassigns its speakers.

What changes

The single primitive (renamed unlink_and_rescopecopy_and_rescope) now, for each speaker the transcript references, creates a fresh speaker in the destination scope — carrying name (suffixed on clash, never auto-merged), description, configured state, and photo — and repoints the entries onto the copy, so assignments survive the move.

  • Transcript-scoped source speakers (exclusive to the moved transcript) are deleted as before.
  • Collection-scoped source speakers are left intact for sibling members.

API / UI

  • Response field unlinked_entriescopied_speakers across page_data models + regenerated TS types.
  • Confirm-dialog copy and toasts updated on both detail pages ("speakers come along — duplicate names get a numbered suffix").

Tests

Existing move tests rewritten to assert the copy behavior, plus a new case covering name-clash suffixing. Full suite green (36 passed).

🤖 Generated with Claude Code

Moving a transcript between scopes (standalone<->collection,
collection->collection) no longer unassigns its speakers. The single
primitive copy_and_rescope now creates a fresh speaker in the
destination scope for each speaker the transcript references --
carrying name (suffixed on clash, never auto-merged), description,
configured state, and photo -- and repoints the entries onto the copy,
so assignments survive the move.

Transcript-scoped source speakers (exclusive to the moved transcript)
are deleted as before; collection-scoped source speakers are left
intact for sibling members.

Renames the response field unlinked_entries -> copied_speakers across
page_data models, regenerated TS types, and updates confirm-dialog
copy + toasts on both detail pages. Tests rewritten to assert the copy
behavior, plus a new case covering name-clash suffixing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant