chore(merge): main → dev 동기화 + dev 자체 버그 수정 (PR #180 충돌 해결)#181
Merged
Conversation
* 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
api-server/.env.{env} + ai-server/.{env}.env 2개 파일을
루트 .env.backend.{env} 1개로 통합하여 관리 포인트를 줄임.
- .env.backend.example 추가 (통합 템플릿)
- docker-compose 3개 (dev/staging/prod) env_file 경로 통합
- deploy-backend.sh env 파일 체크 단순화
- 충돌 키 LOG_FORMAT은 compose environment에서 서비스별 오버라이드
Closes #118
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: Meilisearch 에러 메시지 경로 수정 + dev compose ENV 오버라이드 추가 - docker-compose.prod.yml: MEILISEARCH_MASTER_KEY 에러 메시지에서 옛 경로(packages/api-server/.env.prod) → .env.backend.prod로 수정 - docker-compose.yml: dev api 서비스에 ENV=development 명시하여 .env.backend.example 복사 시 production 모드로 뜨는 문제 방지 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: staging Meilisearch MEILI_ENV를 production으로 변경 staging에서 MEILI_ENV=development로 되어있던 것을 production으로 수정. Meilisearch는 development/production 두 모드만 지원. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
main 머지 시 Mac Mini self-hosted runner에서 자동 배포: - path filter: api-server, ai-server, deploy script 변경 시 트리거 - workflow_dispatch로 수동 배포 지원 - 롤백: 빌드 전 :prev 태깅, 실패 시 자동 복원 - health check: api(:8080) + ai(:10000) 최대 5분 대기 - Telegram 알림 (성공/실패) Closes #119 Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
runner 작업 디렉토리에 env 파일이 없어 배포 실패. Mac Mini의 고정 경로에서 checkout 디렉토리로 복사. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ai 컨테이너는 포트 10000을 호스트에 publish하지 않아 호스트에서 curl이 실패함. docker exec로 컨테이너 내부에서 체크. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor(web): Phase 1 — 클라이언트 Supabase 직접 호출을 백엔드 API로 전환
- authStore.ts: .from("users") select/update → getMyProfile()/updateMyProfile()
- useImages.ts: Supabase 직접 쿼리 + fallback 제거 → listPosts() REST API
- usePosts.ts: fetchPostWithSpotsAndSolutions → getPost() REST API
- useSolutions.ts: fetchSolutionsFromSupabase fallback → listSolutions() REST API
Part of #158
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore(web): 미사용 Supabase 파일 삭제
- lib/supabase/storage.ts — 정의만 있고 어디서도 import 안 됨
- lib/supabase/queries/debug/posts.ts — 개발용, production 미사용
Part of #158
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(api-server): UserResponse에 ink_credits/style_dna 추가 + social accounts 엔드포인트
B1: users 엔티티와 UserResponse에 ink_credits, style_dna 필드 추가
B2: GET /users/me/social-accounts 엔드포인트 신규 추가
- user_social_accounts 엔티티 추가
- SocialAccountResponse DTO
- 서비스 + 핸들러 + OpenAPI 등록
Part of #160
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(api-server): B3 user stats 실제 구현 + B5 트렌딩 아티스트 엔드포인트
B3: GET /users/me/stats — stub(0) → 실제 posts/comments/likes count SQL 쿼리
B5: GET /rankings/artists — 트렌딩 아티스트 서버 사이드 SQL 집계
- period: weekly/monthly/all_time
- limit: 최대 50
- artist_name별 post_count + 대표 이미지
Part of #160
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(api-server): B6 유저 Spots + B7 유저 Solutions 엔드포인트 추가
- GET /users/me/spots — 유저의 Spot 목록 (post image_url 포함, 페이지네이션)
- GET /users/me/solutions — 유저의 Solution 목록 (active만, 페이지네이션)
- UserSpotItem, UserSolutionItem DTO 추가
- OpenAPI 등록
Part of #160
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* test(web): Supabase→API 마이그레이션 E2E 테스트 추가
- 메인 피드 로딩 확인
- Explore 무한스크롤 확인
- 포스트 상세 페이지 확인
- 프로필 페이지 확인
- 백엔드 API health 확인
Part of #158
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* test(web): E2E 테스트 수정 — 비인증 환경 대응 + dotenv 로딩
- playwright.config.ts: dotenv 로딩 + api-migration을 chromium-no-auth에서 실행
- api-migration.spec.ts: 비인증 환경에 맞게 테스트 재작성
- 4/4 테스트 통과 확인
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor(web): Phase 1 — 클라이언트 Supabase 직접 호출을 백엔드 API로 전환
- authStore.ts: .from("users") select/update → getMyProfile()/updateMyProfile()
- useImages.ts: Supabase 직접 쿼리 + fallback 제거 → listPosts() REST API
- usePosts.ts: fetchPostWithSpotsAndSolutions → getPost() REST API
- useSolutions.ts: fetchSolutionsFromSupabase fallback → listSolutions() REST API
Part of #158
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore(web): 미사용 Supabase 파일 삭제
- lib/supabase/storage.ts — 정의만 있고 어디서도 import 안 됨
- lib/supabase/queries/debug/posts.ts — 개발용, production 미사용
Part of #158
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolve dev↔main 충돌 (모두 prettier/rustfmt 포맷 차이 또는 dev 신규 기능):
- packages/api-server/src/domains/{rankings,users}/{handlers,service}.rs: 포맷 정렬, 일부 dev 신규 기능
- packages/web/lib/hooks/usePosts.ts, lib/stores/authStore.ts: prettier 포맷
- packages/web/lib/supabase/queries/debug/posts.ts: main에서 삭제 (#161), dev 변경 폐기
- packages/web/playwright.config.ts, tests/api-migration.spec.ts: 포맷
dev 자체 버그 수정 (merge 과정에서 발견):
- src/domains/users/service.rs::get_user_stats — 중복 카운트 로직 제거 (helper fn 호출 후 inline raw SQL이 중복 계산)
- src/openapi.rs — follow_user_handler/unfollow_user_handler/get_follow_status가 #[utoipa::path]인데 paths()에 누락
- src/tests/fixtures.rs::user_model — `ink_credits`/`style_dna` 필드 누락
- src/domains/users/dto.rs (4곳), src/domains/posts/dto_tests.inc::sample_user, src/domains/posts/tests.rs::image_upload_response_serialization — 동일 신규 필드 누락 보강
테스트 보강 (커버리지 65% 게이트 유지):
- follow_user / unfollow_user / check_is_following 단위 + handler 테스트
- get_user_stats / get_user_profile / get_my_profile / get_my_stats 핸들러 not_found 경로
- list_user_spots / list_user_solutions empty 경로
검증:
- cargo test --lib: 999 passed, 0 failed
- cargo clippy -D warnings: clean
- cargo tarpaulin --fail-under 65: 65.45%
- check-migration-sync.sh: DB/코드 일치 (50개)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
PR #180 (dev → main)이 9개 파일 충돌로 막혀 있어, main을 dev로 merge 해서 PR #180을 mergeable 상태로 만듭니다. 동시에 merge 과정에서 발견된 dev 자체의 컴파일/런타임 버그 4개도 함께 수정합니다.
Conflict resolution (9개 파일)
packages/api-server/src/domains/rankings/handlers.rspackages/api-server/src/domains/rankings/service.rspackages/api-server/src/domains/users/handlers.rspackages/api-server/src/domains/users/service.rspackages/web/lib/hooks/usePosts.tspackages/web/lib/stores/authStore.tspackages/web/lib/supabase/queries/debug/posts.tspackages/web/playwright.config.tspackages/web/tests/api-migration.spec.ts대부분 포맷 차이 또는 dev 신규 기능이라 dev 쪽을 채택했고, 삭제된
debug/posts.ts는 main 의 정리를 따랐습니다 (해당 파일을 import 하는 곳 없음 — server 버전만 사용 중).dev 자체 버그 수정
merge 직후
cargo test --lib실행 시 7개 컴파일 에러 + 3개 테스트 실패가 발생했습니다. dev 본인의 누락이라 함께 고쳤습니다.1.
entities::users::Model신규 필드 누락 (5곳)ink_credits: i32,style_dna: Option<JsonValue>필드가 entity 에는 추가됐지만 다음 초기화 코드에서 누락:src/tests/fixtures.rs::user_modelsrc/domains/users/dto.rs(4개 테스트의UserModel/UserResponse초기화)src/domains/posts/dto_tests.inc::sample_user2.
ImageUploadResponse신규 필드 누락image_width,image_height필드 누락:src/domains/posts/tests.rs::image_upload_response_serialization3.
get_user_stats중복 카운트 로직helper fn
count_user_posts/comments/likes_received호출 결과가 곧바로 inline raw SQL 결과로 shadow 됨. helper fn 호출은 결과를 버리는 데드 코드. inline 블록을 제거하고 helper fn 호출만 유지했습니다.4. OpenAPI paths 등록 누락
#[utoipa::path]가 붙은 follow handler 3개가src/openapi.rs::ApiDoc::paths()에 빠져tests::architecture::all_handlers_registered_in_openapi가 실패. 추가:follow_user_handler,unfollow_user_handler,get_follow_status테스트 보강
dev 의 새 코드 (follow/unfollow handlers, list_user_activities 실 구현, list_user_spots/solutions)가 추가되면서 분모가 늘어 커버리지가 64.22%로 떨어졌고, 65% 게이트를 다시 통과시키기 위해 새 기능에 대응하는 단위 테스트를 추가했습니다.
follow_userself / target_not_found / successusers/tests.rs::mock_db_testsunfollow_usersuccesscheck_is_followingtrue / falsefollow_user_handlernot_foundunfollow_user_handlersuccessget_follow_status_handlerreturns_falseget_user_profile / get_my_profile / get_my_statshandler not_foundlist_user_spotsempty /list_user_solutionsemptyget_user_stats_success(4 query mock)list_user_activities_returns_empty(raw SQL count + rows mock)로컬 CI 검증 (
scripts/git-pre-push.sh전 단계 통과)cargo fmt --checkcargo clippy -D warnings(migration / entity / decoded-api)cargo test --libcargo deny checkcargo tarpaulin --fail-under 65check-migration-sync.shNext steps
이 PR이 dev 에 머지되면 PR #180 (dev → main) 의 충돌이 자동으로 해소돼 mergeable 상태가 됩니다.
🤖 Generated with Claude Code