Skip to content

Fix queue bottom sheet reorder behavior#621

Merged
theovilardo merged 1 commit intomasterfrom
codex/fix-drag-and-drop-in-queuebottomsheet
Dec 23, 2025
Merged

Fix queue bottom sheet reorder behavior#621
theovilardo merged 1 commit intomasterfrom
codex/fix-drag-and-drop-in-queuebottomsheet

Conversation

@theovilardo
Copy link
Copy Markdown
Owner

Summary

  • align queue bottom sheet reorder keys with playlist implementation to keep stable identifiers during drag
  • map drag positions by song id so items can move across multiple positions in a single gesture

Testing

  • Not run (not requested)

Codex Task

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +586 to 590
itemsIndexed(items, key = { _, s -> s.id }) { index, song ->
ReorderableItem(
state = reorderableState,
key = "${song.id}_$index",
key = song.id,
enabled = index != 0
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Duplicate song keys collapse reorder identity

Queue rows are now keyed only by song.id and the drag mapping resolves positions by the first matching id. If the queue contains the same track more than once, the keys are no longer unique: dragging the later copy will be mapped to the first occurrence, so the wrong item gets removed/inserted and the resulting reorder callback targets the wrong song. Compose also expects stable unique keys per row, so duplicates will misbehave under drag.

Useful? React with 👍 / 👎.

@theovilardo theovilardo merged commit 1c08240 into master Dec 23, 2025
@lostf1sh lostf1sh deleted the codex/fix-drag-and-drop-in-queuebottomsheet branch January 16, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant