Commit Graph

1247 Commits

Author SHA1 Message Date
neon e767358443 feat(library): auto-select sole upload destinations
Remove redundant destination choices when only one book library or folder is available.
Preserve existing Dock targets and cover loading, selection, and failure states with unit tests.

Closes #1362
v3.3.0
2026-10-07 04:56:44 +00:00
neon e6ea5bd77e fix(stats): invalidate reading caches after committed changes
Refresh dashboard and statistics caches immediately after reading history,
projection, reset, import, and shared deletion changes. Coalesce bulk
notifications while keeping committed changes visible to concurrent reads,
and isolate listener failures from successful writes.

Skip unchanged Hardcover attempt updates and protect cache generations
against stale in-flight loads. Cover date edits, projection-only resumes,
rollback, bulk failures, user scope, and cache races with regression tests.

Ref #1695
2026-10-07 01:28:10 +00:00
neon 58756565fc fix(kobo): preserve koreader matching for converted downloads
Register the identity of delivered bytes so Kobo conversions and audio
removal continue matching their source books in KOReader. Keep download
registration recoverable without allowing database lock waits to stall it.

Preserve manual corrections across cached device identities, make review
semantics explicit, and keep cache invalidation bounded for large libraries.
Add unit, database, lifecycle and scale regressions with one generated migration.

Closes #1697
2026-10-07 00:07:50 +00:00
neon 019c432262 fix(opds): expose public collections to other users
Align collection visibility across OPDS and KOReader with the web catalog.
Count only books the viewer can access in one aggregate query, and cover
public access, private revocation, and filtered counts with regression tests.

Closes #1701
2026-10-06 22:16:21 +00:00
neon 1abf2f58ca fix(kobo): sync native kepub progress and canonical positions
Allow native KEPUB files to exchange precise reading progress, bookmarks
and highlights with Kobo while preserving sync permissions and settings.

Use the original KEPUB archive for Kobo spans and project its added
wrappers away for shared EPUB CFI and KOReader XPointer positions.
Preserve existing EPUB conversion behavior and API compatibility with
released iOS clients.

Cover native KEPUB context, canonical positions and two-way exchange with
unit tests and paired EPUB/KEPUB API E2E scenarios.

Ref bookorbit/bookorbit-ios-support#36
2026-10-06 20:55:45 +00:00
neon 2dddf9b89f fix(books): retain records when content deletion fails
Remove content before committing book deletion so surviving files cannot be reimported
under new records. Preserve records and covers on failure, bound cleanup concurrency,
and allow retries after partial removal. Defer watcher events through the database
commit and cover delayed operations, failure recovery, and retry behavior in tests.

Ref bookorbit/bookorbit-ios-support#42
2026-10-06 20:54:22 +00:00
neon 4ca7128b76 fix(library): refuse renames into a folder another book holds
In folder-as-book libraries a pattern that files several books under one folder either failed on
the folder_path unique index or silently merged a different book into the folder's owner, deleting
its reading history. Check the folder owner on every rename path and merge only when both books
share a title and primary author; otherwise skip with a clear reason. The bulk preview now reports
these as collisions.

Fixes #1682
2026-10-06 20:54:22 +00:00
neon a24dc2e2cc feat(annotations): add a library-wide notebook for every book
Add read-only /notebook routes that list highlights, journal entries, bookmarks and reviews
across every book a reader can open, as one cursor-paged stream with per-kind counts, a By Book
listing, a daily review deck, a seeded review shuffle, On this day and a library-wide trash. Each
kind is read through its own index-ordered arm cut at the page size before a UNION ALL merge, so a
deep page costs what the first does, and book labels travel once per page in a sidecar map.

Scope follows library access and content filters. Everything is additive and advertised as the
notebook-hub app-info feature. The iOS app calls these routes and the web client does not yet, so
they look unused from the client alone. No migration: the extra indexes for the edited sort and
search wait until the chapter-editor migrations land.
2026-10-06 20:54:22 +00:00
neon ff880a470c feat(annotations): add book journal, starred highlights and colour names
Add per-book journal entries keyed by a client id, a star toggle that does not bump the annotation
version pushed to devices, a per-user colour legend, and an edit route so bookmark title and note
changes reach the server. All of it is additive and advertised through app-info features, so iOS
sends new fields only to servers that support them. Also sort annotations by numeric CFI steps
instead of comparing CFI strings.
2026-10-06 20:54:22 +00:00
neon 74d4a669df feat(reading-session): return session type in the per-book session list
Include whether each session was spent reading, listening to text to speech or listening to audio,
so clients can tell Read Along listening on an EPUB apart from reading it. The column was already
stored; only the per-book list left it out. Unknown stored values read as reading.

