quak helper fix-missing-thumbnails --file fetches every collection to find the files named #223

Closed
opened 2026-10-26 00:15:54 +01:00 by clawbot · 0 comments
Collaborator

quak helper fix-missing-thumbnails --file ID fetches the files of every new or changed collection before it fixes the files named. On an empty cache that is every collection in the account. This is the same over-fetching as #217.

Where. fixMissingThumbnailsCommand in src/cli-commands.ts awaits lib.fresh(), a full refresh, whether or not --file names the files. Without --file the helper checks every file, so the full refresh is right there.

Fix (revised 26 October to follow #222 as built).

  • With --file, find the named files by the rule freshFile in src/cli-read.ts follows after #222. When the cache already holds the account's collections, refresh as before and look each file up in the cache. On an empty cache, make one collections request, then fetch one collection's files at a time with lib.freshFiles(collection), and stop once every named file is found. Store none of the collections or file records read.
  • fixMissingThumbnails in src/thumbnails.ts finds each file by walking the albums in the store, and fetches its original through the store. Give it the records the command found, and fetch each original with lib.originalOf(file) from #222. Its results, skip reasons, output and exit codes stay the same.
  • A named file that no collection holds is reported as it is today.
  • Do not start before the PR for #222 is merged to next.

Tests. With quak's real Client against the fake server in test/ente-server.ts, holding at least three collections: on an empty cache, --file naming one file sends no /collections/v2/diff request for a collection after the one that holds it. On a cache that holds the account, it sends the same requests as on next.

Done when both tests pass, and nothing the helper prints changes but the progress lines of the refresh it no longer runs on an empty cache.

Model: opus-5-5

`quak helper fix-missing-thumbnails --file ID` fetches the files of every new or changed collection before it fixes the files named. On an empty cache that is every collection in the account. This is the same over-fetching as https://git.eeqj.de/sneak/quak/issues/217. **Where.** `fixMissingThumbnailsCommand` in `src/cli-commands.ts` awaits `lib.fresh()`, a full refresh, whether or not `--file` names the files. Without `--file` the helper checks every file, so the full refresh is right there. **Fix** (revised 26 October to follow https://git.eeqj.de/sneak/quak/issues/222 as built). - With `--file`, find the named files by the rule `freshFile` in `src/cli-read.ts` follows after https://git.eeqj.de/sneak/quak/issues/222. When the cache already holds the account's collections, refresh as before and look each file up in the cache. On an empty cache, make one collections request, then fetch one collection's files at a time with `lib.freshFiles(collection)`, and stop once every named file is found. Store none of the collections or file records read. - `fixMissingThumbnails` in `src/thumbnails.ts` finds each file by walking the albums in the store, and fetches its original through the store. Give it the records the command found, and fetch each original with `lib.originalOf(file)` from https://git.eeqj.de/sneak/quak/issues/222. Its results, skip reasons, output and exit codes stay the same. - A named file that no collection holds is reported as it is today. - Do not start before the PR for https://git.eeqj.de/sneak/quak/issues/222 is merged to `next`. **Tests.** With quak's real `Client` against the fake server in `test/ente-server.ts`, holding at least three collections: on an empty cache, `--file` naming one file sends no `/collections/v2/diff` request for a collection after the one that holds it. On a cache that holds the account, it sends the same requests as on `next`. **Done when** both tests pass, and nothing the helper prints changes but the progress lines of the refresh it no longer runs on an empty cache. Model: opus-5-5
clawbot self-assigned this 2026-10-26 00:15:54 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/quak#223