crabidy/quality
Test User 001abcc35c queue: de-duplicate and sort the queue, server-side
Two verbs that rewrite what the queue already holds instead of adding to
it: DedupQueue and SortQueue, on the playback loop, for every client.
Client-side was the tempting shortcut and the wrong one — a
client-computed Remove races the resolve stream, and "sorting" as a
Replace of paths re-resolves everything through providers and restarts
playback at the head.

A duplicate is the same provider item id *scoped to its provider* (the
content store keys content the same way, so unscoped ids let two
providers' numeric ids collide), or the whole path when a provider
reports no id. Deliberately not artist+title: identical metadata is
routinely a different recording, and a wrong merge is unrecoverable
queue state. Within a group the playing entry survives, else the
earliest — "keep the first" stops the music whenever the playing copy is
a later one — and the removal itself goes through remove_tracks, so one
code path maintains play_order.

Sorting permutes `tracks` and then treats the play order by mode: with
shuffle off it rebuilds it as the identity with the cursor on the current
track (the sort decides what plays next), with shuffle on it remaps it
through the permutation so the shuffled sequence and the position in it
survive. Five stable strategies (artist→album, album, title, duration,
reverse), keys built once per track, unknown sorting last in both
directions, and UNSPECIFIED refused as InvalidArgument.

DedupQueue answers with a count, alone among the queue verbs: 0 cannot be
recovered from the new snapshot and is what a user needs to hear. It
crosses as a number — the wording is each client's. TUI: `u` and a modal
`S` sort menu whose unclaimed keys are swallowed, plus the count in the
queue pane title. Web: the same keys, clickable menu rows, toolbar
buttons, count in a toast. CLI: `queue dedup` and `queue sort <key>
[--desc]` with the strategy as a ValueEnum.

Full dev-flow: architecture/queue-order.md, quality/queue-order.md,
plan/queue-order.md, plan/summary.md.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-29 21:50:17 +02:00
..
audiobookshelf-provider.md Add the audiobookshelf provider (`/abs`) 2026-07-23 23:22:52 +02:00
bookmarks.md Capture library subtrees as bookmarks 2026-07-21 11:11:27 +02:00
build-features.md build: put every provider, opus, and the spectrum behind cargo features 2026-07-25 03:15:32 +02:00
captures.md Capture library subtrees with downloaded audio 2026-07-21 13:45:04 +02:00
cbd-bundle.md Bundle server and TUI into a single cbd binary 2026-07-21 14:15:47 +02:00
cli.md Implement the comprehensive CLI (stage 5) 2026-07-22 12:13:51 +02:00
crabidy-store.md Let a same-source W re-capture replace its save in place 2026-07-22 22:35:48 +02:00
fs-provider.md Add a filesystem provider for serialized track nodes 2026-07-21 01:58:55 +02:00
fyyd-provider.md fyyd: mark live API validation done 2026-07-23 17:35:18 +02:00
help-modal.md Add a help modal to cbd-tui behind a declarative binding table 2026-07-20 17:27:12 +02:00
incremental-captures.md Make download captures incremental with skipped tracks and progress 2026-07-21 15:45:04 +02:00
jamendo.md Add the Jamendo provider (/jamendo) for Creative-Commons music 2026-07-24 13:43:05 +02:00
mpris.md cbd-tui: speak MPRIS, so the media keys reach the server 2026-07-28 01:27:28 +02:00
node-editing.md Add rename and delete for modifiable library nodes 2026-07-20 23:34:47 +02:00
orphans.md Add the /orphans provider: a store garbage-collection view 2026-07-22 22:47:23 +02:00
progressive-queueing.md Queue large collections progressively 2026-07-21 01:08:34 +02:00
queue-order.md queue: de-duplicate and sort the queue, server-side 2026-07-29 21:50:17 +02:00
queue-persistence.md Persist queues as fs-provider folders 2026-07-21 10:41:49 +02:00
queue-register.md cbd-tui: queue marks, visual mode, and a paste register 2026-07-26 10:24:51 +02:00
roles-auth.md Auth: anonymous callers inherit the highest unguarded role 2026-07-23 16:06:01 +02:00
rss-provider.md rss: subscribe to podcast feeds at /rss, including premium ones 2026-07-26 12:36:30 +02:00
search.md Add Tidal search as creatable library nodes 2026-07-20 17:58:44 +02:00
seek.md seek: put seek and track-skip on two keys, and make the web gauge clickable 2026-07-26 14:29:30 +02:00
soundcloud-provider.md Add the SoundCloud provider (`/soundcloud`) with HLS playback 2026-07-24 02:27:10 +02:00
visual-mode.md cbd-tui: add library visual (paint-select) mode on v/V; move spectrum to f 2026-07-24 16:20:55 +02:00
web-client.md Add a Leptos web client served by the server 2026-07-21 22:43:06 +02:00
youtube-provider.md Add a YouTube provider backed by yt-dlp 2026-07-21 14:01:58 +02:00
youtube-rustypipe.md Fetch streams in bounded windows and restore yt-dlp for stream URLs 2026-07-21 18:18:40 +02:00