Commit graph

18 commits

Author SHA1 Message Date
Huang Xin
2ce0522743
chore(linux): catch up the CEF runtime with upstream feat/cef, closes #6397 (#6487)
Some checks are pending
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
CodeQL Advanced / Analyze (rust) (push) Waiting to run
Publish Docker image / build (linux/amd64, ubuntu-latest) (push) Waiting to run
Publish Docker image / build (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Publish Docker image / merge (push) Blocked by required conditions
Build with Nix / tests (push) Waiting to run
PR checks / nix_flake_check (push) Waiting to run
PR checks / rust_lint (push) Waiting to run
PR checks / koplugin_rust_lint (push) Waiting to run
PR checks / build_web_app (push) Waiting to run
PR checks / test_web_app (1) (push) Waiting to run
PR checks / test_web_app (2) (push) Waiting to run
PR checks / test_extensions (push) Waiting to run
PR checks / build_tauri_app (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
Deploy to vercel on merge / build_and_deploy (push) Waiting to run
2026-09-30 04:07:58 +08:00
Huang Xin
8750c31043
perf(android): cut the arm64 apk from 90MB to 57MB (#6368)
Some checks are pending
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
CodeQL Advanced / Analyze (rust) (push) Waiting to run
Publish Docker image / build (linux/amd64, ubuntu-latest) (push) Waiting to run
Publish Docker image / build (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Publish Docker image / merge (push) Blocked by required conditions
Build with Nix / tests (push) Waiting to run
PR checks / rust_lint (push) Waiting to run
PR checks / koplugin_rust_lint (push) Waiting to run
PR checks / nix_flake_check (push) Waiting to run
PR checks / build_web_app (push) Waiting to run
PR checks / test_web_app (1) (push) Waiting to run
PR checks / test_web_app (2) (push) Waiting to run
PR checks / test_extensions (push) Waiting to run
PR checks / build_tauri_app (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
Deploy to vercel on merge / build_and_deploy (push) Waiting to run
* perf(android): cut the arm64 apk from 90MB to 57MB

The Rust library is 95% of the APK, and most of what it carried was not
code. Measured on an aarch64 release build: 89.7MB -> 57.5MB.

- Build `release` with fat LTO and one codegen unit. Cross-crate inlining
  cuts .text by 5.2MB and the unwind/exception tables by 2.1MB, at the
  cost of a longer final link.
- Strip the packaged library. AGP's own strip step only drops the
  .debug_* sections, so 22MB of symbol tables (10MB after LTO) reached
  every download. The strip runs on AGP's output, so `target/` keeps the
  unstripped copy, which the release and nightly workflows now upload to
  Sentry as debug files; Rust frames stay symbolicated. Android builds
  also link with a build id, which is how Sentry matches them, and the
  `debug-images` feature attaches the loaded modules to each event.
- Stop shipping jieba's WASM twice (2.7MB). The wasm-bindgen glue
  defaults to the file the bundler already emits; pointing `init()` at a
  public/vendor copy embedded both.
- Keep the browser-only turso WASM out of native builds (3.3MB). The
  alias that excluded it still named `@tursodatabase/database-wasm`,
  which the web database service stopped importing in #4086.

simplecc is still embedded twice (0.4MB): its glue is imported through
the `@simplecc/*` path alias out of public/vendor, so deduping it means
moving that directory.

Verified: the built APK's library carries no symbol tables and a build
id; `target/` keeps its; the bundle requests exactly the one embedded
jieba asset key and no /vendor/jieba path; the turso WASM is absent from
`out/`. The APK installs and runs on a Xiaomi 2211133C, library and a
Chinese book render, and RSVP runs on it. Whether jieba's WASM is
actually fetched at runtime is NOT verified: release webviews are not
inspectable and the fallback to Intl.Segmenter is silent.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* perf(android): drop fat LTO, codegen-units=1 is the whole win

The previous commit credited the code-size saving to fat LTO. That was
wrong. Measured on aarch64-linux-android with the flags rustc actually
received (`cargo build -v`):

  codegen-units=16, lto=false   .text 29.66MB  .eh_frame 3.69  .except 2.51
  codegen-units=1,  lto=off     .text 24.43MB  .eh_frame 2.28  .except 1.84
  codegen-units=1,  lto=thin    .text 24.43MB  .eh_frame 2.28  .except 1.84
  codegen-units=1,  lto=fat     .text 24.44MB  .eh_frame 2.28  .except 1.84

One codegen unit accounts for all of it; LTO changes nothing once it is
set, so fat LTO was buying only link time and peak memory on every
release target. The rebuilt APK confirms it: 57.49MB without LTO against
57.50MB with it.

What `codegen-units = 1` costs, from a clean aarch64 build on an
M-series: 5m54s against 4m15s, and 3.3GB peak RSS against 2.9GB. That
answers the review's question about the 75-minute Android and 45-minute
desktop step limits in nightly.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* perf: stop shipping vendored modules the bundler already embeds

Tauri embeds every file under `out/`, and `public/` is copied there whole. So
a module imported through a path alias that points into `public/` ships twice:
once bundled into a chunk, once as a published file nobody fetches. jieba cost
2.7MB that way; `@pdfjs/*` and `@simplecc/*` had the same shape.

Split the vendored assets by how they are loaded. What the reader fetches by
URL at runtime stays in `public/vendor/pdfjs` — the worker, the WASM decoders,
cmaps, standard fonts, the layer CSS, all built as runtime URLs in
foliate-js/pdf.js, which is why the bundler never emitted copies of them.
What the bundler imports moves to `vendor/` (outside `public/`):
`pdf.min.mjs` + its types, and the simplecc glue and WASM.

Measured on the embedded frontend, brotli as tauri compresses it: 23.7MB ->
16.96MB across this and the earlier jieba/turso fixes. That comes out of every
Tauri target, not just the APK.

The new test states the invariant that was broken rather than the three
symptoms: no tsconfig path alias may resolve into `public/`. It failed on
`@pdfjs/*` and `@simplecc/*` before this change.

Desktop stripping was measured and deliberately NOT done. On macOS it saves
4.76MB in the binary but only 1.44MB of DMG (36.59 -> 35.15MB), because a DMG
compresses symbol strings while an APK stores the .so uncompressed (verified:
`Stored`, 0%) — which is why Android got the full 22MB. Buying 1.4MB would
mean either a profile-level `strip`, which deletes the unstripped artifact
Sentry symbolicates Rust panics from, or pulling the release job apart from
tauri-action, which builds, bundles, signs and notarizes in one step. deb, rpm
and AppImage are compressed too, and MSVC keeps symbols in the PDB.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix: init simplecc from the emitted WASM, not a URL that no longer exists

Moving the simplecc glue out of `public/` left `initSimpleCC` still asking for
`/vendor/simplecc/simplecc_wasm_bg.wasm`, a URL nothing publishes any more, so
Chinese variant conversion would fail to initialize at runtime. Caught in
review of #6368.

`init()` with no path uses the glue's default
`new URL('simplecc_wasm_bg.wasm', import.meta.url)` — the copy the bundler
emits and Tauri embeds — the same shape as the jieba fix.

The existing WASM-init test covered jieba only, which is why this slipped
through; it now covers both. Verified against a fresh build: the chunk
references `static/media/simplecc_wasm_bg.<hash>.wasm` and no runtime
`/vendor/simplecc` reference remains (the two textual hits left are the
bundled package.json script strings and a source-map path, and maps are
stripped before packaging).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 10:45:14 +02:00
Huang Xin
ee86510cca
chore: bump tauri to version 2.11.5 (#6081)
Some checks are pending
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
CodeQL Advanced / Analyze (rust) (push) Waiting to run
Publish Docker image / build (linux/amd64, ubuntu-latest) (push) Waiting to run
Publish Docker image / build (linux/arm64, ubuntu-24.04-arm) (push) Waiting to run
Publish Docker image / merge (push) Blocked by required conditions
Build with Nix / tests (push) Waiting to run
PR checks / rust_lint (push) Waiting to run
PR checks / koplugin_rust_lint (push) Waiting to run
PR checks / nix_flake_check (push) Waiting to run
PR checks / build_web_app (push) Waiting to run
PR checks / test_web_app (1) (push) Waiting to run
PR checks / test_web_app (2) (push) Waiting to run
PR checks / test_extensions (push) Waiting to run
PR checks / build_tauri_app (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
Deploy to vercel on merge / build_and_deploy (push) Waiting to run
* 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>
2026-09-05 22:32:30 +02:00
Huang Xin
655c72ad5a
feat(linux): ship Readest on the tauri CEF runtime (#6074)
* 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>
2026-09-05 20:09:06 +02:00
Huang Xin
58d4661b74
feat(ios): CarPlay support and native TTS playout with Now Playing integration (#5085)
* feat(ios): add CarPlay support for TTS

Surface active TTS sessions on Apple CarPlay, mirroring the Android Auto
integration. A CarPlaySceneDelegate presents a CPListTemplate root
showing the currently reading book (or a placeholder when idle) and
pushes the system Now Playing template. Transport and metadata ride the
existing MPNowPlayingInfoCenter / MPRemoteCommandCenter path, so no
CarPlay button is routed by hand. A new iOS-only update_carplay_state
command lets the media bridge report session start and stop, and TTS
autoplay deep links are consumed even when the target book is already
mounted, for example when the app cold restores straight into the
reader.

Registering the UIApplicationSceneManifest crashed the app at launch on
real devices: tao's configuration_for_connecting_scene_session returned
a raw borrow of a Retained UISceneConfiguration it immediately dropped,
so UIKit retained freed memory. Add the tao fork as the packages/tao
submodule (github.com/readest/tao, branch readest-0.35: tao 0.35.3 plus
only the callback returning an autoreleased strong reference) and patch
it in the workspace. Bump @tauri-apps/api to 2.11.1 and @tauri-apps/cli
to 2.11.4 for the tao 0.35/wry 0.55 stack, and advance the tauri fork
(branch readest-2.11) with a guard in the generated unlisten script
against already-removed listeners.

The tauri 2.11 stack needs two CI accommodations. First, the
build_tauri_app job overrides setup-rust-toolchain's default RUSTFLAGS
of -D warnings: cargo builds path-patched dependencies without
cap-lints, so upstream warnings in the tao fork (deprecated glib
channel calls in the Linux backend) would fail the app build; warnings
in our own crate stay enforced by the rust_lint job. Second, tauri 2.11
enforces ACL for IPC from remote origins even without an AppManifest
(upstream security fix #15266), and the webdriver harness serves the
vitest tester page from its own port, which is a remote origin, so
every custom app command was denied and 56 tauri tests failed.
Production is unaffected since real app pages are local origins.
Declare the app commands in the ACL app manifest in build.rs (generated
allow permissions committed under src-tauri/permissions/autogenerated),
grant them in capabilities/default.json for local windows, and add a
webdriver-remote capability for localhost remote origins that is pinned
out of shipped builds via app.security.capabilities in tauri.conf.json;
scripts/test-tauri.sh opts into it with a --config override. Verified
with pnpm test:tauri: 112 passed, 1 skipped.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(android): handle audio focus properly for background TTS

Request focus with a modern AudioFocusRequest (USAGE_MEDIA,
CONTENT_TYPE_SPEECH) and pause instead of ducking, matching how spoken
audio should yield to navigation prompts. Resume after transient loss
only when the loss is what paused us, forward focus transitions to the
web side as media-session play/pause events, and pause on
ACTION_AUDIO_BECOMING_NOISY so unplugging headphones does not blast the
speaker.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat(ios): native audio playout for Edge TTS with Now Playing support

WebAudio in WKWebView renders in WebKit's GPU process under an audio
session the app cannot own, which made every system media behavior
unreliable on device: no lock-screen card, the card vanished on pause,
AirPods resumed another app, and the mute switch silenced playback.

Play the Edge TTS utterances with an in-process AVPlayer instead. The
native-tts plugin gains a deliberately dumb playout engine
(playout_enqueue, playout_control, playout_position) and the new
NativeAudioPlayer mirrors the WebAudioPlayer session interface, so
EdgeTTSClient just picks the player per platform. Word highlighting
reads the player's media clock, which AVPlayer reports in item time and
is therefore unaffected by the playback rate; rate changes stay pitch
preserving via the timeDomain pitch algorithm and inter-sentence gaps
run on a native timer immune to background JS throttling.

With the audio in the app process the plugin claims a non-mixable
.playback session with .spokenAudio mode, so navigation prompts pause
instead of duck. Handle interruption began and ended with shouldResume,
pause on route change to the speaker, and bind an MPNowPlayingSession
to the playout player so the paused state is reported explicitly and
the Now Playing slot survives a pause. The silent keep-alive player
pauses in lockstep, KVC playback state writes are simulator only where
they are required and harmful on device, and the mixWithOthers
use_background_audio calls are removed. On the web side the composite
iOS media session mirrors metadata and position into
navigator.mediaSession, remote commands map to directional play and
pause plus a toggle, and the silent unblocker element is skipped on iOS
Tauri since a playing HTMLMediaElement makes WebKit register its own
competing now-playing client.

Volume-key page flip previously defeated all of this: its handler
unconditionally reconfigured the shared session with .mixWithOthers,
and a mixable session is ineligible for the Now Playing slot, so
pausing TTS dismissed the card and handed AirPod controls to another
app. The two plugins now coordinate through in-process notifications:
native-tts announces claim and release of the audio session, and the
volume key handler leaves the session untouched while TTS owns it, so
volume keys keep flipping pages during a pause without losing the card,
and re-owns the session after TTS teardown regardless of ordering.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 10:53:31 +02:00
Huang Xin
75f1fafe9f
feat(reader): slide and page curl turn animations (#555) (#4940)
* feat(reader): slide and page curl turn animations (#555)

Add an Animation Style setting (Push, Slide, Page Curl) next to the
Paging Animation switch. Slide moves the turning page over the still
previous or next page like the Apple Books slide; Page Curl folds it
open in 3D so the page underneath is partially visible as it turns.
Both styles track the finger: the page follows a horizontal drag and
commits past halfway or on a flick, or settles back. The page header
and footer stay in place while the page turns.

The styles layer a View Transitions snapshot of the outgoing page over
the live, stationary incoming page, since the pages of one section live
in a single iframe and can never be on screen twice. They work for all
writing modes including vertical-rl, and on engines without the View
Transitions API (older WebViews) the paginator falls back to the
existing push animation, so all platforms keep working page turns.

The paginator changes live in the foliate-js submodule; this bumps the
pointer, wires viewSettings.pageTurnStyle to the renderer turn-style
attribute, and adds browser tests covering slide layering, curl,
vertical-rl, finger tracking with commit and revert, and the push
fallback.

Fixes #555

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat(reader): add WebGL page curl renderer for mesh turn animations (#555)

Grid mesh deformed around a cylinder: content past the fold wraps over
and lands mirrored on top with a whitened page back, transparent where
the page has curled away. Corner grabs start as a steep diagonal pinch
that straightens as the turn completes so the whole page clears by the
end. Groundwork for the Tauri mesh curl; capture and orchestration land
separately.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat(native-bridge): capture webview region as PNG on macOS and iOS (#555)

New capture_webview_region plugin command returns a binary PNG snapshot
of the calling webview (tauri::ipc::Response, no JSON overhead) for the
mesh page-curl texture. macOS goes through WKWebView
takeSnapshotWithConfiguration via with_webview on the main thread with
a 500ms timeout; iOS snapshots in Swift and hands the PNG across the
JSON-only plugin boundary base64-encoded, decoded back to bytes in
mobile.rs. Windows, Linux, and Android reject for now so the JS side
falls back to the CSS curl.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat(reader): drive the mesh page curl on Tauri platforms (#555)

Wire the WebGL curl renderer and the native webview capture into page
turns. A MeshCurlTurn controller runs the pipeline per turn: snapshot
the content box, overlay the captured page drawn flat, turn the live
view instantly underneath (the paginator's animated paths all gate on
the animated attribute), then curl the capture away. Backward turns
mirror the fold to the spine edge, matching the layered VT curl's
old-page-recedes choreography.

useMeshPageCurl wraps the view's prev/next so taps, keys, and wheel
turns all curl, and registers a touch interceptor (between the reading
ruler and the fixed-layout swipe) that scrubs the curl from the finger,
committing past halfway or on a flick and otherwise un-curling and
turning back under the overlay. The paginator stays out of the way via
no-swipe while the mesh is active; if the native capture ever fails the
session falls back to the paginator's CSS arc-fold curl and the shared
applyPageTurnAttributes helper restores turn-style.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(build): restore iOS builds on Xcode 26.2 with a vendored swift-rs

Swift 6.2's driver no longer honors swift-rs 1.0.7's cross-compilation
style (swift build --arch <host> with per-swiftc -target overrides and
an inherited SDKROOT): plugin sources compile against the wrong
platform's Swift overlays and fail with baffling errors like type
'Bundle' has no member 'main' and extra argument 'privacy' in call.
Upstream swift-rs is unmaintained, so vendor it under packages/swift-rs
via a crates-io patch and build with SPM's first-class --triple/--sdk
flags instead, dropping the leaked SDKROOT so the host-targeted
manifest compile stays clean. Artifacts land in the unversioned-triple
directory now, so the link search path follows.

With --triple, SPM enforces the deployment floor declared in
Package.swift (the old override bypassed it): bump native-bridge to
iOS 15.0, matching the app's deployment target, since StoreKit's
Storefront is used unguarded.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat(native-bridge): capture webview region on Android via PixelCopy (#555)

Implements the Android side of capture_webview_region so the mesh page
curl works there too. The Kotlin command scales the CSS-pixel rect by
the display density, offsets it by the webview's window position, and
reads the pixels back from the window surface with PixelCopy (API 26+,
the app's minSdk), which includes the hardware-accelerated WebView that
View.draw would miss. PNG encoding runs off the main thread and the
result crosses the JSON plugin boundary base64-encoded, decoded back to
bytes in mobile.rs like iOS.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(reader): right the upside-down page curl on iOS (#555)

The renderer oriented its texture with UNPACK_FLIP_Y_WEBGL, which WebKit
ignores for ImageBitmap uploads: on iOS the captured page rendered
upside down, and the mirrored page back read as rotated 180 degrees
instead of the ink-through-paper horizontal mirror Apple Books shows.
Upload unflipped and sample page coordinates directly so no pixel-store
flag is involved.

The page texture in the browser test was only horizontally asymmetric,
which is how the flip slipped through; it now uses four quadrants fed
through the production PNG-blob-to-ImageBitmap path and pins the
vertical orientation. Verified red/green by running the suite on
Playwright WebKit, which reproduces the iOS behavior.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(reader): curl the whole page including header, footer, and margins (#555)

The mesh curl captured only the margin-inset content box, leaving the
running header, footer, and page margins static while just the text
column turned. A physical page turn takes the whole sheet with it, as
Apple Books does, so the capture and overlay now span the full reader
cell. The overlay mounts above the in-cell header (z-10) and footer, so
the static copies never show through the turning page.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(reader): gate layered View Transition turns and slide from a capture instead (#555)

iOS 18 WebKit ships document.startViewTransition but crashes the WebContent
process when a page-turn transition snapshots the reader, so the mere
presence of the API is not enough for the layered slide/curl turns. Require
nested view-transition groups (Chrome/WebView 140+) as the marker of a
mature engine before setting turn-style on the renderer.

Engines that fail the check no longer lose the slide on Tauri: the mesh
curl's capture pipeline generalizes to CapturedPageTurn and now also drives
a flat slide overlay (capture the outgoing page, turn instantly underneath,
translate the captured page out toward the spine, mirrored for backward
turns), clipped to the content box with an edge shadow like the VT slide.
On the web, engines without full support fall back to push and the
Slide/Page Curl options are hidden from the Animation Style select; a
synced slide/curl setting from another device reads as Push there.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(reader): make the Android page curl start instantly (#555)

The Android capture encoded a full-density PNG: 1080x2400 on a 3x
Xiaomi 13 took ~1.5s per turn, so the page sat frozen long enough to
read as the curl not working at all. Encode JPEG instead (the page is
opaque) and cap the destination bitmap at 2x CSS pixels - PixelCopy
scales into a smaller bitmap for free and the moving page stays sharp.
Measured on device over CDP: the capture invoke drops from 1550ms to
34ms and the curl overlay mounts 132ms after the tap.

The JS side stops hardcoding an image/png blob type and lets the
decoder sniff the platform's actual format.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* perf(reader): encode iOS page-curl captures as capped JPEG (#555)

Apply the Android speedup to iOS: encode the snapshot as JPEG (the
page is opaque) off the main thread, and cap it at 2x CSS pixels via
WKSnapshotConfiguration.snapshotWidth on 3x screens, cutting both the
encode time and the base64 payload crossing the JSON plugin boundary.
The JS side already sniffs the image format from the bytes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 20:49:57 +02:00
Huang Xin
b4207bd742
chore(deps): bump vulnerable dependencies to address Dependabot alerts (#3693) 2026-03-30 15:59:03 +02:00
Huang Xin
c688612888
chore(fdroid): build qcms wasm for fdroid (#3680)
Some checks are pending
PR checks / rust_lint (push) Waiting to run
PR checks / build_web_app (push) Waiting to run
PR checks / build_tauri_app (push) Waiting to run
Deploy to vercel on merge / build_and_deploy (push) Waiting to run
2026-03-29 20:08:08 +02:00
Huang Xin
91bc4ddec7
feat(library): backup to and restore from a zip file (#3571) 2026-03-20 18:27:52 +01:00
Huang Xin
1c9cfa49b3
fix(flathub): use custom dbus id for single instance on Linux (#2971) 2026-01-16 05:59:25 +01:00
Huang Xin
1843a74dbb
feat: supported changing data location on desktop platforms, closes #2047 and closes #478 (#2125) 2025-09-26 10:22:41 +02:00
Huang Xin
9aa6a8e6b9
chore: bump tauri to the latest version (#2117)
Some checks are pending
Deploy to vercel on merge / build_and_deploy (push) Waiting to run
2025-09-25 09:32:55 +02:00
Huang Xin
7b8d1ddc35
chore: bump tauri to latest dev branch (#1849) 2025-08-20 05:15:44 +02:00
Huang Xin
42c2825e90
feat: enable IAP for upgrading to Readest Premium on iOS (#1678) 2025-07-25 19:08:53 +02:00
Huang Xin
93071e727f
linux: fixed multiple instances created in OAuth, closes #1654 (#1659) 2025-07-22 09:00:19 +02:00
Huang Xin
c24f951375
fix: set xdg-mime with mime type other than scheme, closes #1621 (#1641) 2025-07-21 05:02:22 +08:00
Huang Xin
7ccf3d0632
refactor: read local file with fs plugin for Tauri App, closes #553 and closes #489 (#785) 2025-04-01 14:26:26 +02:00
QP Hou
07116bdae8
ci: run rust clippy/fmt (#207) 2025-01-21 07:20:26 +01:00