readest/apps
Huang Xin 4171f45bd5
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/arm64, ubuntu-24.04-arm) (push) Waiting to run
Publish Docker image / merge (push) Blocked by required conditions
Publish Docker image / build (linux/amd64, ubuntu-latest) (push) Waiting to run
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
fix(library): recover from a failed startup instead of rendering a blank window (#5789)
The Mac App Store build launched to a permanently blank window while the
same binary from the DMG worked. The webview was not at fault: it loaded,
ran the router, and reported the page load complete.

The container's settings.json carried a customRootDir pointing outside the
app container. loadLibraryBooks() creates the Books dir on first read, the
App Sandbox denied file-write-create on that path, and the rejection
escaped because initLibrary() runs as a floating promise.
checkOpenWithBooks and checkLastOpenBooks default to isTauriAppPlatform()
and are cleared only on the success path, so the library page's early
return kept rendering a bare div for the rest of the session. Web was
unaffected because both flags start false there.

Changes:

- Probe the configured library root once during init through the new
  BaseAppService.isRootDirUsable(), recording it as unavailableRootDir
  when it cannot be used. The custom resolver deliberately stays
  installed on failure: silently falling back to the default location
  would scatter imports into a second library and make the real books
  look lost once the root comes back. The setting itself is untouched, so
  an unplugged drive is picked up again on the next launch.
- Catch failures from initLogin and initLibrary, release the render
  gates, and surface an error that names the folder when an unreachable
  root is the cause.
- Catch a failed getAppService in EnvContext, which every page gates its
  render on.
- Publish the app service singleton only after init resolves. Assigning
  it first meant a failed init cached a half-built service forever: later
  callers got it back without re-running init, and getInitializedAppService
  handed synchronous callers an object whose paths were never resolved.

Adds 5 tests covering the probe, including the sandbox-denied path.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 18:15:01 +02:00
..
readest-app fix(library): recover from a failed startup instead of rendering a blank window (#5789) 2026-08-19 18:15:01 +02:00
readest-calibre-plugin fix(sync): merge book metadata on its own clock so page turns cannot clobber edits (#5438) (#5442) 2026-08-02 15:46:39 +02:00
readest.koplugin chore(koplugin): build nightly plugin zip and default to device targets (#5699) 2026-08-14 09:49:25 +02:00