Turning it on shows a dialog that says the names of the most played artists go to Last.fm. Turning it off asks nothing, and a failed change leaves the switch as it was.
A list value is sent once per item (seed=1&seed=2). A signal can cancel a request and a cancelled call rejects with AbortError, not as a lost connection. ApiError keeps Retry-After in seconds.
- The README keeps the JWT secret in a file that is passed every time, so an upgrade
does not make a new one and sign everybody out.
- A health check that succeeds is logged at debug level, so a container does not write
thousands of lines a day; any other answer, and every other request, still goes at info.
- .dockerignore patterns match in every folder, as .gitignore does.
- compose.yaml waits 15 seconds for Sonda to stop (it allows itself 10) and requires
MUSIC_DIR instead of creating an empty folder.
- The README says that the library path is the one inside the container, that the health
check follows SONDA_LISTEN, and that a sonda.toml in /data works as a secrets file.
- one button in the player bar and one in the full-screen player puts the whole page in full screen and takes it out
- it follows the browser: Esc and F11 flip it back, a refused request leaves the page as it was
- left out where the browser has no Fullscreen API (for example iPhone Safari)
- English and Italian labels
- A multi-stage Dockerfile: Sonda has no CGO, so the binary is static and the final
image (alpine, 69 MB) holds only it, the CA certificates and the time zones.
- It runs as an ordinary user (uid 10001), keeps the database and the files it makes
under /data (a volume), listens on 0.0.0.0:8080 inside the container, and does not
start without SONDA_JWT_SECRET.
- A health check on /api/v1/health that follows SONDA_LISTEN.
- compose.yaml as an example: the secret comes from .env (which is not committed), the
music is mounted read-only, and the port is published on this machine only.
- .dockerignore keeps the web client, the databases and the agent files out of the build.
- The README says how to build, run and back up, and how to use a host folder.
- colour in the surfaces too: deep indigo ground, saturated violet panels, electric yellow accent
- checked by the same contrast test as the other themes
- README lists six themes
- base radius from 10px to 4px; one value (--radius in src/index.css) sets every corner
- no fully round shapes any more: play button, search box, pills and artist photos are squares with small corners
- The gate now comes after what only the database decides (a seed that is not an
artist, no seed and no permission), so those answers are not held up by three
slow Discovers and do not make the listener "busy".
- A request that waits more than 30 seconds for a turn answers 429 instead of
hanging for as long as the providers are slow.
- The spec and the README say that a waiting request counts as running.
- the player bar stays at the bottom on long pages (sticky sits on its wrapper, not on the bar)
- theme and language groups in Settings have a visible label
- on a phone the menu is a row of links instead of a tall card, and the privacy note is left out there
- the full-screen player is centred vertically
Found by running the app in a real browser against a real server.
A cold Discover can make dozens of provider requests, and nothing stopped one
listener, or a client that keeps opening and cancelling requests, from lining up
work for the providers and slowing everyone else's.
- A listener who already has a Discover running gets 429 `discover_busy` with
Retry-After, at once.
- At most three Discovers run at the same time, whoever asks; the others wait for
their turn, and one that stops waiting does no work and keeps no place.
- The place and the turn are given back when a Discover fails or ends.
- Spec and README describe it; the fakes of the tests are safe for parallel runs.
- the token is renewed in the background when under 3 minutes are left, so the stream URL of the next track is never built from an expired token
- a renewal adopts a session from another tab only when it differs from the one in memory
- listen keys no longer need crypto.randomUUID, which does not exist on pages opened over plain HTTP on a local network
- signing out, or closing the app, stops the music and empties the queue, and the play in progress is reported first
- a provider address that is not an http(s) address is shown as text, never as a link
- README section for the web client: how to run it next to sondad, what it does today, the commands
- the greeting on Home is read once per visit (lint: no Date during render)
- checked against a real sondad: login, renewal and spent refresh tokens, media URLs with Range, listens, search, and the provider-off answers
- theme and language as radio groups, each theme with a preview of its colours, the choice remembered
- change password: 8 to 256 bytes checked before sending; a changed password signs this session out, as the server ends every session
- account name and role, and sign out
- greeting by the hour, recently played songs from the listening history (each song once), shelves of albums and artists
- an empty history, an empty library and a song that is gone each get their own short message
- a shelf that cannot be loaded does not hide the others
- search page with a 250 ms pause after typing, the text kept in the address, and at most 200 characters sent
- artists, albums and songs in three groups of six, each with a link to the full list
- accents and capitals are left to the server, which ignores them
- list hooks can take a smaller page size and stay switched off until there is something to ask
- lists of artists, albums and songs, loaded 50 at a time, with the search text taken from the address
- album page and artist page; a click on a song plays the list from there
- artist page shows a Wikipedia text, similar artists and tags with their credits, and the photo credit
- providers that are off, unreachable or without an id give a short explanation, never an error page
- artists a provider named, with nothing to play, still have a page
- Asking whether Lidarr has an artist keeps the answer for a minute, asks once however
many ask at once, and has at most four questions on their way; what cannot be
answered is not kept, and a send forgets what was kept.
- An id that is not a MusicBrainz id (one that a provider named and that was only
cleaned) is no id: it is refused or shown as no_id instead of becoming a 500.
- A send that waits for its turn gives up when its request does.
- A bad answer after the add also says the artist may have been added; a canceled
send ends like the other canceled requests.
- The README says which artists can be sent.
- bar at the bottom of every page with cover, artists, controls, seek and time
- full-screen player in a dialog: big cover, bar-style seek control, up next, focus kept inside, Escape closes
- Space plays and pauses unless the key belongs to a field, a button or a link
- songs list row, seek control and time formatting
- jumpTo in the queue store for a click on an upcoming track
- one event per play with its own idempotency key: complete, skip, or play when the page closes
- a failed send is retried with the same body and key after 1, 4 and 16 seconds; a 400 or 404 is final
- closing the page sends the open play and anything waiting for a retry with keepalive
- a hidden tab keeps playing, so only pagehide ends a play early
- POST /artists/{id}/lidarr (admin) adds the artist to the admin's own Lidarr by its
MusicBrainz id, never by name, with the profiles, the folder and the monitor
option the admin chose. It works for any artist that has an id, also one that
Sonda only learned of from a list of similar artists. It can be repeated: an artist
that Lidarr already has changes nothing. Two sends at once go one after the other.
- GET /artists/{id}/lidarr (signed in) says whether Lidarr has the artist and
monitors it; what stops the answer is a status (disabled, no_id, not_configured,
error), as for the descriptions.
- It needs the provider switched on and the profiles and folder chosen; a timeout
says the artist may have been added anyway.
- Spec, contract test and README, which also say that Sonda downloads nothing.
- drives the audio element from the player store: load, play, pause, seek, next on end
- a renewed access token swaps the stream URL and resumes at the same second, playing or paused
- reports start, listened time (in steps of at most two seconds) and finish for the listen reporter
- media keys and lock screen through the Media Session API
- queue with next, previous, seek, repeat (off, all, one), shuffle that keeps the original order, enqueue, play next and remove
- seek and restart requests are explicit, so the audio engine can follow them
- sidebar with the current page marked, privacy note, and a main area that wraps on narrow screens
- routes for home, search, artists, albums, songs and settings, and a not-found page
- paged lists for artists, albums and songs, 50 at a time, with search text and artist/album filters
- cover and artist photo that fall back to rings or an initial, and retry when the token is renewed
- fetch client with bearer token, one retry after a renewal, ApiError with the server code
- session kept in localStorage; renewal is single-flight in a tab and under a Web Lock across tabs, and a tab adopts a session another tab already renewed
- a refused refresh token signs out once; an unreachable server keeps the session
- mediaUrl and onTokenChange for audio and image URLs that carry the token
- sign-in and first-account screen, and a gate that shows the app only when signed in
- i18next with en and it, language from the stored choice, then the browser, then English
- a test keeps both files on the same keys with no empty text
- API error codes map to error.<code>, with error.unknown as the fallback
- Sonda, Tokyo Night, Gruvbox dark and Gruvbox light as CSS variables with shadcn token names
- contrast test: text 4.5:1, accent and form outlines 3:1 in every theme
- Gruvbox dark muted text lightened to pass
- theme choice is stored in localStorage and survives it being blocked
- Vite, React 19 and TypeScript in web/, Vitest with jsdom and Testing Library
- Tailwind v4 and shadcn/ui, with Figtree and Fraunces bundled locally
- npm run gen:api builds src/api/schema.d.ts from the OpenAPI spec
- dev server proxies /api to sondad (SONDA_URL, default 127.0.0.1:8080)
- mockFetch test helper that refuses unmatched requests
- Setting the address alone now stores the default options (monitor all, search
for missing albums), so what is shown is what will be sent.
- A 409 from Lidarr, when two adds of the same artist cross, means the artist is
already there; only "an artist with this ID was not found" is an unknown artist.
- The client never goes through a proxy named by the environment, since Lidarr is
on the admin's own network and the key travels in a header.
- An address that cannot be read back (an IPv6 zone) is refused instead of being
stored and reported as "not configured".
- A deadline asking Lidarr is a bad gateway, not an internal error; a redirect is
reported with a hint to use the final address; the request schema of the Lidarr
options is closed.
Lidarr is a server of the user's own that looks for and downloads music. Sonda
never downloads; this is the first piece of letting an admin send it an artist.
- The `lidarr` provider, off by default: an address, an API key (32 hexadecimal
characters, never returned) and, chosen once, a quality profile, a metadata
profile, a root folder, the monitor option and whether to search for missing
albums. It cannot be enabled without an address and a key.
- The address is checked: http or https, no user and password, no query, no
fragment, no closing slash.
- A small client of its own, apart from the outbound one (which only makes plain
GETs): the key travels in a header, no redirect is ever followed, answers and
time are bounded, and the address and key are read for every request.
Status, options, artist by MusicBrainz id and add (lookup, then the add that
Lidarr's own screen sends).
- `GET /providers/lidarr/options` lists the profiles and root folders; the test of
the provider checks the address and the key (`no_address` when it has none).
- Migration 0017 adds the address and the options to the provider settings.
- OpenAPI, contract test and README say what is sent and where.
- A search text that has nothing left once its accents are taken off matches
nothing instead of everything.
- The search key folds compatibility forms (the ligature "fi", full-width
letters) and the Greek final sigma.
- The start-up refresh of the keys logs when it starts and how long it took, since
it can take a while on a big library the first time.
- More tests: a retitled track is found by its new title, a refresh fixes both
keys and keeps "Beyoncé" and "Beyonce" apart, more cases for the key.
- A search key apart from the key that identifies artists, albums and tracks:
lower case, accents taken off (Latin, Greek and Cyrillic marks only, so kana
and Hangul stay intact), and letters like ß, æ, ø, ł written plain.
- GET /artists, /albums and /tracks look in it, so "bjork" finds "Björk" and
"strasse" finds "Straße".
- "Beyoncé" and "Beyonce" stay two artists: the identity key keeps accents.
- Migration 0016 adds the column on SQLite and PostgreSQL; RefreshMatchKeys
fills it for existing rows at start.
- golang.org/x/text is now a direct dependency.
- A panic while counting no longer leaves the job marked as running; a panic in the
work of one item is a failure of that item, and a panic in the list ends the job
with a reason.
- A stop while the items are counted is recorded as a stop instead of a 500, and a
count that fails leaves the status as the previous job left it.
- An artist that lost its MusicBrainz id since it was listed is skipped by the
pictures job, as the spec says, instead of counting as a failure.
- A picture that cannot be used now (refused download, bytes that are not an image)
is a failure when a good picture is stored, so a refresh never throws it away.
- The outcomes the artist jobs report share their constants in the jobs package.
- The spec no longer calls each job "the one request" that goes through the library.
- The test that waited with a sleep for the count now waits for a signal.
Add one engine, internal/jobs, that runs the jobs which go through the whole
library: start, stop, progress, one at a time, give up after five failures in
a row, end at once when a provider is off.
- The covers job now runs on the engine; its API is unchanged.
- POST/GET/DELETE /library/artist-images looks for the picture of every
artist of the library that has a MusicBrainz id.
- POST/GET/DELETE /library/descriptions does the same for the Wikipedia
description.
- ?refresh=true searches everything again and never replaces a stored result
by a failure; artists without an id are never touched, nothing is looked up
by name.
- images.Service.EnsureArtistImage and about.Service.Ensure do the work for one
artist; the lists come from ImageRepo and DiscoveryRepo.
- jobs.Runner binds a job to the application context, replacing the two
hand-written controls.
- OpenAPI, contract test and README describe the new endpoints and say that
they are bulk requests.
- A refresh (or any rebuild) while the Cover Art Archive is switched off, but its data
not taken back, no longer turns the covers it gave into "no cover" and deletes their
files: the stored cover is kept and its date renewed, so the files are not searched
again at every request.
- When none of an album's files and folders can be looked at (an unmounted disk, a
permission), that is ErrFilesUnreadable (503 files_unreadable), not "no picture": nothing
is remembered, nothing built is touched, the archive is not asked, and the job counts it
as a failure and gives up after five. A link that leaves the library is still just refused.
- The job calls the build for every album that is not good yet and does not serve an older
cover on an outage, so a dead provider shows as failures and trips the limit instead of
being reported as covers from the archive.
- Start marks the job as running before counting the albums and does not hold the lock
meanwhile; a stop that comes back as a plain driver error is not a failure; a job that
finished by itself is never marked stopped.
- Spec and README say so; the tests cover each case, including a list that fails midway.
- POST /library/covers (admin) starts, in the background and one at a time like a scan,
a job that builds the cover of every album that has something to play and no cover that
is still good; GET /library/covers shows the progress and how the last job ended;
DELETE /library/covers stops it. ?refresh=true searches every album again.
- For each album it does what opening its cover does: the user's own files first, then the
Cover Art Archive if the provider is on. It gives up, and says why, when the provider
fails for five albums in a row; an album that vanished is skipped, not a failure.
- This is the one request that goes through the whole library, and the README and the
provider text say so: with the archive on it sends the release group id of each album with
no picture in its files, one after the other, spaced out.
- NewRouter now refuses to build when a service was not wired, naming it, instead of
panicking at the first request (the wiring of this job in main had been missed, which no
test could see).
- The outbound spacing test measures where the request leaves the client, so a busy
machine cannot make it fail.
- Spec, contract and HTTP tests, README updated.
Closes#45
- The covers that come from the Cover Art Archive now live in a folder of their own
(images/album-remote). Taking the provider's data back deletes that folder, so nothing
from the archive is left whatever became of its records: a rescan makes a record stale
and a later search that finds nothing replaces it, and neither of those used to remove
the files. A cover that moves between the user's files and the archive, or goes away,
no longer leaves the old files behind.
- A redirect to a place that is not allowed is an outage (502, not remembered, an older
cover served), not "no cover" for a day for every album. A picture over the limit is
still "no cover".
- A track that moves to another album (a fixed title) leaves the first with no track: it
gives up its release group id, so the album the track went to can take it. An album
that has an id keeps it; an id another album owns is not given twice.
- Waiting for a local slot is no longer reported as the provider being unreachable, and a
build whose reads were purged three times is not served with files that were never written.
- README and spec no longer say covers never contact anybody.
- Tests: the new folder and the purge after a rescan, files left by a replaced cover, the
local wait, repeated purges, a refused redirect, the update path with a taken id and the
emptied album.
- The scan reads the MusicBrainz release group id of an album from the tags of its
files (MUSICBRAINZ_RELEASEGROUPID, a vorbis comment or an ID3 frame) and stores it in
albums.mbid: it is taken only when the file has an album and exactly one valid id, an
album keeps the one it has, and an id that another album owns is not given twice. A full
rescan reads it for music that was already indexed.
- New provider "coverartarchive" (off by default, no key, contact in the User-Agent). When
an album has no picture in the user's own files, which always come first, its cover is
asked from the archive by that id and never by a title: only the id leaves the server.
The same GET /albums/{id}/cover; the record keeps the source. An outage is a 502
provider_unavailable and is not remembered, and an older cover is served in its place.
- The archive answers with three redirects (coverartarchive.org, archive.org, a data node
whose name changes). The outbound client can now follow redirects, but only the ones the
caller allows, up to a limit; here that is https on archive.org and its subdomains.
- A purge counter now guards the covers too: a read that started before the provider's data
was taken back is not kept. Removing the provider's data forgets the covers that came from
it and deletes their files, and leaves the ones from the user's files.
- Spec, contract and HTTP tests, README updated; the facts of the real archive are written down.
Closes#43