Add EditionDetailsHandler, the single block popup opened from the editions
table. It owns the arrow, Home and End scrolling over its ScrollableText body,
and the Esc that pops the popup and clears the edition details modal.
The handler is nested under BookDetailsHandler, which claims the block ahead
of its own tables. It never sees the keypress that opens it, so it performs no
build, and it dispatches no network events: the popup is assembled from an
already loaded row.
Scrolling is implemented rather than stubbed. The body is mostly the edition
overview, which routinely overflows the popup, so empty scroll methods would
leave the arrow keys dead on the longest text in the view.
Add BookDetailsHandler, covering the editions, history and manual search
tables, the automatic search, manual download and delete book file prompts,
and tab movement across the book details modal.
Selecting an edition builds the EditionDetailsModal client side from the
already loaded row and pushes the popup block. Readarr has no edition detail
endpoint, so there is no network request and no event to dispatch.
The delete book file prompt is guarded on the book files table being
populated. Unlike Lidarr, where a track row carries its own file id, an
edition carries none and the file id comes from a separate table that can be
empty while editions are present.
Add AuthorDetailsUi: the author description pane plus the three author info
tabs (Books, History, and Author Search), along with the history item details,
automatic search, update and scan, and manual search confirmation popups.
LibraryUi now accepts and draws it over the authors table.
The description pane omits the Disambiguation and Type lines that the Lidarr
equivalent renders. GET /author returns neither key, so both lines would be
blank on every record. The books table drops the Type and Duration columns for
the same reason, since books have no type and no duration, and renders Files as
the book file count over the total book count.
Land create_history_event_details together with this first caller so it is not
committed as an unused function.
Extract decorate_book_row_with_style rather than inlining the row styling in
the table closure, matching decorate_author_row_with_style in the sibling
library view. Rendering to a string discards colour, so the styling branches
are only reachable by tests through a named function.
The stats, downloads, and logo panes of the Readarr context row had no test
exercising them. Add snapshots for the populated, loading, and empty variants
of the context row, plus loading and empty variants of the tab view.
Add LibraryHandler, which owns the authors table and its sort, search,
and filter overlays through TableHandlingConfig, along with the add,
edit, toggle monitoring, update all, and refresh key actions and the
delete prompt. Dispatch into it from ReadarrHandler and add the main tab
left and right movement helper.
authors_sorting_options offers eight sorts: name, status, quality
profile, metadata profile, books, size, monitored, and tags. It omits
the type and tracks sorts that the artists table has. GET /author never
returns authorType, so that column would be empty on every row, and
author statistics carry no track count.
Also cover the Readarr arm of handle_events, which was previously
unreachable from any test: neutering the arm entirely left the suite
green.
Give dispatch_by_readarr_block a real match so each view requests what it
needs, and refresh the shared metadata on first render and on every poll
tick. Until now the Readarr tab rendered but never fetched anything.
Guard the conditional arms the way the other servarrs do: the manual
author search only fetches when no releases are cached, book history only
when the books table is populated, and the manual book search only when
the book details modal exists with no cached releases.
Add the selection id helpers the arms read from, named to avoid colliding
with the equivalents the other servarrs already define on App.
Book edition details gets no arm on purpose. There is no endpoint to fetch
a single edition, and the popup is fully populated before it opens.
The fetched settings are only written into app state when nothing is
already held there, so a refresh landing while the user has the settings
prompt open cannot overwrite edits in progress.
The fixtures give every field a distinct value. Settings whose fields
all share one value cannot detect two of them being mapped to each
other's keys.
Results come back keyed only by indexer id, so each one is joined
against the cached indexer list to recover a display name, and its
validation failures are flattened into a single line for the results
table.
The endpoint reports failures with a non-2xx status, so the request
ignores the status code and parses the body either way. When the
request itself fails the results table is replaced with an empty one
rather than being left showing the previous run.
Fetch the indexer's full details, then post them back verbatim to the
test endpoint. The payload round-trips through serde_json::Value so the
fields Indexer does not model, such as infoLink and the per-field label
and type metadata, survive the round trip intact.
A successful test returns an empty JSON object and clears
indexer_test_errors; a failure returns an array whose first entry
carries the error message. The test endpoint reports failures with a
non-2xx status, so the request ignores the status code and parses the
body either way.
The delete flags travel as query parameters rather than a request body,
and Readarr spells the exclusion key addImportListExclusion, not the
addImportExclusion that Radarr uses.
The PUT body round-trips through serde_json::Value rather than the typed
Book, so the fields Readarr returns but Book does not declare survive the
toggle instead of being silently dropped. BOOK_JSON now carries a few of
those undeclared fields so a regression to a typed round-trip fails the
tests rather than passing unnoticed.
Add the GetAuthorHistory event, backed by GET /history/author?authorId=N,
which returns a flat array of history records for a single author. The
fetcher mirrors the artist-history equivalent, sorting by id and carrying
the sort-prompt route guard so a refresh landing while the sort prompt is
open cannot clobber an in-progress sort selection.
Expose it as `readarr list author-history --author-id N`.
Posts the RefreshAuthor command to the command endpoint with no author ID, which is how Readarr distinguishes a library wide refresh from a single author refresh. The response is returned verbatim and no app state is mutated.
Posts the RefreshAuthor command to the command endpoint with the author ID, queueing a metadata refresh and a disk scan for that author. The response is returned verbatim and no app state is mutated.
Adds the refresh subcommand group to the Readarr CLI.
Posts the AuthorSearch command to the command endpoint with the author ID, queueing an indexer search for that author. The response is returned verbatim and no app state is mutated.
Introduces ReadarrCommandBody, the request body shared by the author and book command calls. Both ID fields are omitted from the payload when absent rather than sent as null.
Add ReadarrEvent::ListAuthors, mapping to GET /author, and wire it up as
`managarr readarr list authors`.
This is the first Readarr event that touches the library rather than
configuration, so it creates the library/authors module tree mirroring
Lidarr's library/artists layout.
list_authors mirrors Lidarr's list_artists, including the sort-prompt
route guard: a response landing while the user has the sort prompt open
must not clobber their in-progress sort selection. Both directions of
that guard are covered by tests.
Adds the GetRootFolders event backed by GET /rootfolder, storing the result
on the Readarr root folders table, and surfaces it as
"managarr readarr list root-folders".
Root folders reuse the shared RootFolder model. Readarr omits the
unmappedFolders key that the other servarrs return, and the field is
optional, so it deserializes to None without changing the shared type.
Only the read path is included here. Adding and deleting root folders
mutate the library layout, so they are left for separate work.
The system network tests asserted that queued events, disk space, logs,
version, tasks, and updates were empty against a default state that was
already empty. Those assertions passed even with the fetcher body removed,
so they reported coverage that did not exist.
Seeding a stale value first makes the empty response test prove the fetcher
replaces rather than merges, and makes the failure tests prove the update
closure never runs on a non-success response by pinning the exact seeded
value.
The assertion on the deserialized payload in the empty response test is
left alone: it reads the response body rather than app state, so it was
never vacuous.
The empty-response and failure tests asserted the maps were empty against a
default state that was already empty, so they passed even with the fetcher
body removed. Seeding a stale entry first makes the empty-response tests prove
the fetcher replaces rather than merges, and the failure tests prove the update
closure never runs on a non-success response.
The task name is sent as the shared CommandBody, matching the Radarr, Sonarr, and Lidarr implementations. The response is returned verbatim and no app state is mutated.
Adds ReadarrEvent::GetLogs backed by get_readarr_logs, which formats each
record into the Readarr logs list, and surfaces it as
'readarr list logs --events N'.
The --output-in-log-format branch reads the Readarr log lines, and is
covered by a test that pins that source so it cannot silently drift to
another servarr's data.
Adds ReadarrEvent::GetUpdates backed by get_readarr_updates, rendering the
update history into the Readarr updates view, and surfaces it as
'readarr list updates'.
Covers the case where an update record omits the changes key, which the
live instance returns for its most recent release.
The changes field was required, so a single record without it failed the
whole response and emptied the updates list. A live instance returns five
update records of which one has no changes key, so this is reachable rather
than theoretical.
This affects every servarr, since Update is shared.
Add ReadarrEvent::GetDiskSpace, mapped to GET /diskspace, and
get_readarr_diskspace, which stores the result on ReadarrData for the
root folder and system views.
Surface it as `managarr readarr list disk-space`, matching the other
three servarrs.
Readarr returns a label field on some records that DiskSpace does not
model; serde drops it, so the CLI prints only the path and the free and
total space, as it does for the other three servarrs.
Add ReadarrEvent::GetStatus, mapped to GET /system/status, and
get_readarr_status in the new readarr_network/system module. It stores
the version and start time on ReadarrData so the system view and the
tick refresh can read them.
Surface it as `managarr readarr get system-status`, matching the
Radarr, Sonarr, and Lidarr spelling of the same call. A `list status`
spelling would have made the same command a different verb on the
fourth servarr, which is a difference the user would have to remember
for no benefit.
Readarr instances answer /system/status with thirty keys; SystemStatus
models the two that are used and serde ignores the rest, as it does for
the other three servarrs.
This is the first ReadarrCommand variant, so ReadarrCliHandler now
reads its app and network fields.
Inhabit ReadarrEvent with its first variant, HealthCheck, mapped to
GET /health, and add get_readarr_healthcheck alongside the equivalent
Lidarr, Radarr, and Sonarr fetchers. The call is internal only and has
no CLI surface, matching the other three servarrs; it exists so that an
unreachable instance surfaces an error banner on tick.
The healthcheck fetcher lives in readarr_network/mod.rs rather than a
submodule, so its tests live in readarr_network_tests.rs next to the
resource() and NetworkEvent conversion tests, mirroring Lidarr.
MockServarrApi::build_for matched NetworkEvent by value with no Radarr
fallback arm. It compiled only while ReadarrEvent was uninhabited and
no value could reach it; the first variant makes the match non
exhaustive, so it now assigns the config to the Readarr server tab.
Promote Route::Readarr from a unit stub to a tuple variant and wire Readarr
through every layer, mirroring the Lidarr tree. Readarr appears as a fourth
servarr tab and its library view renders the Authors table.
Adds ReadarrData and its modals, the tick and context clue modules, the
top-level ReadarrHandler, ReadarrUi with the Authors library view, and an
empty ReadarrCommand behind ReadarrCliHandler. The default port is 8787.
Promoting the route variant compiles cleanly without any of the arms that
give it behaviour, so all six of those sites are wired explicitly here:
App::on_tick, handlers::handle_events, handle_prompt_toggle,
ServarrContextClueProvider, ui(), and verify_config_present_for_cli. Each was
checked by removing the arm and confirming its covering assertion then fails.
ReadarrEvent and ReadarrCommand are both declared empty. They gain variants
alongside the network calls and CLI commands that use them, which keeps each
later change to a single function.
Adding the tab changes the rendered tab bar, so 13 existing snapshots
regenerate. The only delta in each is that single tab bar line.
This scaffold adds 24 dead_code warnings, all inside the Readarr tree and
none outside it. They clear as the handlers, UI, network events, and CLI
commands that consume these items land: block arrays awaiting their accepts
implementations and BlockSelectionState seeding, modal and state fields
awaiting their handlers, the CLI handler fields awaiting an inhabited command
enum, and the top-level handler fields awaiting sub-handlers. The count must
strictly decrease from here, so a later increase is a defect rather than
transient noise. The 12 pre-existing collapsible_match warnings are unrelated
and untouched.
SystemStatus was declared three times, byte for byte identically, in
radarr_models, sonarr_models, and lidarr_models. MetadataProfile and the
Lidarr release download body were each declared in a single servarr module
despite having nothing servarr specific about them: MetadataProfile is an
id and name pair structurally identical to QualityProfile, which already
lives in servarr_models, and a download body of a guid plus an indexer id
is the generic form of that request.
Move all three into servarr_models, preserving that file's alphabetical
ordering, and drop the prefix from LidarrReleaseDownloadBody now that it is
no longer owned by one servarr.
RadarrReleaseDownloadBody and SonarrReleaseDownloadBody deliberately stay
where they are. Radarr's carries a movie id and Sonarr's carries optional
series, episode, and season fields, so the three types are not
interchangeable and only the Lidarr shape is the common one.
Behavior is unchanged. Every remaining edit is an import path update or the
rename at a call site.