Commit Graph

12 Commits

Author SHA1 Message Date
Test User 8032bec8e1 Allow W captures of queues and bookmarks
The /queues and /bookmarks instances now advertise is_downloadable on
every node (new fsdy with_downloadable_nodes option). Because such
captures mix providers, the download sink skips tracks whose source
cannot be captured (unresolvable streams, local file playables) with a
warning instead of aborting; real download failures stay fatal.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 14:05:43 +02:00
Test User c6e9f71cf4 Add a YouTube provider backed by yt-dlp
The new ytdy crate mounts /youtube: login-free search terms exactly
like tidal's (creatable, renamable, deletable, results as queueable
downloadable tracks) and, when a cookies file is configured, the
user's playlists. All extraction runs through one bounded subprocess
seam (argv-only, per-call timeout, stdout cap, typed errors) so tests
drive the provider with a fake script. yt-dlp is declared in devenv;
a failed binary probe disables the provider, never the server.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 14:01:58 +02:00
Test User 7f0e900c56 Capture library subtrees with downloaded audio
W on a downloadable library node mirrors the subtree into /captures
(a fourth fsdy instance) like a bookmark, but downloads every track's
audio next to its toml; the toml points at the sibling by relative
name, so captures play with no provider round trip. Nodes opt in via
the new is_downloadable flags — Tidal blesses queueable and
track-listing nodes. The bookmark walk is now the shared capture walk
parameterized by a per-track sink.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 13:45:04 +02:00
Test User 655e8054b8 Capture library subtrees as bookmarks
w on a queueable library selection snapshots the whole subtree into a
third fsdy instance at /bookmarks: the orchestrator walks the source
iteratively and mirrors it as order-prefixed folders of link track
files (shared naming with queue persistence), tmp-and-swapped with
size caps so a runaway tree cannot fill the disk. One additive rpc,
CaptureLibraryNode(path, name), carries the flow; the TUI reuses the
input overlay prefilled with the selection title.

fsdy instances can now opt into an editable top level: root child
folders carry is_editable/is_deletable and support no-merge rename and
idempotent delete. /bookmarks mounts with it, and /queues too
(reserving current), so saved queues are renamable and deletable
through the existing e/d flows without TUI changes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 11:11:27 +02:00
Test User 4e44f672e8 Persist queues as fs-provider folders
Queues now survive restarts, built entirely on the fs provider:
fsdy::Client is instance-mountable and a second, read-only instance
serves <config>/crabidy/queues/ as /queues. Every queue is a folder of
order-prefixed link track files plus a hidden state sidecar, written
only by the new QueueStore (tmp-and-swap). The playback loop streams
every queue change through a latest-wins watch channel to a debouncing
persister task and restores queues/current/ (tracks, position,
modifiers) at startup without autoplay. w on the queue pane asks for a
name and drives the previously stubbed SaveQueue rpc; reloading a
saved queue is just queueing /queues/<name>, since link entries
rewrite to their targets at listing time. The old "no links into /fs"
parse rejection gave way to one-hop link semantics so queues can
reference fs tracks.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 10:41:49 +02:00
Test User 955c7ea5b4 Rename the track-file extension to .cbd-track.toml
.track.toml was too generic for files that only crabidy understands;
the cbd- prefix makes them unmistakable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 02:05:54 +02:00
Test User 4dd5f01217 Add a filesystem provider for serialized track nodes
A new fsdy crate exposes a configured root directory as /fs:
*.track.toml files are track nodes carrying metadata plus exactly one
playable reference — a local audio file, an http(s) URL, or a
crabidy-internal link. Link tracks rewrite Track.path to the target at
listing time, so playback routes through the existing prefix routing;
links into /fs are rejected, making chains impossible. Paths are
percent-encoded segments validated in one place (no root escape), the
orchestrator wires the provider optionally (a broken local config only
costs the /fs subtree), and the default chunked resolve walk provides
progressive queueing for free.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 01:58:55 +02:00
Test User ccab43a133 Queue large collections progressively
Resolving a nested node used to collect every track before the queue
changed: one broadcast at the very end, playback only after the full
walk, and the playback loop blocked for the duration. Now provider
resolution streams bounded chunks (tidaldy: one per 50-track page), the
playback loop applies and broadcasts each chunk as it lands, playback
starts with the first chunk, and Replace/Clear cancel in-flight
resolves down to the HTTP fetch. Queue.resolving (additive proto field)
drives an animated-dots pseudo-item in the TUI queue pane.

Also fixes Enter on a non-queueable library item blanking the queue
while audio kept playing, and the reversed album order left by the old
LIFO walk.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 01:08:34 +02:00
Test User 333c6e040a Add rename and delete for modifiable library nodes
Search-term nodes created via % are now modifiable: e renames the
selected node (prefilled overlay; the new title re-runs the search,
colliding titles merge) and d deletes it, both gated on new additive
LibraryNodeChild.is_editable/is_deletable flags and marked [ed] in the
library list. Two new rpcs follow the create contract: RenameLibraryNode
returns the renamed node (the TUI navigates into it), DeleteLibraryNode
returns the refreshed parent listing. Queued tracks from a renamed or
deleted term keep playing; verified end-to-end against the live API.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 23:34:47 +02:00
Test User d741523e53 Add Tidal search as creatable library nodes
Pressing % inside /tidal/search opens an input line; the entered term
becomes a tree node whose contents are the search results: track hits
queueable in place, artist and album hits as canonical /tidal/artists
paths. New CreateLibraryNode rpc + is_creatable flags (wire-compatible),
ProviderClient::create_lib_node routed by prefix, percent-encoded term
segments in crabidy-core, and a modal input overlay in the TUI with
creatable nodes marked [%]. Search terms live in memory for the process
lifetime; term nodes are deliberately not queueable so the resolve sweep
cannot drag whole discographies into the queue.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 17:58:44 +02:00
Test User 8586194096 Add a help modal to cbd-tui behind a declarative binding table
Pressing ? opens an overlay listing usage notes and every key binding.
The bindings now live in one declarative table (app/bindings.rs) that
both key dispatch and the help modal render from, so the help can never
drift from the real bindings. Includes the dev-flow design artifacts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 17:27:12 +02:00
AI User 86ce63ae61 Document the as-built architecture
Records the current design in architecture/overview.md: crate topology,
the three concurrency domains and the channels between them, the
filesystem-like path addressing scheme, the span-carrying message
envelope used for tracing, and the Tidal device-flow auth.

Captures the trade-offs behind the load-bearing choices (paths vs opaque
ids, blocking engine thread, lossy broadcast) and the known gaps, so
later changes can see what was traded away.

Adds d2 to devenv for rendering the embedded diagrams.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-20 10:34:45 +02:00