* fix(security): upgrade direct ZIP readers to 9.0.5
Upgrade the app, native narration reader and Windows thumbnail provider;
adapt fallible filenames and optional data offsets. Update both app
lockfiles and the thumbnail lock while preserving unrelated pins.
Verified: 201 app Rust tests, 24 native TTS tests, 6 thumbnail tests under
Wine (1 existing ignored), strict app clippy, formatting and locked CEF
Linux dependency graph. Thumbnail strict clippy reproduces 3 existing
lints on the original source; it passes with those CLI lint allowances.
CEF compilation and native Windows device testing were not run.
This is a dependency/API migration covered by existing archive tests;
no new application behavior is intended. The Windows updater retains
ZIP 4 because its patched release requires an incompatible Tauri family.
Co-Authored-By: Claude Code <noreply@anthropic.com>
* fix(security): update vulnerable JavaScript dependencies
Raise patched dependency floors, scope the modern minimatch upgrade to
v10 consumers, and patch deepmerge prototype writes in both merge loops.
Upgrade the SVG renderer and keep its font shaper external so Node can
load its WASM asset when generating PNGs.
Regression tests fail before the fixes: deepmerge inherits attacker
properties; minimatch expands 256 patterns instead of 64 and performs
500500 comparisons instead of zero. The unpatched image upgrade fails
with a dynamic require of fs / missing hb.wasm. All 31 new tests pass
with the fixes, including actual translation and PDF vendor consumers.
Verified: full unit suite 14714 passed/16 skipped; final focused tests
31 passed; lint, formatting, frozen install, web build and Tauri frontend
build passed. Final web build was repeated after the renderer patch.
Nix hashes still need CI regeneration; CEF compilation was not run.
Version-based audits still flag patched deepmerge and legacy minimatch
3/5, which lack this advisory's vulnerable optimizer.
Co-Authored-By: Claude Code <noreply@anthropic.com>
* build(nix): request fresh security dependency hashes
Invalidate the pnpm and Cargo fixed-output hashes so the PR dependency
check computes the updated stores instead of substituting old cached
stores. Replace both values with the CI-reported hashes before merge.
Verified the diff changes only the two affected hash fields; local Nix
is unavailable. CI verification is pending on this commit.
Co-Authored-By: Claude Code <noreply@anthropic.com>
* build(nix): pin regenerated security dependency hashes
Use the pnpm and Cargo hashes calculated by the PR dependency check
(run 41428540045). Both fetchers completed and reported their actual
fixed-output hashes. Replace the temporary empty values.
Verified against the CI log's pnpm-deps and vendor-staging got values;
git diff --check passes. The final hash-check rerun is pending.
Co-Authored-By: Claude Code <noreply@anthropic.com>
---------
Co-authored-by: Claude Code <noreply@anthropic.com>
* fix(tts): play local AAC narration natively on Linux
Decode AAC-LC/ALAC MP4 narration with Symphonia 0.6.1 and send PCM to
CPAL, with SoundTouch preserving pitch when playback speed changes.
Read stored EPUB entries as byte windows and DEFLATE entries through a
bounded in-memory checkpoint index, without extracting audio to cache.
Reuse the native narration clock and controls; retain browser playback
for remote audio and local MP3/Ogg/Opus/WebM sources.
Cover source integrity, exact seeks and MP4 edit timing, bounded output,
audible playback position, ordered controls and cancellation of pending
loads. Run the native plugin and lifecycle regressions in PR CI.
Regression evidence: without the Linux source-descriptor change,
"hands Linux the raw compressed ZIP entry without reading its audio
bytes" fails because getMediaSource returns null instead of the path
and raw ZIP entry. Transport and device-stream lifecycle regressions
were also verified to fail before their corresponding fixes.
Verified on current origin/main: full Vitest suite (14687 passed,
16 skipped), lint, format check, web build, Rust formatting and CEF
Clippy with warnings denied. CEF unit tests: 201 app + 24 plugin tests
passed; 3 transport/device-stream lifecycle regressions passed.
Nix cargoDeps realization and actionlint passed. Full Nix app build
and mobile device tests not run.
Linux CEF runtime with Symphonia 0.6.1: captured audible AAC, verified
forward/backward seeks, rate, pause/frozen clock, abort, and compressed
EPUB playback through all three paragraph highlights to completion.
No reporter EPUB was supplied; used generated narration fixtures.
One earlier app run exited SIGBUS during a shared-target rebuild;
cause unconfirmed, fresh launch after checks passed the sequence.
Reported by DeathStroke19891 on GitHub. Fixes#7084.
Co-Authored-By: Claude Code <noreply@anthropic.com>
* fix(tts): enqueue Linux controls before async dispatch
Tauri schedules async command invocations independently, so pause/resume
could reach the Linux worker in reverse order even when blocking reply
waiters were kept separate. Dispatch Linux playout_control directly from
the synchronous plugin handler, then resolve its worker reply off-thread.
Retain the same IPC payload, ACL parsing, asset scope and non-Linux paths.
This also allows abort to cancel a pending load without waiting for its
reply, which a frontend promise chain would delay.
Regression evidence: reverse the first polls of the old command futures
and the ordering assertion fails with ["resume", "pause"] instead of
["pause", "resume"]. The updated production-handler regression asserts
pause/resume/load/abort enqueue before any response future is polled,
then runs response tasks and blocking waiters in reverse order.
Verified Rust formatting, CEF Clippy with warnings denied, 201 app and
24 plugin unit tests, 3 lifecycle regressions, and a rebuilt CEF app.
Runtime: 40 rapid pause/resume cycles preserved final state, pause froze
the clock, and abort canceled a 226 MB compressed recording load in
about 19 ms. Invalid payload and out-of-scope path rejections passed.
Independent review verified ACL handling and non-Linux routing.
Frontend checks are rerun by the repository's pre-push hook.
Co-Authored-By: Claude Code <noreply@anthropic.com>
* refactor(tts): hide narration platforms (owner: remove the linux flag)
Move native source selection and backend capabilities into
NativeNarrationPlayer. MediaOverlayClient retains one native flag and
uses streaming, queueing, and cancellation capabilities without OS checks.
Preserve local ZIP playback, browser fallbacks, and mobile staging.
Validation: 93 focused tests passed; full Vitest suite passed 1,220 files
and 14,691 tests (4 files and 16 tests skipped). TypeScript, Biome lint,
format checking, and git diff --check passed. Lint reports one existing
informational diagnostic in nativePageTurn.ts. New loadSource tests fail
before delegation exists and pass afterward. In an isolated Linux CEF
app, compressed AAC playback advanced through all three paragraph
highlights using the native clock. Mobile device checks were not run.
Co-Authored-By: Claude Code <noreply@anthropic.com>
* fix(tts): finish canceled narration loads without errors
A native load can be canceled independently of the speak signal. Suppress
load failures when either signal was aborted, retaining the original
playback signal across invalidation so Rust cancellation errors are also
recognized. Other load failures still yield playback errors.
Validation: eight regression cases fail without this guard, yielding an
error instead of completing the generator. All 95 focused native/client/
player tests pass with the fix, including genuine load failures. TypeScript,
Biome lint and formatting, and git diff --check pass. In isolated Linux CEF,
stopping a large compressed recording during loading closes the player,
leaves native playback stopped, and logs no playback error. Mobile device
checks were not run. The pre-push hook runs the full frontend suite.
Co-Authored-By: Claude Code <noreply@anthropic.com>
---------
Co-authored-by: Claude Code <noreply@anthropic.com>
* fix(deps): resolve open Dependabot alerts
Raise the workspace overrides for shell-quote, proxy-addr and
source-map-js to their patched releases, and pull postcss-selector-parser
6.x (pinned by @tailwindcss/typography) up to 7.1.6. The compiled prose
styles are unchanged.
Move katex to 0.18 (with marked-katex-extension 5.1.13 and an override for
the packages still asking for 0.16) and i18next-http-backend to 4.0.2.
v4 only drops the cross-fetch fallback; the backend loads in the browser,
which has fetch.
Update rustls to 0.23.46 in Cargo.lock, Cargo.cef.lock and the koplugin
LocalSend helper.
Blank the Nix pnpmDeps and cargo hashes so the fod-hashes check prints
the new values.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(nix): refresh pnpm and cargo dependency hashes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(linux): stop the CEF focus loop that froze two-window sessions, closes#6689
Bump readest/tauri feat/cef to d6ef6e4c (readest/tauri#5): the runtime
now moves the X focus into a window's browser only while that window's
toplevel still holds it, so a late winit Focused event no longer bounces
the focus between two browsers forever.
Also records the windows dependency from #6546 in Cargo.cef.lock, which
was missing and made --locked resolution fail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(nix): refresh cargoHash for the readest/tauri bump
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(reader): animate page turns for PDF and comics on Windows and Linux, closes#6380
Fixed-layout books (PDF, CBZ/CBR, fixed-layout EPUB) only animate through
the captured page turn, which needs a native snapshot of the webview. That
snapshot existed on macOS, iOS and Android only, so Windows and the Linux
CEF runtime rejected it and every turn on those books was instant.
Both engines are Chromium, so both now take the snapshot with the DevTools
protocol's Page.captureScreenshot, clipped to the reader cell: WebView2's
CallDevToolsProtocolMethod on Windows, the CEF browser's DevTools message
observer on Linux. The clip returns exactly the region at device
resolution, and captureBeyondViewport stays off so the live page never
reflows. JPEG, as on Android: about 35 ms per full cell against 86 ms for
PNG.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* build(nix): bump cargoHash for the native-bridge dependency edges
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(reader): release the CEF screenshot observer when no result arrives
The observer and its registration hold each other, so a capture that
never gets a result (the DevTools agent detached, or the wait timed out)
kept both alive. Take the registration on agent detach, and on timeout
from the caller on the UI thread.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(desktop): reopen the library when Readest is relaunched with only reader windows open, closes#6394
Relaunching Readest (e.g. from the desktop shortcut) after closing the
library window left only the reader windows and never brought the library
back:
- The single-instance callback only focuses the `main` window, which does
nothing once it is gone. The first reader window now recreates it on a
plain relaunch; launches carrying a file or link still go to the
open-with handlers.
- On the Linux CEF build the relaunch never reached the single-instance
plugin at all. Chromium's process singleton claims it first, the running
browser process drops the command line, and the new process panics in
CEF initialization, so a relaunch neither raised the library nor opened
the files it was given. The launch is now handed to the running instance
over the plugin's D-Bus interface before CEF starts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(nix): update cargoHash for the zbus entry in Cargo.cef.lock
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(nix): add the desktop Now Playing crates to Cargo.cef.lock
#6457 added souvlaki and its dependencies to Cargo.lock only. The Linux
CEF build (Nix, Flatpak, release) swaps in Cargo.cef.lock, which did not
have them, so the Nix build on main failed with "no matching package
named `souvlaki` found". Regenerated with the minimal cargo metadata
resolve under .cargo/cef.toml; no existing crate versions change.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(nix): bump cargoHash for the new Cargo.cef.lock
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(build): repair the Docker and Nix builds after #6368
Two main-branch builds broke on 8750c310 and both are fallout from that PR.
**Docker** (`pnpm build-web`: "Can't resolve '@pdfjs/pdf.min.mjs'",
"Can't resolve '@simplecc/simplecc_wasm'"). `setup-vendors` runs in the
`dependencies` stage and its output is not in the build context, so every
directory it creates needs an explicit `COPY --from=dependencies`. Splitting
the bundler-imported modules out of `public/vendor` into `vendor/` left the
new directory with no COPY line. The test derives the expected roots from the
`prepare-vendor` script, so adding another one fails until the Dockerfile
copies it.
**Nix** ("no matching package named `sentry-debug-images` found"). The Linux
CEF build vendors from `Cargo.cef.lock`, which `nix/package.nix` copies over
`Cargo.lock`, and that second lock never learned about the two crates the
sentry `debug-images` feature pulls in. Added `findshlibs` and
`sentry-debug-images` there, plus the dependency entry on `sentry`; both need
only packages the lock already had.
This is also why `nix-deps-check` stayed green on #6368: it hashes
`Cargo.cef.lock`, which that PR did not touch, so the stale vendor set only
surfaced when the full Nix build ran on main.
`cargoHash` is updated in a follow-up commit from the hash the deps-check
prints, since the vendor contents change.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* style: format the vendor-root docker test
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix(nix): update cargoHash for the new sentry debug-images crates
The vendor set gained findshlibs and sentry-debug-images, so the pinned
hash moved. Value taken from the nix-deps-check run on this PR:
specified: sha256-EPNbiv0YJ79rqBHFCO5gjQwt9Vn1v9HV0ZfH7f2Eo/E=
got: sha256-8MIkn2N65P87tG0RncOQtH01SYfRUM4qB6rOzd+fwwQ=
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* refactor: one vendor dir, with the bundler importing from packages
#6368 split the vendored modules into a second `vendor/` directory to stop
them shipping twice (Tauri embeds every published file, and `public/` is
published whole). Two vendor directories is the wrong shape, and the copies
were never needed: the aliases can resolve straight at the sources, which is
how `jieba-wasm` has always been imported.
@pdfjs/* -> packages/foliate-js/node_modules/pdfjs-dist/legacy/build/*
@simplecc/* -> packages/simplecc-wasm/dist/web/*
`public/vendor/pdfjs` now holds only what the reader fetches by URL at
runtime — the worker, the WASM decoders, cmaps, standard fonts and the layer
CSS — and `vendor/` is gone, along with `copy-pdfjs-lib`, `copy-simplecc`,
`setup-simplecc`, its Dockerfile COPY and its worktree copy.
Two details this turned up:
- The @pdfjs alias needs an explicit `declare module`. TypeScript inferred
types for the minified JS while it sat inside the app, but skips JavaScript
under node_modules, and pdfjs-dist ships `pdf.d.mts`, not the
`pdf.min.d.mts` that would sit beside the minified build. Only the import's
side effect is used, so the declaration is bare.
- `packages/simplecc-wasm` is a submodule the worktree script skips, so the
script now copies its committed `dist/web` into a new worktree instead of a
vendor directory.
A true `import ... from 'simplecc-wasm'`, matching jieba exactly, would need a
change in that submodule: its `exports` map points at `pkg/`, which is build
output and not committed (only `dist/web` is), and the map forbids other
subpaths.
Verified with a real build: modules resolve with no `vendor/` present,
`out/vendor` holds only pdfjs, `pdf.min.mjs` is bundled into a chunk and not
published, and both jieba and simplecc WASM are emitted once each.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* docs: say why the @pdfjs alias points at the package, not public/
The comments still described a vendored copy. Record the constraint
instead: a module the bundler imports must not also be published, or
Tauri embeds it twice.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* test: drop the vendor/docker config assertions
These assert on config files rather than behaviour: the alias-target test,
the Dockerfile vendor-COPY test, and the pdfjs wasm copy-script test.
The SELF_HOSTED default check in docker-image-defaults.test.ts stays; it
predates this work (#6100) and guards runtime behaviour of the published
image rather than a config shape.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix(nix): add imagesize to the CEF lockfile
#6273 added the imagesize crate to Cargo.lock but not to Cargo.cef.lock,
which the Nix package builds the Linux CEF app from. Its offline vendor
had no imagesize, so the build on main failed with "no matching package
named `imagesize` found". The Readest entry also gains http-body-util,
hyper and hyper-util, which cargo already resolved from the vendor.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix(nix): refresh the Cargo vendor hash for imagesize
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix(ci): use CEF bundler with deployment array quoting fix
* fix(nix): include psl in the CEF dependency lockfile
* fix(nix): refresh CEF Cargo vendor hash for psl
* chore: bump tauri to version 2.11.5
* chore: update agent memories
* chore(nix): bump cargoHash for the tauri 2.11.5 lockfile
The fod-hashes check failed on the stale cargo vendor hash after
Cargo.lock was regenerated for the tauri fork bump. Take the hash from
the check's `got:` line. Also pass `--keep-going` to that nix build so a
single run reports every stale fixed-output hash instead of stopping at
the first one.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* fix(epub): decode UTF-16 BOM bodies with as_chunks
CI's stable clippy rejects `chunks_exact(2)` with a constant chunk size
(`clippy::chunks_exact_to_as_chunks`) now that the crate's MSRV is 1.90
and `slice::as_chunks` is available. Same behaviour: the trailing odd
byte of a malformed UTF-16 stream lands in the ignored remainder, which
the new test pins down.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* chore(nix): bump pnpmDeps hash for the tauri plugin package bumps
pnpm-lock.yaml changed with the @tauri-apps/plugin-* JS package bumps,
so the pnpm dependency fixed-output hash went stale. Value taken from
the fod-hashes check's `got:` line.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
readest/tauri feat/cef is rebased onto upstream feat/cef (4368b87b9),
keeping only our DevTools-close fix on top. Upstream now passes
--no-first-run itself (tauri-apps/tauri#15980), so the app no longer
adds it through CefRuntimeAttributes; it also brings the media
permission fixes, script injection on the main frame only and the
AppImage bundling fix. Cargo.cef.lock follows the new revision.
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* feat(linux): build and ship Readest on the tauri CEF runtime
Linux now builds against upstream tauri `feat/cef` (git) and the plugins on
plugins-workspace `feat/cef`, while macOS/Windows/mobile keep the readest
fork untouched:
- `pnpm tauri:cef dev|build` (scripts/tauri-cef.mjs) runs @tauri-apps/cli-cef
with `--features cef`, cargo `--no-default-features` and the Linux-only
`[patch.crates-io]` in src-tauri/.cargo/cef.toml, swapping the committed
Cargo.cef.lock in for the run so Cargo.lock stays in the fork state.
- The fork crates are no longer workspace members (a member clashes on
`links` with the git copy); the tauri-plugins fork carried no changes and
is removed, tauri-plugin-fs comes from crates.io at 2.5.1.
- App: `cef = ["tauri/cef"]` (the fork gets a no-op stub), explicit runtime
type, `cef_entry_point`, `--no-first-run` for CEF, commands generic over
the runtime, xdg-portal dialogs on Linux (rfd's GTK thread crashes CEF),
rangefile reads and pointer-driven move/resize on the Linux CEF runtime,
Chromium reported in the About dialog, deb/rpm depend on libwebkit2gtk
while plugins still pull the wry runtime.
- Build-generated permission files are untracked; turso registers `batch`.
- CI Linux legs use `pnpm tauri:cef`.
Submodules: packages/tauri -> feat/cef-feature-stub, tauri-plugin-turso ->
fix/register-batch-command (both need pushing).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* feat(linux): let the CEF wrapper run an unpacked tauri CLI for offline builds
Flatpak builds have no network, so `TAURI_CEF_CLI` points scripts/tauri-cef.mjs
at an unpacked copy of @tauri-apps/cli-cef instead of `pnpm dlx`.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* chore(linux): take the CEF stack from the readest forks
- src-tauri/.cargo/cef.toml: tauri and the plugins now come from the readest
forks' feat/cef branches (upstream feat/cef plus the DevTools-close fix in
tauri-runtime-cef); Cargo.cef.lock re-resolved against them.
- tauri-plugin-turso: point at main, which merged the batch command fix.
- CI: STRACE_MODE=0 for the Linux legs so the CEF AppImage bundler
(quick-sharun) does not launch the app under Xvfb and hang (#4906).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* feat(linux): make the CEF runtime the default tauri build on Linux
`pnpm tauri` now goes through scripts/tauri.mjs (the former tauri-cef.mjs):
on Linux its dev, build and bundle commands run the feat/cef tauri CLI
with the CEF feature, cargo config and Cargo.cef.lock swap, and every
other platform or command passes straight through to @tauri-apps/cli.
The separate `tauri:cef` script goes away, so the release and nightly
workflows, the local Linux build script and the docs use plain
`pnpm tauri build` again.
The tauri webdriver harness (scripts/test-tauri.sh) still calls the
`tauri` binary directly and keeps the wry runtime on Linux, since
tauri-driver needs WebKitWebDriver.
Cargo.cef.lock picks up the quick-xml 0.41 bump from main.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* chore(nix): refresh cargoHash for the reshaped Cargo.lock
Dropping the packages/tauri-plugins submodule and the tauri-plugin-fs
path patch changed the vendored cargo dependency set, so the Nix
fixed-output hash moves to the value the nix-deps-check job reported.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* fix(linux): harden the CEF wrapper and pointer window drag
Review follow-ups on the CEF runtime work:
- scripts/tauri.mjs parks the wry Cargo.lock in Cargo.lock.wry, created
exclusively, so two CEF commands in one checkout cannot swap lockfiles
over each other, and a killed run leaves an obvious file to move back.
- The CEF runtime alias, entry point and runtime attributes are gated on
Linux as well as the `cef` feature; elsewhere the feature is a no-op.
- Pointer-driven window move/resize applies the last pointer delta when
the button is released before the pending animation frame, and does
not start tracking when the button was already released while the
window state was being read.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>