Band Lineup 1.12.0: Sync keeps your moves and puts each person in one spot

Two Sync problems found by checking the real October 25 plan against the
board:

- Someone on the plan twice (Mike Powell is Leader and Guitar [Acoustic])
  could fill two spots, pushing a real player off the board. Which spot
  the duplicate took depended on the order Planning Center returned
  people, so it only happened some weeks. Assignment now uses each person
  once.
- Moving a synced person to another spot was undone by the next Sync,
  which re-placed everyone it had filled. A move is now a hand placement
  for the current plan and Sync leaves it alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-20 13:11:56 -04:00
co-authored by Claude Opus 5.5
parent a692b6a9e2
commit c1152b4ab3
3 changed files with 20 additions and 3 deletions
+9
View File
@@ -65,3 +65,12 @@ console.log('assignment:', JSON.stringify(out));
assert.strictEqual(bestLibraryMatch('Chris Smith', [{ id: '1', name: 'Chris' }, { id: '2', name: 'Chris' }]), null, 'ambiguous tie → null');
console.log('bestLibraryMatch: all assertions passed ✓');
}
// --- one spot per person: someone scheduled twice (Leader + Acoustic) fills one spot only ---
{
const P = (label, name, personId) => ({ label, name, personId });
const slots = ['[LEADER, VOX 1, ACOUSTIC] MIX 1', '[GUITAR, 2] MIX 7'];
const got = assignMembersToSlots(slots, [P('[Leader]', 'Mike', 'mp'), P('Guitar [Acoustic]', 'Mike', 'mp'), P('Guitar [Rhythm]', 'Craig', 'cs')]).map((m) => (m ? m.name : null));
assert.deepStrictEqual(got, ['Mike', 'Craig'], 'Mike once, Craig gets the guitar spot');
console.log('one spot per person: all assertions passed ✓');
}