M8b: Library admin (libraries, scans, problem items) #23
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
mett/cushion!23
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/m8b-library-admin"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Second of three M8 parts, as agreed in the session: library management. Item editing (metadata, cover, matching, chapters) follows as M8c, which will close #8.
Part of #8
What's in it
library-scantasks over the socket (task_started/task_finished) and gives no percentage. While a scan runs the page shows how many items it has added or changed so far (from the item events), then the server's summary ("2 added (85 ms)"). The sidebar's Admin entry pulses while any scan runs. Scans already running when the app starts come from/api/tasks./api/search/providers), square covers, hide single-book series, folder watching, scheduled scan (presets or cron), mark as finished by seconds left or percent. The server merges settings, so the ones Cushion doesn't show keep their values./api/filesystemfrom the top level, with breadcrumbs; a path can also be typed.DELETE /api/items/:idand/api/libraries/:id/issues, no hard delete).library_added/updated/removedfrom the socket.Separate fix (own commit)
Right after start or login the server often closes the first socket right after the handshake; the retry a second later works. That close marked the server unreachable for a second, so the first page loads came from the cache. On a new login the cache is empty, so the app showed "This account has no audiobook libraries" and moved to Downloads. A close before the server's
initno longer counts as unreachable, and a successful login or resume marks the server reachable at once.Tests
pnpm check0 errors; Prettier clean on tracked and new files (pnpm lintas a whole still trips over another session's untracked.claude/worktrees/).cargo fmt --check,cargo clippy --all-targets -D warnings: clean.cargo testagainst the test server (ABS 2.37.2 via Podman): all pass. Newlive_admin.rs: providers and server folders; create, edit (settings round-trip), scan, force-rescan and delete a library; missing items made by copying a book into the test server's data folder, scanning, deleting it and scanning again, then removing one and the rest. Unit tests for the request body, decoding, scan-task tracking and item-event library ids.live_lists.rs: a batch added to a collection may come back in any order, which madecollection_lifecycleflaky on a fresh server; it now compares the set.tauri dev(isolated XDG dirs, test server): Admin page, scan with 2 added, then 2 missing with the problems link, the problems page (remove one, remove all), a new podcast library through the folder browser with a daily scan and 90 %, editing it (values kept), the switcher picking it up, and deleting it with the typed name. The login fix was checked with the new log lines.🤖 Generated with Claude Code