feat: media upload limits, hero background slides, admin editor rework #2

Merged
iec-admin merged 1 commit from claw/media-admin-rework-a3f1 into main 2026-09-11 22:21:02 +00:00
Contributor

Closes #1.

What's in it

  • Shared media upload pipeline — src/lib/media/limits.ts centralises size/type validation and the accept strings; the new MediaUploader component (useUpload, UploadOverlay, UploadError) replaces per-editor upload handling in the Homepage, About, Contact and Products editors. /api/admin/upload runs the same validation server-side as the authoritative pass.
  • Hero background — HeroBackground extracted from Hero so the hero can cycle multiple slides.
  • Image serving — /api/images/[filename] reworked for sharp-backed transforms and caching.
  • Content model — homepage content model, defaults and Zod schema updated for the new fields; admin editors mirror the frontend layout changes.

Verification

  • npm run type-check — clean
  • npm run build — green, all 39 routes compiled

Five throwaway Playwright debug scripts that were sitting untracked at the repo root were moved out rather than committed.

🤖 Generated with Claude Code

Closes #1. ## What's in it - **Shared media upload pipeline** — `src/lib/media/limits.ts` centralises size/type validation and the accept strings; the new `MediaUploader` component (`useUpload`, `UploadOverlay`, `UploadError`) replaces per-editor upload handling in the Homepage, About, Contact and Products editors. `/api/admin/upload` runs the same validation server-side as the authoritative pass. - **Hero background** — `HeroBackground` extracted from `Hero` so the hero can cycle multiple slides. - **Image serving** — `/api/images/[filename]` reworked for sharp-backed transforms and caching. - **Content model** — homepage content model, defaults and Zod schema updated for the new fields; admin editors mirror the frontend layout changes. ## Verification - `npm run type-check` — clean - `npm run build` — green, all 39 routes compiled Five throwaway Playwright debug scripts that were sitting untracked at the repo root were moved out rather than committed. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Add a shared media upload pipeline: src/lib/media/limits.ts centralises
size/type validation and the accept strings, and the new MediaUploader
component (useUpload, UploadOverlay, UploadError) replaces the per-editor
upload handling in the Homepage, About, Contact and Products editors. The
upload route runs the same validation server-side as the authoritative pass
for anything reaching it another way.

Extract HeroBackground from Hero so the hero can cycle multiple slides, and
rework /api/images/[filename] for sharp-backed transforms and caching.

Update the homepage content model, defaults and Zod schema for the new
fields, and mirror the frontend layout changes in the admin editors.

close #1

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
iec-admin deleted branch claw/media-admin-rework-a3f1 2026-09-11 22:21:02 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
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
martin/ballantyne-www!2
No description provided.