feat: OneDrive and Local Folder sync providers + Google Drive re-auth overhaul - #250
Merged
Conversation
Add design doc for a File System Access API backed sync provider. Feature-gated on Chromium browsers; handle persisted in a dedicated IndexedDB database owned by the provider module.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add filesystemCore stub to cloud-provider-core-registry (never called at runtime since FilesystemProvider.supportsWorkerDownload = false) - Widen VolumeMetadata.cloudProvider from narrow literal union to ProviderType, fixing cascading errors in cloud-fields.ts, library-placeholders.ts, and download-queue.ts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
processDownload previously only handled supportsWorkerDownload=true. For the filesystem provider (which sets that to false), downloads were silently skipped — the queue item stayed in 'downloading' state forever and blocked all subsequent items. Add a main-thread branch that downloads via the provider's downloadFile method, extracts the CBZ with @zip.js/zip.js, and reuses the existing downloadSidecarEntries + processVolumeData pipeline.
The regex on error.message did not match Chrome's DOMException.message (which does not contain the string 'NotFoundError'), causing spurious DELETE_FAILED errors when a series folder was already gone during sync.
…ders The filesystem provider cannot upload from a worker because a FileSystemDirectoryHandle is bound to the window that received it via showDirectoryPicker — structured-cloning it to a worker does not carry the user-granted permission. Introduce a supportsWorkerUpload flag on SyncProvider (parallel to the existing supportsWorkerDownload) and, when a provider opts out, compress + upload the archive and any sidecars on the main thread via provider.uploadFile. Worker-capable providers (Google Drive, MEGA, WebDAV) are unaffected.
Previous fix bypassed the pool entirely and ran compression + upload on the main thread for filesystem. With a parallel queue that meant N volumes could load, compress, and buffer simultaneously with no shared-memory accounting and no provider concurrency cap. Instead, submit the same pool task used for real providers but in the worker's 'null provider' compress-only mode. The worker still does the CPU-heavy compression (throttled by WorkerPool + sharedMemoryManager); the main-thread onComplete then performs the single filesystem write via provider.uploadFile while the task's memory reservation is still held. Sidecars follow the same path. Worker-upload providers (Drive, MEGA, WebDAV) are unchanged.
Previous fix bypassed the pool and did blob read + decompression + processing on the main thread for filesystem. Even with the queue being serial that blocks the UI during decompression and leaves memory untracked by the shared memory manager. Instead, use the worker's existing decompress-only mode: prepareData reads the blob on the main thread (required — FileSystemDirectoryHandle is bound to the window) and passes it to the worker, which decompresses and returns entries. Memory reservation, provider concurrency gating, and shared memory tracking all apply uniformly with the existing worker-download path.
Adds design for a fourth real sync provider using Microsoft Graph API via MSAL.js. Multi-tenant (common) auth covers personal + work/school accounts. Worker-capable core follows the Drive/WebDAV pattern so WorkerPool throttling applies uniformly.
renameFolder copied files to the new path then recursively deleted the old folder. When the new path nested under the old one (e.g. a free-text rename of "Series" to "Series/Archive"), the recursive delete destroyed the files just written into the subfolder. Skip the cleanup when the new path nests under the old folder. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The catalog's providerNames map was missing the two new providers, so their
placeholder breakdowns rendered the raw keys ("2 filesystem") instead of
friendly labels. Add Local Folder / OneDrive entries.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# Conflicts: # package-lock.json
…ovider # Conflicts: # src/lib/views/CloudView.svelte
…ovider # Conflicts: # src/lib/util/sync/providers/mega/mega-provider.ts
… on all providers
…onfig-gate OneDrive
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
adrian-tompkins
pushed a commit
to adrian-tompkins/mokuro-reader
that referenced
this pull request
Aug 2, 2026
…tbox fix: Extend hotkey filtering to OCR textboxes and nav keys
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two new sync providers hardened to parity with Drive/MEGA/WebDAV, cross-provider sync fixes, an overhaul of the Google Drive re-auth UX, and removal of the unshipped libraries feature.
New providers
nextExpectedRanges, per-chunk timeouts, typedProviderErrorclassification (401 flips the reconnect UI), folder-creation mutex with 409 tolerance,removeDirectoryIfEmpty, logout/init-error hardening.removeDirectoryIfEmpty.Cross-provider fixes
isSyncableFilemodule replaces six divergent per-provider copies; jpg/jpeg sidecars now accepted on the new providers (previously silently dropped).VITE_ONEDRIVE_CLIENT_IDis configured.Google Drive re-auth overhaul
fetchAllCloudVolumes+syncProgress).error_callbackregistered (blocked popups previously failed silently); NavBar shows a red Reconnect pill when the session is expired.Removed: unshipped libraries feature (−2,300 LOC)
libraries.jsonsync plumbing, and thelibraryIdmetadata field.src/lib/catalog/cloud-ocr-upgrade.ts.#/librariesbookmarks fall back to catalog; stalelibraries.jsonfiles in cloud folders are ignored.UI
Config
VITE_ONEDRIVE_CLIENT_ID(optional): Azure AD app with the deploy origin as an SPA redirect URI. Documented in README/CLAUDE.md;.env.exampleadded. When unset, the OneDrive option is hidden.Testing
🤖 Generated with Claude Code