Sharing: public text file Preview says no preview is available #1419

Closed
opened 2026-10-07 23:04:38 +00:00 by kayg · 2 comments
Owner

Steps:

  1. Create a real plain-text file public-round2.txt with body Public preview body round two..
  2. Create a public file link with view: true, download: false, and presentation: auto.
  3. Open the link signed out and select Preview.

Expected: Quick Look shows the text bytes. The public page's own contract says a view-only link previews text, and the preview code allows text when the link grants view.

Actual: Quick Look shows “No preview for this kind of file.” The server reports the file name and MIME, but singleItem() in PublicLinkPage.svelte drops info.mime and creates an empty path. Quick Look then classifies the file as other, so it never requests the allowed preview bytes.

Evidence: /home/kayg/Developer/calternal-wt/bash-core/artifacts/bash-core2/public-text-preview-round2.png (actual-size macOS-emulated production capture). The focused real-server run reproduced the issue with a 30-byte text file.

Severity: major. A public link with view permission cannot preview a plain-text file even though the page offers Preview.

Steps: 1. Create a real plain-text file `public-round2.txt` with body `Public preview body round two.`. 2. Create a public file link with `view: true`, `download: false`, and `presentation: auto`. 3. Open the link signed out and select Preview. Expected: Quick Look shows the text bytes. The public page's own contract says a view-only link previews text, and the preview code allows `text` when the link grants view. Actual: Quick Look shows “No preview for this kind of file.” The server reports the file name and MIME, but `singleItem()` in `PublicLinkPage.svelte` drops `info.mime` and creates an empty path. Quick Look then classifies the file as `other`, so it never requests the allowed preview bytes. Evidence: `/home/kayg/Developer/calternal-wt/bash-core/artifacts/bash-core2/public-text-preview-round2.png` (actual-size macOS-emulated production capture). The focused real-server run reproduced the issue with a 30-byte text file. Severity: major. A public link with view permission cannot preview a plain-text file even though the page offers Preview.
Author
Owner

Fixed on branch job/bash-core in f5f1da53f (Fix public text file previews). The public-link API response now retains its MIME type so the existing text viewer can render view-only .txt links.

Verification used the worktree production web build and a real local server. Signed-out Playwright checks passed at 390, 820 and 1440 px in light and dark themes; Enter opened Preview, Escape closed it, and an expired link returned unavailable without exposing the filename. Output:

PASS signed-out public text preview 390px light
PASS signed-out public text preview 390px dark
PASS signed-out public text preview 820px light
PASS signed-out public text preview 820px dark
PASS signed-out public text preview 1440px light
PASS signed-out public text preview 1440px dark
PASS public text preview opens with Enter and closes with Escape
PASS signed-out public link expiry

The floating title obscures the first lines of the preview at 1440 px; this is the shared Quick Look issue tracked in #1408 and remains outside this issue's files.

Fixed on branch `job/bash-core` in `f5f1da53f` (`Fix public text file previews`). The public-link API response now retains its MIME type so the existing text viewer can render view-only `.txt` links. Verification used the worktree production web build and a real local server. Signed-out Playwright checks passed at 390, 820 and 1440 px in light and dark themes; Enter opened Preview, Escape closed it, and an expired link returned unavailable without exposing the filename. Output: ``` PASS signed-out public text preview 390px light PASS signed-out public text preview 390px dark PASS signed-out public text preview 820px light PASS signed-out public text preview 820px dark PASS signed-out public text preview 1440px light PASS signed-out public text preview 1440px dark PASS public text preview opens with Enter and closes with Escape PASS signed-out public link expiry ``` The floating title obscures the first lines of the preview at 1440 px; this is the shared Quick Look issue tracked in #1408 and remains outside this issue's files.
kayg referenced this issue from a commit 2026-10-08 10:41:40 +00:00
Author
Owner

Deployed to calternal.cloud in merge round 35a (build cc1af3c12, live 2026-10-09 00:12 IST). Closing.

Deployed to calternal.cloud in merge round 35a (build cc1af3c12, live 2026-10-09 00:12 IST). Closing.
kayg closed this issue 2026-10-08 18:41:31 +00:00
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#1419
No description provided.