Web: image thumbnails (no full download) + large-folder memoization - #80
Merged
Conversation
Adds lazy image thumbnails to the web file grids without downloading whole files, plus a large-folder perf quick-win. Thumbnails: - A tiny (~10KB) JPEG is generated client-side at upload (ui-codec downscale → image-package JPEG) and stored as an encrypted sidecar in a parallel `<bucket>-thumbs` bucket — the grid fetches ~10KB, never the full file. (Same-bucket sidecars were rejected: they'd double the forest the listing loads + risk the 20k listing-cache cap, worsening large folders.) - WebThumbnailService: in-memory LRU + encrypted IndexedDB cache (reuses the recents AES-GCM/HKDF/Hive scheme) + a concurrency-capped (5) queue + in-flight de-dup + a negative cache; the fetch is 10s-bounded and a missing `-thumbs` bucket is marked absent (no doomed per-image burst on a pre-feature bucket). WebThumb widget: instant on a cache hit, else a 250ms debounce so fast-scrolled-past rows never fetch; cancels on dispose. A miss → icon (never a full download). - Existing files: backfilled on view (bytes already downloaded), gated to the user's own writable bucket. Thumb follows on rename/move, removed on delete. `*-thumbs` buckets hidden from the Cloud Files bucket list. Thumb caches are cleared on sign-out (clearAll/deactivate, like the recents cache). - Images only (videos/docs keep icons). Encryption: thumbs use the proven uploadObject path and live at a different key than their file, so a share never includes a thumb. Perf: memoize deriveCloudFolderView in the Cloud Files screen (was re-scanning the whole flat list every build + every rename-dialog keystroke). Bumps web app version to v1.11.4.17. NOTE (live-verify): grid shows a small ~10KB thumb fetch (not the full file); fast scroll fires <=5 fetches; an existing image gets a thumb after first open; no *-thumbs bucket appears in the Cloud Files bucket list. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ehsan6sha
added a commit
that referenced
this pull request
Jun 22, 2026
…mports) Brings the parallel Web Cloud Files (#76/#78/#80/#81) + multi-language landing (#69-73) work into the MCP integration branch. Sole conflict was the import block in fula_api_service.dart - kept both sides (AI-connections + secure_storage AND cloud_folder_marker). web_bucket_screen.dart auto-merged with all 6 P14.1 downloadBySourceBucket routing edits intact. flutter analyze: 0 errors app-wide. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0161UGEJmTpM6DM2cVZyV6Ev
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.
What
Lazy image thumbnails in the web file grids (category tabs + Cloud Files) without downloading whole files, plus a large-folder perf quick-win.
How
uicodec downscale →imagepkg JPEG), stored as an encrypted sidecar in a parallel<bucket>-thumbsbucket — the grid fetches ~10 KB, never the full file.listObjectsloads the whole bucket forest; same-bucket sidecars would double that load and risk the 20 k listing-cache cap — worsening large folders. The sibling bucket keeps the main listing at N; its thumb forest loads once, lazily.WebThumbnailService= in-memory LRU + encrypted IndexedDB + a concurrency-capped (5) queue + in-flight de-dup + negative cache; the fetch is 10 s-bounded and a missing-thumbsbucket is marked absent (no doomed per-image burst on a pre-feature bucket).WebThumbwidget: instant on a cache hit, else a 250 ms debounce so fast-scrolled-past rows never fetch; cancels on dispose. A miss → icon (never a full download).*-thumbshidden from the bucket list. Caches cleared on sign-out (clearAll/deactivate).deriveCloudFolderView(was re-scanning the whole flat list every build + every rename-dialog keystroke).Verification
flutter analyzeclean across all touched files;flutter build web --releasegreen. The folder-tree unit tests still pass; the thumbnail service is web-only (JS-interop crypto), so its concurrency/cache logic isn't VM-unit-testable — reviewed by the advisor instead (semaphore verified correct), and the two gaps it flagged are fixed: a 10 s fetch timeout, a bucket-level negative cache, and sign-out cache clearing.…-thumbsfetch, not the full file.*-thumbsbucket appears in the Cloud Files bucket list.Bumps web version to v1.11.4.17.
🤖 Generated with Claude Code