Repository navigation
feat: 매장 선택 결과에 선택 지역 지도 범위 추가 - #542
Conversation
매장 선택 화면이 고른 지역으로 지도를 옮길 수 있게 pickupStores 응답에 regionBounds를 싣는다. 화면은 URL의 regionIds만 갖고 ID로 지역을 조회하는 쿼리가 없어 Region 타입 노출 대신 응답에 담음. - SDL: PickupStoreConnection.regionBounds: MapBounds(south·west·north·east). 선택한 2차 지역 중심 좌표의 외곽, 한 곳이면 한 점, 전국·좌표 없음이면 null. 매장 0건·예약 기간 상한 초과에도 옴 - repository: findRegionCenters. 2차 지역만, 활성 여부는 매장 후보 조건과 같게 보지 않음 - 데이터: 2차 83곳 중심 좌표를 카카오 주소 검색의 시군구 대표점으로 채움(scripts/fill-region-centers.ts, coord2regioncode 역검증). 시드 JSON·시드 upsert 반영, 생성기는 재생성 때 좌표를 slug로 이어받음 - 마이그레이션 region_center_coordinates: 좌표가 빈 2차 행만 slug로 채움(관리자 입력 보존, 빈 DB는 변경 없음) - 테스트: service 6건(한 점·다중·좌표 누락·전국·1차/삭제/비활성·0건/상한 초과), resolver 1건, 마이그레이션 4건(83건 일치·반증·보존·빈 DB)
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🩺 NestJS Doctor — 90/100 (Excellent)진단 493건 (error 13).
architecture / security 상위 항목
|
🧹 knip — dead-code 리포트전체 리포트
|
Coverage report
Test suite run success4314 tests passing in 388 suites. Report generated by 🧪jest coverage report action from 9d5b552 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
개요
매장 선택(메인 검색 결과) 화면이 검색한 지역으로 지도를 옮길 수 있도록
pickupStores응답에 선택 지역의 지도 범위(regionBounds)를 싣습니다.regionIds만 가지고 있고, ID로 지역을 조회하는 쿼리가 없습니다. 그래서Region타입에 좌표를 여는 대신 이미 호출하는 응답에 담았습니다.변경 사항
PickupStoreConnection.regionBounds: MapBounds(south·west·north·east)를 추가했습니다. 필드 추가라 FE 파괴적 변경은 없습니다.regionIds비움)이거나 좌표가 있는 2차 지역이 없으면 null입니다.StoreRepository.findRegionCenters를 추가했습니다.region_id IN …)과 같게 보지 않습니다.scripts/fill-region-centers.ts가 좌표가 없는 항목만 채우고, 받은 좌표를coord2regioncode로 되돌려 같은 시군구인지 역검증합니다. 하나라도 어긋나면 파일을 쓰지 않습니다.generate-region-seed.ts)는 다시 만들 때 좌표를 slug로 이어받습니다.region_center_coordinates: 시드를 돌리지 않는 운영 DB를 채웁니다.검증
regionBounds가 실리는지pickupStores를 호출했습니다.참고
플랜 대조
PickupStoreConnection.regionBounds: MapBounds추가MapBounds를store-pickup-stores.graphql에 정의REGION1건이 아니면 실패coord2regioncode역검증, 어긋나면 실패OIDC_KAKAO_CLIENT_ID사용findRegionCenters(2차만, 활성 여부 안 봄, 허용 목록 변경 없음)toRegionBounds)regionIds가 있을 때 범위 계산, 상한 초과 조기 반환에도 포함, 검증 실패는 먼저PickupStoreConnection에regionBounds추가createRegion에center_lat·center_lngoverride