feat(thumbnails): 256px proportional, dedicated task, regen endpoint #20
No reviewers
Labels
No labels
agent
blocked
agent
new
agent
review
agent
working
complexity
high
complexity
low
priority
high
priority
low
priority
medium
risk
high
risk
low
risk
medium
type
bug
type
chore
type
feature
type
security
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
tfks/trippin!20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/thumbnails"
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?
Refs: #2
Summary
Splits thumbnail derivation out of
optimize-photointo its owngenerate-thumbnailtask, switches the size policy to a 256px width cap with proportional height (no square crop), and adds a dedicatedPOST /api/photos/:id/regenerate-thumbnailendpoint for [re-]generating a single thumbnail. Documented inwiki/thumbnails.md.Changes
src/lib/pois/tasks.ts— newgenerate-thumbnailtask handler.optimize-photonow writes only the optimized variant + width/height then enqueuesgenerate-thumbnail. Thumbnails are sourced fromurl_optimized(already EXIF-rotated; smaller download), useTHUMBNAIL_WIDTH = 256with proportional height, andwithoutEnlargement: true.src/routes/api/photos/[id]/regenerate-thumbnail.ts— new owner-only endpoint that enqueuesgenerate-thumbnailfor a single photo and returns202with the task id. Mirrors the existingrestore-optimizedpattern.wiki/thumbnails.md— policy, pipeline, regeneration endpoint, and the rationale for sourcing thumbnails from the optimized variant.Test plan
just validate(fmt, lint, type-check, full test suite + coverage, audit, secrets, sast, fuzz) — green.deno checkon touched files.optimize-photoproduces the optimized variant andgenerate-thumbnailproduces a 256px-wide thumbnail at the correct path.POST /api/photos/:id/regenerate-thumbnailas the owner returns 202 + task id; as a non-owner returns 403; unknown id returns 404.