[feat] solution: 지역 이야기 생성 · 발행본 섹션 손질 · 마이그레이션 주석 축약

- 지역 이야기(가요·인물·연표·엽서·퀴즈) 생성 경로: story_service · grounding/story ·
  section_prompts. 지금까지 만들 자리가 없어 시안에만 손으로 넣은 3만 자였다
- 발행본 섹션: ItinerarySection · Carousel 레일 자동재생(use-rail-autoplay) ·
  Festival · LocalGuide · Weather · Gallery · Header/Footer
- 목업 payload 를 payloads-mockup/ 으로 분리 — 발행 대상과 섞이지 않게
- DB 새 구조 후속: site_payload · local_content_crud 조인 정리 · 테스트
- 마이그레이션 주석 축약: 9개 파일 합계 주석 비율 48% → 25%.
  실측과 밟은 함정만 남기고 논증은 커밋 메시지로 옮겼다

검증: site·frontend 빌드 통과

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
minaChoiandClaude Opus 5 committed 2026-09-10 14:36:00 +09:00
1 parent 3910feddfb
commit 328d9e18ee
58 files changed
+5625 -412

No files matched your search

+18 -3
View File
@@ -45,6 +45,21 @@ export function youtubeSearchUrl(query: string): string {
return `https://www.youtube.com/results?search_query=${encodeURIComponent(query)}`;
}
/**
* 지도 주소에 실을 이름.
*
* ★ 쉼표를 뺀다 (2026-09-09, 사장님: "카카오 길찾기에서 현위치만 나오고 도착지 안나옴")
* 카카오 `link/to/{이름},{위도},{경도}` 와 네이버 `{경도},{위도},{이름}` 은 둘 다 쉼표로
* 칸을 가른다. 업소 이름이 "스테이,머뭄" 이면 칸이 하나 늘어나는데 카카오는 이름이 맨 앞이라
* **위도 자리에서 "머뭄" 을 읽고 목적지를 통째로 버린다** — 출발지(현위치)만 있는 길찾기
* 화면이 열린 게 이 때문이다. `encodeURIComponent` 가 %2C 로 바꿔도 같다(카카오가 먼저 디코딩).
* 쉼표는 이름을 알아보는 데 없어도 되는 글자라 공백으로 바꾼다 — 화면의 상호는 그대로다.
* ★ 티맵은 쿼리 파라미터(`goalname=`)라 쉼표가 칸을 가르지 않는다. 그래서 안 건다.
*/
function mapLabel(name: string): string {
return name.replace(/,/g, ' ').replace(/\s+/g, ' ').trim();
}
/**
* 카카오맵 **길찾기**. 좌표가 있으면 목적지가 찍힌 길찾기 화면으로 바로 열린다.
*
@@ -55,7 +70,7 @@ export function kakaoDirectionsUrl(name: string, lat?: number, lng?: number): st
if (lat == null || lng == null) {
return `https://map.kakao.com/link/search/${encodeURIComponent(name)}`;
}
return `https://map.kakao.com/link/to/${encodeURIComponent(name)},${lat},${lng}`;
return `https://map.kakao.com/link/to/${encodeURIComponent(mapLabel(name))},${lat},${lng}`;
}
/**
@@ -79,7 +94,7 @@ export function naverRouteUrl(
to: {name: string; lat: number; lng: number},
): string {
const point = (p: {name: string; lat: number; lng: number}) =>
`${p.lng},${p.lat},${encodeURIComponent(p.name)}`;
`${p.lng},${p.lat},${encodeURIComponent(mapLabel(p.name))}`;
// ★ 수단은 차(car)다. 오시는 길(naverDirectionsUrl)이 대중교통인 것과 반대인데,
// 그건 "방문자 → 업소"라 대중교통을 아는 사람이 적어서였고, 여기는 일정 안의 구간이다 —
// 선유도·장자도처럼 버스로는 답이 안 나오는 다리가 섞여 있다.
@@ -90,7 +105,7 @@ export function naverDirectionsUrl(name: string, lat?: number, lng?: number): st
if (lat == null || lng == null) {
return `https://map.naver.com/p/search/${encodeURIComponent(name)}`;
}
return `https://map.naver.com/p/directions/-/${lng},${lat},${encodeURIComponent(name)}/-/transit`;
return `https://map.naver.com/p/directions/-/${lng},${lat},${encodeURIComponent(mapLabel(name))}/-/transit`;
}
/**