Guide cover image (#18) #29
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MassiveDynamic/kataba!29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/18-guide-cover-image"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #18
An optional 4:3 cover image represents a guide in category grids (GLOSSARY: Cover Image); without one the guide keeps its coloured tile, with no fallback to step images.
CoverImagemodel (one per guide), stored like a step image (ADR-0006): the original is kept for re-cropping, and each crop gets its own id, so immutable caching stays truthful. Migration20261102500000_add_cover_image.src/coverImages/actions.ts) reuse the step-image pipeline (readUpload,renderVariants, file helpers). They checkcanEditGuide(owner, any author in wiki mode, admins) and are serialised by a lock on the guide row./mediaserves step and cover images; the helpers are now namedimageAccess/imageHref.CropDialog.Tileuses a plain<img>with a thumb/medium srcset instead ofnext/image, which would cache guarded media past the visibility check. This also affects category tiles.Tests: GuideListing (cover vs. coloured tile), the shared
readUploadhelper, and access rules for covers. Upload, re-crop (old variants 404) and remove were checked by hand in the dev app.Follow-ups from review, not done here: move the shared image code from
src/stepImages/to e.g.src/images/; let re-cropping step and cover images share one function.🤖 Generated with Claude Code