The field is optional and additive: released iOS builds ignore it, and the iOS reading timeline
treats it as optional and falls back to the file format on servers without it. The web client does
not read it yet.
2026-10-06 20:54:22 +00:00
neon 1adab58d4b i18n(client): sync translations from Crowdin (#1677)
Keep sparse translated catalogs synchronized with reviewed Crowdin content.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-06 11:23:11 -06:00
neon e253f7ffca fix(reader): preserve exact positions when syncing with koreader (#1694)
Convert complete source CFIs on the server to avoid chapter-start resets
and browser-generated locators that disagree with CREngine. Preserve
engine whitespace, Unicode offsets, element anchors and long text nodes.
Handle prefixed OPF namespaces and retry outdated annotation conversions.

Closes #1621
Closes #1288
2026-10-06 11:22:55 -06:00
neon 8fecae94e6 security(deps): upgrade busboy to fix multipart denial of service
Override Busboy to use a patched version and refresh the lockfile to resolve CVE-2026-19481 and CVE-2026-19484 in production images.
2026-10-03 17:19:41 +00:00
neon df926fdf0f fix(library): include saved settings in scoped library summaries
Return saved organization and automation settings in the user-scoped library list so
non-superuser summaries reflect the saved configuration.

Cover enabled and disabled settings, library isolation, and permission denials with
API regression tests.

Closes #1664
2026-10-03 16:45:15 +00:00
neon 60fcbd9410 i18n(client): sync translations from Crowdin (#1632)
Keep sparse translated catalogs synchronized with reviewed Crowdin content.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-03 10:04:18 -06:00
neon cb8d1e3b2b fix(settings): add optional dashboard shelf sync
Keep dashboard layouts browser-local by default and let users opt in to account storage.
Group library selection and shelf sync in one dropdown, preserve legacy client settings,
and block sync changes for demo-restricted accounts.

Fixes #1646
2026-10-02 04:11:47 +00:00
neon 0e16931df3 ci: align repo automation with the new label set
Apply needs-triage to new bug and feature issues from the templates.
Drop the retired npm label from the Dependabot npm updates.
Give Docker, Dockerfile, and compose paths their own docker label
instead of folding them into ci.
2026-10-02 00:55:22 +00:00
neon f8c8ecf99a fix(books): honour the metadata score sort when series are collapsed
The collapsed order by had no metadataScore case, so the sort was dropped
and the list fell back to title order. Order by metadata_score there and
select it in the collapsed jump-bucket query that shares the order by.

Fixes #1638
2026-10-02 00:10:28 +00:00
neon 068a62b7ab fix(reader): fall back to the declared narration length for read-along EPUBs
Use the package media:duration when a SMIL clip cannot be measured.
Storyteller 2.x writes a backwards clip at audio track boundaries, which
nulled the total and blocked the audiobook bridge. Stored nulls are
re-measured via a migration, the detail page and an unchanged-folder scan.

Fixes #1619
2026-10-01 18:09:27 +00:00
neon 4701412ef2 feat(settings): redesign file naming as a two-column workbench
The three-column layout left the editor 270px wide at 1280 and broke resolved paths mid-word.
Draw the pattern one folder per line, preview it against long-name books, and list only what
missing metadata changes. Add resolvePlaceholders to the shared resolver to report fallbacks.
2026-09-30 22:12:02 -06:00
neon 2855dbb8a3 i18n(client): sync translations from Crowdin (#1611)
Keep sparse translated catalogs synchronized with reviewed Crowdin content.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-30 22:11:38 -06:00
neon 324059ef16 security(deps): patch container dependency vulnerabilities
Raise transitive dependency floors so image builds no longer ship versions rejected by the HIGH and CRITICAL Trivy gate.
2026-09-30 22:23:42 +00:00
neon 05a55d6b62 build(deps): upgrade non-TypeScript dependencies
Keep TypeScript at 6.0.3 while moving the remaining server and client packages onto their current supported releases.

Allow the PWA asset generator 2 peer range because vite-plugin-pwa still declares the compatible version 1 range.
2026-09-30 21:37:55 +00:00
neon ef2bcced3b fix(client): constrain request title column width
Keep long request titles from widening the auto-layout table and hiding row actions. Guard the intrinsic-sizing chain with focused component regression tests.

Fixes #1613
2026-09-30 20:04:59 +00:00
neon 85927fb118 fix(reader): keep oversized comic pages within scroll bounds
Use safe flex alignment so pages stay centered when they fit and fall back to the scroll origin when they overflow.

Closes #1610
2026-09-30 19:35:10 +00:00
neon 951f3b702d fix(reader): persist audiobook progress on insecure origins
Generate RFC 4122 UUIDs with getRandomValues when randomUUID is unavailable so plain HTTP deployments can save playback state and bookmarks.

Fixes #1608
2026-09-30 19:31:05 +00:00
SergeiAK d1b3fae7f7 fix(authors): keep non-latin letters when matching enrichment candidates (#1615)
* fix(authors): keep non-latin letters when matching enrichment candidates

Keep letters and digits of any script in normalizeName() instead of
dropping everything outside [a-z0-9], and stop treating two empty token
lists as a token-set match. Names without ASCII letters normalized to an
empty string, so any two of them scored 0.96 and passed the confidence
gate, and enrichment linked authors to unrelated people.

Closes #1459

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(authors): keep combining marks when normalizing author names

Keep \p{M} in normalizeName() alongside letters and digits. Vowel signs
in scripts such as Devanagari are combining marks, not letters, so
dropping them merged distinct names: कमल and कमला both normalized to
कमल and matched with score 1. Latin diacritics are still folded by the
earlier U+0300-U+036F strip, so Latin and Cyrillic matching is unchanged.

Refs #1459

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: neon <18559658+neonsolstice@users.noreply.github.com>
v3.2.0
2026-09-30 12:15:21 -06:00
neon de0954e77f feat(settings): polish the libraries page and add in-place controls
Cut long paths from the start, name layouts and schedules the way the editor
does, and switch to cards when the ledger would scroll sideways. Rows now
toggle automation in place with undo, open recent scan history, show live
scan counts, flag failed or never-scanned libraries, and can seed a new
library from another's settings.
2026-09-30 06:53:37 +00:00
neon 09e4f1b5bd chore(deps): update minor and patch dependencies
Bump every direct dependency to its newest same-major release, moving the
embedpdf patches and packageExtensions to 2.15.1 and deduping the lockfile.
Hold jsdom at 30.0 because 30.1 breaks vitest's URL.createObjectURL shim,
and skip releases still inside pnpm's minimum release age.
2026-09-30 00:57:24 +00:00
neon c0759ea1bf i18n(client): sync translations from Crowdin (#1574)
Keep sparse translated catalogs synchronized with reviewed Crowdin content.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-29 18:22:14 -06:00
neon 369393e4ad docs: document unsupported network storage 2026-09-29 22:15:03 +00:00
neon 6f673e2e59 feat(metadata): merge search and compare into one match sheet
Search and Compare Metadata become one two-pane sheet, shared with the Book Dock. Results are
ranked by match strength beside a field-by-field comparison with Keep/Use per row, word-level
diffs, other sources inline, a cover strip, and picks that survive switching results.
The search runs on open and a single source can be retried. No API change.
2026-09-29 04:53:34 +00:00
neon 1dd389563c style(client): unify modal backdrops with dedicated scrim tokens
Replace tinted modal veils with dedicated scrim tokens so dialogs, sheets, and image lightboxes dim consistently in both light and dark themes. Enforce scrim token usage in style validation to prevent backdrops that wash out in dark mode.
2026-09-29 03:42:01 +00:00
neon e92cc36146 feat(library): rebuild the library editor as a settings sheet
Replace the seven-step wizard with a sheet whose section rail summarizes each
setting. Format priority shows only the formats a library holds, folders are
checked as they are added, and people can be granted access while creating.
2026-09-29 02:11:31 +00:00
neon d66f853cad feat(settings): add read-aloud filename token
Expose media-overlay-aware naming across file creation and delivery paths while preserving existing client contracts. Keep settings router mocks compatible with the application router exports.

Closes #1590
2026-09-29 01:29:25 +00:00
neon acce1e15ac fix(server): survive database connection loss
Handle both idle pool errors and checked-out client errors so a database restart fails only the affected operation. Keep connection-loss logging sanitized and deduplicated while allowing the pool to reconnect.

Fixes #1581
2026-09-29 00:37:44 +00:00
neon 7e3bb1892e fix(annotations): clear KOReader state on device removal
Remove device-scoped annotation delivery state with the rest of its KOReader data so stale acknowledgements cannot block permanent deletion.

Fixes #1576
2026-09-29 00:24:27 +00:00
neon a572badecb fix(client): persist visible Book Dock destination on done
Save the library and folder shown in the metadata sheet before closing it. Avoid duplicate target updates after explicit selection and keep the sheet open when persistence fails.

Fixes #1573
2026-09-29 00:14:15 +00:00
neon 0085ffd11e fix(series): show mixed-media books in every group
Classify series entries from every available format so combined editions appear in each relevant section.

Fixes #1566
2026-09-29 00:00:13 +00:00
neon 826584e5da feat(annotations): add bounded dashboard highlights route
Return a user-scoped highlights shelf while preserving the existing single-highlight endpoint. Align calendar dashboard figures with each reader's timezone and completed attempts.
2026-09-28 23:50:27 +00:00
neon a35e222cb2 feat(types): expose the book file id on audiobook manifest assets
Clients that download an audiobook get its files from the book detail and its playback order from
the manifest, and had to pair the two by position. The two lists are ordered differently, so an
index pairing can attach the wrong file to an asset. Add the book_files id to each manifest asset
so the pairing can be made by id.

The field is additive and the server always sends it. The manifest revision is hashed from file
and chapter data, not from the response, so existing revisions do not change and clients holding
one do not see a 412 from this deploy.

The iOS app consumes this field to pair downloaded files with manifest assets; the web client
does not read it yet, so a grep of the client alone will show it as unused.
2026-09-28 22:38:47 +00:00
neon 236c1785d0 fix(books): stop synthesizing audiobook chapters from unknown durations
A multi-track audiobook without stored chapters gets one synthesized chapter per track, placed at
the running total of track durations. An unknown duration counted as zero, so every later
chapter started at the wrong offset, often all at 0, and the manifest then mapped them all onto
the last asset. The synthesis also walked the tracks in file name order while the manifest plays
them by sort order first, so chapter titles could disagree with the track they pointed at.

Skip the synthesis when any track duration is unknown, as already happens for a single track;
clients fall back to one entry per track. Order the synthesized chapters with the same comparator
the manifest uses, now shared from book-media utils. The detail files list keeps its existing
order. Affected books get a new manifest revision because the revision hashes the chapters.
2026-09-28 22:34:14 +00:00
neon 1be423fb54 test(stats): read continue-listening books from the scroller envelope
The scroller route returns a DashboardScrollerResponse of books and total, but this spec still
parsed the body as a bare array, so it failed before reaching its assertions.
2026-09-28 22:29:44 +00:00
neon 35d5a8c2d6 fix(reader): accept audiobook positions in the last second of a track
The extractor stores durations as whole seconds, so a manifest asset can report a duration up
to half a second shorter than the audio. The playback-state PUT and the audiobook bookmark
create refused any position past that rounded value with a 400, which rejected the tail of every
such track and left clients retrying a write that could never land.

Allow one second of slack at both checks and clamp the stored position to the duration. This
only relaxes validation: every position accepted before is still accepted and stored unchanged.
2026-09-28 22:27:45 +00:00
neon fd480b7f2b db(annotations): let a deleted audio bookmark position be bookmarked again
Audio bookmark deletes are soft, but the unique index on (user, book, position_seconds) still
covered tombstones, so the insert conflicted and the audiobook bookmark route answered 409 for
any position that had ever been bookmarked and deleted. Limit the index to live rows. The CFI
index is left as it is because KOReader bookmark revival relies on tombstones keeping their CFI.

The new predicate only narrows the index, so existing rows cannot violate it.
2026-09-28 22:26:10 +00:00
neon c76d9c01f9 fix(reader): stop web audiobook progress retrying rejected writes
Every non-OK playback-state response marked the write dirty and retried it every five seconds,
so a stale manifest (412) or a position past the rounded track duration (400) looped for the rest
of the session. Each attempt also minted a new operationId, which defeated the server's replay
protection, and capturedAt was stamped at flush time rather than when the position was taken.

Capture the timestamp and one operationId with each position and reuse them across retries.
Retry only network failures, 5xx and 429, and drop other rejected writes. On 409, reload the
server state and keep the local write only if it is newer. On 412, hold the write and have the
player reload the manifest, resending once the revision changes. Clamp positions to the track
duration from the manifest.
2026-09-28 22:23:06 +00:00
neon d8f68a0d38 fix(stats): record web audiobook sessions as listening
The web audiobook player shared the reading session composable, which never sent a
sessionType, so the server stored every listening session as a read session and counted
audiobook time as reading in activity stats. Let callers pass an optional sessionType and
have the audiobook view send listen. Other readers keep omitting the field, so their
payloads are unchanged. Existing rows are not backfilled.
2026-09-28 22:16:52 +00:00
neon 55110d5b44 feat(settings): add per-user Requests visibility toggle
Let users hide request entry points and notifications while existing requests continue running. Keep the setting optional so older clients retain their current behavior.

Ref #1476
2026-09-26 18:46:10 +00:00
neon 8dfb093301 feat(library): support fractional finished thresholds
Allow 0.05% adjustments while preserving existing integer settings and the 98% default. Keep finish detection stable when progress is stored as PostgreSQL real.
2026-09-26 18:22:02 +00:00
neon 244924a3aa fix(library): display reading start threshold accurately
Render the configured threshold in percentage points so library details agree with the editor for fractional values.

Fixes #1563
2026-09-26 18:04:25 +00:00