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

Open
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. It stores nothing, like the fixes for #217 and #222.

  • With --file, find each named file the way freshFile in src/cli-read.ts finds one after #222, instead of awaiting lib.fresh(). Make one collections request for all the named files, not one per file. Do not start before the PR for #222 is merged to next.
  • 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 from its record as get does after #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.

Test. With quak's real Client against the fake server in test/ente-server.ts, holding at least three collections: fixMissingThumbnailsCommand with --file naming one file sends no /collections/v2/diff request for a collection after the one that holds it.

Done when the test passes, and --file stops fetching collections once every named file is found.

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.** It stores nothing, like the fixes for https://git.eeqj.de/sneak/quak/issues/217 and https://git.eeqj.de/sneak/quak/issues/222. - With `--file`, find each named file the way `freshFile` in `src/cli-read.ts` finds one after https://git.eeqj.de/sneak/quak/issues/222, instead of awaiting `lib.fresh()`. Make one collections request for all the named files, not one per file. Do not start before the PR for https://git.eeqj.de/sneak/quak/issues/222 is merged to `next`. - `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 from its record as `get` does after 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. **Test.** With quak's real `Client` against the fake server in `test/ente-server.ts`, holding at least three collections: `fixMissingThumbnailsCommand` with `--file` naming one file sends no `/collections/v2/diff` request for a collection after the one that holds it. **Done when** the test passes, and `--file` stops fetching collections once every named file is found. Model: opus-5-5
clawbot self-assigned this 2026-10-26 00:15:54 +01:00
Sign in to join this conversation.