Repository navigation
docs(storage): describe the video-thumbnail pipeline that runs - #866
Merged
Merged
Conversation
The `## Video thumbnails` section described generation at upload time by `ffmpeg-static` and Sharp, written into `req.payloadUploadSizes.small` and read back from `sizes.small.url`. #88 deleted that pipeline with `src/lib/fileUtils.ts` on 2025-12-06 and left the paragraph, which then survived three doc moves. Its `Implementation:` path, `src/lib/videoThumbnailUtils.ts`, has never been a tracked file at all. None of it was a stale path. It was a paragraph of specific, confident detail for machinery that does not exist, in a rule file that loads on every storage change — so a reader looking for the seam went hunting for a module, a size and a hook that are all absent, and found no signal that the section was wrong. What runs instead is `previewUrlField`, a virtual text field with an `afterRead` hook only: Cloudflare Stream renders the video still and Cloudflare Images the image variant, and this repo generates nothing. The rewrite states the readiness gap that follows from composing the URL from the uid — nothing consults `readyToStream`, so the URL exists before transcoding finishes — because that is the property a reader cannot re-derive from the hook's four lines. It also separates the two display surfaces the old sentence conflated. The `<video>` fallback belongs to `FrameThumbnail`; `PreviewUrlThumbnailCell` has none and renders Payload's placeholder. `urlFields.ts` carried the same wrong attribution one line above the Cell it wires, telling the reader that "components" fall back when the Cell this factory installs is the one that does not. Closes #864 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RewarM72mwntsKDMxQ1Nw2
…uard The review pass found four things the first draft got wrong or left out. `previewUrlField` is not frames-only — `videos` and `files` mount it with the same defaults, and `previewUrl` sits in all three `defaultColumns`, so someone tuning it would have moved three list views without knowing. The hook has a third MIME branch. Anything neither `image/` nor `video/` gets the local Payload URL, which serves the whole file: a PDF in `files` has a `previewUrl` that is the PDF. Documenting two of three branches invited the reader to assume the third thumbnails too. `FrameThumbnail`'s `<video>` fallback is guarded on `isVideo && (mp4Url || hlsUrl)` and renders an empty box otherwise. The table read as though the fallback were unconditional, which is the same shape of over-confident claim this ticket exists to remove. The readiness point named MP4 downloads, which this file already states twice — in the module table and in the webhook section's opening sentence — against its own instruction at the preview-isolation paragraph to cite rather than restate. MP4 readiness is also not a property of the thumbnail URL, so the clause imported a neighbouring subsystem into a point that stands alone. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RewarM72mwntsKDMxQ1Nw2
railway-app
Bot
temporarily deployed
to
sahajcloud / SahajCloud-pr-866
September 29, 2026 04:35
Destroyed
|
🚅 Deployed to the SahajCloud-pr-866 environment in sahajcloud
1 service not affected by this PR
|
sydevs-bot
marked this pull request as ready for review
September 29, 2026 04:48
sydevs-bot
enabled auto-merge
September 29, 2026 04:48
Contributor
Author
|
Adversarial review skipped: 2 file(s), 18 changed line(s), under 🤖 sydevs dispatcher |
2 tasks done
Ardnived
approved these changes
Sep 29, 2026
sydevs-bot
pushed a commit
that referenced
this pull request
Sep 29, 2026
…nothing #862's phase 1 corrected four stale references by hand. This is the scanner that would have caught them, with the fixture proving it is not vacuous. Three scope rules, each measured against this repo rather than chosen. A fenced block writes a path as a sample argument or a code comment, and a `://` run makes the path the tail of an upstream URL — both cite somebody else's tree. Symlinks are dropped by git mode, because every `CLAUDE.md` is a symlink to the `AGENTS.md` beside it and reading both reports every finding twice. The citation pattern is `\.tsx?`. Written `\.(ts|tsx)` the alternation stops at `ts`, which both truncates the row and reports live `.tsx` components as missing — the fixture pins a case that fails either way round. The assertion over the live tree is phase 2b, not an omission. It reports one row today, `docs/rules/storage.md:169` citing the pipeline #88 deleted, which is #864 and is fixed by the open #866. Landing the assertion now lands a red spec, and the only early alternative is allowlisting `storage.md` — the one outcome that would make the guard worthless. Refs #862 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DZJmVZdzC4UJtcZvxzbJMS
sydevs-bot
pushed a commit
that referenced
this pull request
Sep 29, 2026
…oups #866 landed the `docs/rules/storage.md` rewrite, so the one citation that did not resolve is gone and the guard can assert over the real tree rather than the fixture alone. It reports nothing today, and the ticket's own check — appending a `RulesEditor.tsx` citation to `docs/rules/admin-ui.md` — turns it red on that line. Parentheses join the citation class, for Next.js route groups. Without them `src/app/(payload)/api/openapi.json/route.ts` and the Cloudflare Stream webhook handler matched nothing at all, so a whole route tree was cited and never checked. A glob keeps its `*` out of the class and so still matches nothing, which is what we want of a pattern rather than a path. One `git ls-files` per scan instead of two: `inScopeDocs` now takes the map its caller already holds, which also rules out two disagreeing snapshots of one index. Refs #862 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DZJmVZdzC4UJtcZvxzbJMS
This branch was successfully deployed
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.
Summary
docs/rules/storage.md's## Video thumbnailsdescribed generation at upload time byffmpeg-staticand Sharp. Implement Cloudflare-Native Storage Migration #88 deleted that pipeline on 2025-12-06 and left the paragraph.previewUrlFieldcomposes a Cloudflare Stream or Images URL on read, and this repo generates no thumbnail at all.src/plugins/storage/urlFields.tscarried the same wrong attribution one line above the Cell it wires — comment-only change, no behaviour.Preview
Nothing in this PR is visible in a deploy. These two links are for checking the claim the rewrite makes about the two display surfaces:
previewUrlcolumn, rendered byPreviewUrlThumbnailCellFrameThumbnailhas the<video>fallbackTest results
pnpm lint,tsc --noEmit(src + tests), 2237 unit tests in 165 files+/-line insrc/is a//comment), so no behaviour changedManual verification
The rewrite's factual claims were each checked against source, but two are about rendered behaviour and are cheap to confirm by eye:
<video>.previewUrlbut withhlsUrl/mp4Urlshows the inline<video>; one with neither shows an empty box.Notes for reviewer
The ticket specified the rewrite in full, so the judgement calls here were about what to add beyond it. Three additions came out of the review pass and are worth a look:
previewUrlFieldis not frames-only.videosandfilesmount it with the same defaults and carrypreviewUrlindefaultColumns. The ticket's spec was frames-shaped; documenting it that way would have hidden that a change here moves three list views.image/norvideo/gets the local Payload URL, which serves the whole file — a PDF infileshas apreviewUrlthat is the PDF. Two of three branches invited the wrong inference about the third.<video>fallback is conditional, onisVideo && (mp4Url || hlsUrl). My first draft's table implied it was unconditional, which is the same shape of over-confident claim this ticket exists to remove.Detail — dismissed findings, and what was verified
Dismissed review findings
urlFields.tscomment to one line, dropping the component names. The coupling argument is real — naming two admin components inside a generic factory insrc/plugins/storage/does rot if a third surface appears. Rejected anyway: docs(storage): the video-thumbnail section documents a deleted pipeline #864's acceptance criteria and its verification checklist both requiregit grep -n 'FrameThumbnail' src/plugins/storage/urlFields.tsto print a line, and the vague word "components" was the defect being fixed. Tightened the wording instead and kept both names.**Video** —to**Video.**to match the file. The premise is wrong:docs/rules/storage.md:149already uses the**bold** —form.widthis ignored for video (the Stream helper takes height only). True and a genuine trap, but the section is already the heaviest in the file for its size, and the?height=320vswidth=320,height=320contrast is visible in the text. Left out to hold the length.Videos' separate editor-uploadedthumbnailfield. Different collection, different concern. The headline claim is about generation, which stays true.Security review: the path gate in
.claude/workflow.jsonmatched onsrc/plugins/storage/, so it ran. No findings — the match was on path, not content, and the diff in that path changes no executable line.Verification performed: all 13 factual claims in the new section were checked against source before the first commit, plus the ticket's own three-item checklist (no banned term in the section; every
src/…path it cites resolves;FrameThumbnailnamed inurlFields.ts).comment-lint.mjs --base origin/mainis clean.docs/architecture.md:12already described the Stream thumbnail URL correctly and agrees with the rewrite, so no docs-sync was needed elsewhere.Note on #862: this unblocks its phase-2 guard.
src/lib/videoThumbnailUtils.tswas the one cited path instorage.mdthat did not resolve.Closes #864
🤖 Written by the sydevs autonomous loop — see what this is