crabidy/crabidy-server
Test User 1b2f01a2b6 queue: make the Insert *command* mean what the primitive now means
The previous commit fixed QueueManager::insert_tracks to insert at an index
but left the paste path unchanged, so pasting behaved exactly as before.
PlaybackCommand::Insert built a ResolveKind::InsertAfter(position), and that
op compensated with a + 1 — which cancelled the fix on the one path paste
actually takes. Every test I had written drove either the primitive or the
op directly, so nothing caught it.

ResolveKind::InsertAfter is now InsertAt: the index insert_tracks takes, no
offset. The Insert command passes its position straight through, and the two
callers that mean "after" add the 1 themselves — play-next (`L`) passes
current + 1, and the op's chunk arithmetic is unchanged.

Three tests now cover the level that was missing: the Insert command at an
interior index pushes the row that was there down, the Insert command at 0
reaches the front (what `P` on the first row needs), and play-next still
lands right after the current track rather than on top of it. All three
would have failed before this change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-26 12:10:31 +02:00
..
src queue: make the Insert *command* mean what the primitive now means 2026-07-26 12:10:31 +02:00
tests Web client: prompt for login on visit when auth is enabled 2026-07-23 17:51:55 +02:00
Cargo.lock Add cargo-server with liby service draft 2023-05-22 22:05:38 +02:00
Cargo.toml build: put every provider, opus, and the spectrum behind cargo features 2026-07-25 03:15:32 +02:00
build.rs Implement the comprehensive CLI (stage 5) 2026-07-22 12:13:51 +02:00