Files e2e: PDF fixture requests text-card thumbnail kind #1252

Open
opened 2026-10-06 23:34:20 +00:00 by kayg · 2 comments
Owner

Steps to reproduce:

  1. Build the production SPA and the local server.
  2. Run bun e2e/files.mjs --screenshots artifacts/bash-files/files with the worktree server.
  3. The test uploads identical PDF bytes as thumbnail-cache-547.pdf and thumbnail-cache-547.txt.

Expected: The test asks the thumbnail API for the renderer selected by the indexed MIME. A PDF signature indexes as application/pdf, so the request should use kind=pdf.

Actual: The listing reports mime=application/pdf and has_thumbnail=true, while apps/web/e2e/files.mjs waits for kind=text-card for the .txt path. That variant is not published for this indexed PDF and the existing test times out after 120 seconds. The server-side renderer selector and Files client both map application/pdf to pdf.

Evidence: artifacts/bash-files/files-thumbnail-kind-timeout.txt; relevant code: apps/web/e2e/files.mjs:1720-1735, crates/calternal-fs/src/thumbnails.rs (ThumbnailKind::for_indexed_file), and apps/web/src/lib/files/model.ts (thumbnailKind).

Severity: minor (verification failure; no user-facing product defect established).

Steps to reproduce: 1. Build the production SPA and the local server. 2. Run `bun e2e/files.mjs --screenshots artifacts/bash-files/files` with the worktree server. 3. The test uploads identical PDF bytes as `thumbnail-cache-547.pdf` and `thumbnail-cache-547.txt`. Expected: The test asks the thumbnail API for the renderer selected by the indexed MIME. A PDF signature indexes as `application/pdf`, so the request should use `kind=pdf`. Actual: The listing reports `mime=application/pdf` and `has_thumbnail=true`, while `apps/web/e2e/files.mjs` waits for `kind=text-card` for the `.txt` path. That variant is not published for this indexed PDF and the existing test times out after 120 seconds. The server-side renderer selector and Files client both map `application/pdf` to `pdf`. Evidence: `artifacts/bash-files/files-thumbnail-kind-timeout.txt`; relevant code: `apps/web/e2e/files.mjs:1720-1735`, `crates/calternal-fs/src/thumbnails.rs` (`ThumbnailKind::for_indexed_file`), and `apps/web/src/lib/files/model.ts` (`thumbnailKind`). Severity: minor (verification failure; no user-facing product defect established).
Author
Owner

Confirmed after merging origin/dev: the Files test still stops before selection capture because thumbnail-cache-547.txt has indexed MIME application/pdf and has_thumbnail=true, while the test waits for a text-card thumbnail. The existing expectation is unchanged. Evidence: artifacts/bash-files/files/files-thumbnail-fixture-postmerge.txt.

Confirmed after merging `origin/dev`: the Files test still stops before selection capture because `thumbnail-cache-547.txt` has indexed MIME `application/pdf` and `has_thumbnail=true`, while the test waits for a `text-card` thumbnail. The existing expectation is unchanged. Evidence: `artifacts/bash-files/files/files-thumbnail-fixture-postmerge.txt`.
Author
Owner

The same fixture also prevents --selection-only from reaching captureSelectionEvidence, because that branch runs only after the PDF/text-card cache fixture. I will move the explicit selection-only branch ahead of that unrelated fixture and seed the same 12 Inbox items it expects; the default full E2E path and its thumbnail assertion will remain unchanged.

The same fixture also prevents `--selection-only` from reaching `captureSelectionEvidence`, because that branch runs only after the PDF/text-card cache fixture. I will move the explicit selection-only branch ahead of that unrelated fixture and seed the same 12 Inbox items it expects; the default full E2E path and its thumbnail assertion will remain unchanged.
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal-v0#1252
No description provided.