Skip to content

Shared program bundle omits choreographers → received dances lose author attribution #412

Description

@isaacbanner

What happened?

When a program is shared via AirDrop / OS share sheet, buildProgramShareBundle (app/lib/src/export/program_share_bundle.dart) constructs the CompendiumArchive with only programs and danceschoreographers defaults to const []. The bundled dances therefore carry authorIds that reference choreographer records the archive doesn't include.

On the receiving device the imported dances cannot resolve those author ids to any choreographer, so a received shared dance loses its choreographer/author attribution (shows no author). Expected: a shared dance arrives with its choreographer(s) intact, just like the dance content does.

This is a fidelity gap distinct from the "Dance not imported (GUID)" slot-resolution bug fixed in #410. It surfaced while reviewing #410: because bundles carry no choreographers, the incoming author names are empty on the receiver, which is also why #410's author-set confidence signal is inert in production (content-equality carries that fix). Fixing this bundle gap both restores author fidelity and re-enables the author-set match signal.

Steps to reproduce

  1. On device A, open a program whose slots reference dances that have a choreographer.
  2. Share the program via AirDrop / share sheet (produces a .ccshare bundle).
  3. Receive and open it on device B (that does not already have those exact dances).
  4. Observe: the imported dances have no choreographer/author, even though device A showed one.

Platform & version

Both macOS and iOS (shared ArchiveIntakeService / CompendiumArchiveImporter path); current main.

Dance data involved (if notation-related)

Any authored dance with a choreographer (e.g. a dance authored by "David Kaynor").

Proposed fix

In buildProgramShareBundle, collect the choreographers referenced by the bundled dances' authorIds (deduped by id, resolved via an injected lookup mirroring the existing danceFor pattern) and include them in the CompendiumArchive. Add a round-trip test asserting a shared authored dance imports with its choreographer(s) attached. Keep the change surgical and OWASP-safe (the received archive is still untrusted input — no relaxation of intake validation).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions