Skip to content

feat(api,web): auto-extract image dimensions on upload (#131)#142

Merged
thxforall merged 5 commits into
devfrom
feature/131-image-dimensions
Apr 9, 2026
Merged

feat(api,web): auto-extract image dimensions on upload (#131)#142
thxforall merged 5 commits into
devfrom
feature/131-image-dimensions

Conversation

@thxforall
Copy link
Copy Markdown
Contributor

Summary

  • Rust backend upload_image()에서 image crate으로 dimension 자동 추출
  • ImageUploadResponseimage_width/image_height 반환
  • create_post, create_try_post 플로우에서 dimension 자동 세팅
  • Frontend: upload 응답에서 dimension 캡처 → create post 요청에 전달
  • item 테이블에 image_width/image_height 컬럼 추가 (마이그레이션)
  • Python backfill 스크립트 (Referer 헤더 포함)
  • DEV DB posts 591건 backfill 완료 (0 missing)

Test plan

  • cargo check 통과 확인
  • TypeScript tsc --noEmit 통과 확인
  • 새 포스트 업로드 → DB에 dimension 자동 저장 확인
  • 기존 포스트 dimension NULL 없음 확인
  • 매거진/솔루션 생성 워크플로우 정상 동작 확인

Related

🤖 Generated with Claude Code

thxforall and others added 5 commits April 9, 2026 16:05
* fix(web): solution 이미지 미표시 수정 (#97) (#98)

* fix(web): use Supabase direct query for solutions instead of Rust proxy

- Replace listSolutions (Orval REST → Rust backend) with direct Supabase
  query in useAllSolutionsForSpots hook
- Make API_BASE_URL optional in server-env.ts to prevent module crash
  when Rust backend is not configured

Fixes #97

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(web): enrich hero posts with spots/solutions data

Hero posts were created with items: [] since the Supabase fallback was
added. Now fetches spots+solutions for hero posts server-side so item
overlay markers appear when a hero card is focused.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(web): Korean search fallback + published filter in search (#102)

- Trigger Supabase fallback when backend returns empty results for
  non-empty query (enables synonym expansion for Korean→English)
- Add post_magazines inner join + created_with_solutions filter to
  search fallback to match browse mode behavior

Fixes #99

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs(git): dev→main 브랜치 워크플로우 정립 (#127)

- GIT-WORKFLOW.md에 브랜치 전략 섹션 추가 (feature→dev→main)
- 긴급 hotfix 예외 플로우 문서화
- CLAUDE.md git workflow 요약 업데이트

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
release: Phase 2 — Auth 안정화, Image Dimensions, 한글 검색 개선
release: Phase 2 batch 2 — Try posts, code review fixes, CI notifications
…ipt (#131)

- Add image dimension extraction in Rust upload_image() using image crate
- Return image_width/image_height in ImageUploadResponse
- Auto-set dimensions in create_post and create_try_post flows
- Frontend: capture dimensions from upload response, pass to create post
- Add item table migration for image_width/image_height columns
- Add Python backfill script for existing posts and items

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
R2 buckets enforce hotlink protection — requests without Referer:
https://decoded.style/ get 403. Add the header to both partial and
full-download paths.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
decoded-app Ready Ready Preview, Comment Apr 9, 2026 10:10am

@thxforall thxforall merged commit 161334f into dev Apr 9, 2026
5 checks passed
@thxforall thxforall deleted the feature/131-image-dimensions branch April 9, 2026 10:11
@github-project-automation github-project-automation Bot moved this from Todo to Done in decoded-monorepo Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant