Repository navigation
Open big folders fast in the desktop app; don't sync files over 500 MB (v0.22.0) - #54
Merged
Merged
Conversation
…B (v0.22.0) Opening ~/Desktop (22k files, 2.6 GB) sent 644 MB of bytes to the page in one IPC message and copied 1.5 GB of large files into browser storage before the side panel showed anything; signed in, sync then uploaded it all. - The desktop app lists a folder (names and sizes) and the page reads each file when it needs it, with a progress count in the status line. - Large files, PDFs and images the desktop app opened are read from disk on demand (blobs.fromDisk), never copied into IndexedDB. Reopening the folder keeps their stored reference, so sync does not upload them again. - Sync skips files larger than 500 MB by default. The Sync dialog has "Don't sync files larger than [500] MB"; unchecking it syncs everything. Large files on either side stay out of the merge, so a file another device synced with a higher limit is never deleted here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Follow-up to #53. ~/Desktop opened through the native dialog but the side panel never filled.
Measured on a real ~/Desktop (22k readable files, 2.6 GB, two 6 GB films):
load()hit the 5,000-file cap and sent 644 MB of file bytes in one IPC message, plus 109 files over 4 MB (1.5 GB) that the page then read whole and copied into IndexedDB. Signed out it took about 60 s at about 2 GB RSS to show 75 files. Signed in, it also queued all of it for sync upload.Changes
desktop/main.cjs:load()lists files (path, name, relative, size) and sends no bytes.site/disk.ts:fromDesktopreads small files one at a time overreadFile. For files over 4 MB it reads only the first 64 KB to classify them. Progress is reported to the status line.site/blobs.ts:fromDisk(ref, read)registers a disk reader, whichlocal()andbytes()check first. Large files, PDFs and images the desktop opened are never copied into IndexedDB. Reopening the folder reuses the stored reference (same path and size), so sync doesn't upload them again. After a restart the viewer asks you to open the folder again.site/autosync.tsandsite/sync.ts: a sync size limit, 500 MB by default, set per device. The Sync dialog shows "Don't sync files larger than [500] MB", and unchecking it syncs every file (limit 0). Large docs on either side stay out of the merge. The account's large docs are uploaded back unchanged and this device's are put back after applying, so a lower limit here never deletes another device's synced file. The status line says how many files were kept on this device.Tests: typecheck clean, 198/198 unit tests, 27/27 viewer and sync specs (2 new: desktop listing with nothing copied, and the sync limit, including turning it off), 13/13 paste and sharing specs.
🤖 Generated with Claude Code