From 882c7f06dc50107afb9965fc08ec3b16818464d5 Mon Sep 17 00:00:00 2001 From: Mina Choi Date: Tue, 27 Oct 2026 13:14:29 +0900 Subject: [PATCH 1/4] =?UTF-8?q?fix:=20=EB=8B=A8=ED=92=8D=20=EC=A7=80?= =?UTF-8?q?=EB=8F=84=20=EB=82=A8=EC=9D=B4=EC=84=AC=20=EC=A4=91=EB=B3=B5=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0(67=EA=B3=B3),=20=EB=82=A0=EC=A7=9C=20?= =?UTF-8?q?=EB=94=B0=EB=9D=BC=20=EA=B9=A8=EC=A7=80=EB=8D=98=20=EB=85=B8?= =?UTF-8?q?=EC=9D=84=20=EC=B9=B8=C2=B7=EB=B0=A9=EC=9C=84=EA=B0=81=20?= =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8=EB=A5=BC=20=EA=B3=84=EC=A0=88?= =?UTF-8?q?=EA=B3=BC=20=EC=83=81=EA=B4=80=EC=97=86=EC=9D=B4=20=EB=A7=9E?= =?UTF-8?q?=EA=B2=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/tests/test_sky_api.py | 3 ++- backend/tests/test_weather_today.py | 10 ++++++++-- frontend/seo/foliage_2026.json | 10 ---------- frontend/src/b/FoliagePage.tsx | 2 +- frontend/src/b/foliage.ts | 2 +- 5 files changed, 12 insertions(+), 15 deletions(-) diff --git a/backend/tests/test_sky_api.py b/backend/tests/test_sky_api.py index 659a887..5f5ddec 100644 --- a/backend/tests/test_sky_api.py +++ b/backend/tests/test_sky_api.py @@ -49,7 +49,8 @@ async def test_sky_view_scores_three_days_with_spots(monkeypatch, clean): assert body["sunset"]["confidence"] == 1 assert len(body["days"]) == 3 assert [s["name"] for s in body["spots"]] == ["망원한강공원", "선유도공원", "하늘공원"] - assert 255 <= body["sunset_azimuth"] <= 280 + # 서울 해 지는 방위는 한 해 동안 240°(동지)~300°(하지) 사이 + assert 240 <= body["sunset_azimuth"] <= 300 plan = body["plan"] assert plan["verdict"] == "go" and plan["headline"] == "나가 볼 만해요" and plan["when"] in ("오늘", "내일") assert "적당히" in plan["reason"] diff --git a/backend/tests/test_weather_today.py b/backend/tests/test_weather_today.py index ee64eb9..c1ee9f6 100644 --- a/backend/tests/test_weather_today.py +++ b/backend/tests/test_weather_today.py @@ -8,7 +8,9 @@ from sqlalchemy import text import services.weather_service as weather_service from common.cache.redis_client import REDIS from common.database.db_session_manager import DB_SESSION_MNG -from common.utils.kma_time import kst_midnight, latest_vilage_base, now_kst +from common.utils.kma_time import KST, kst_midnight, latest_vilage_base, now_kst +from crud.region_crud import RegionCRUD +from services.calc.sun import sun_times from services.external.kma import day_start_base from router.router import app @@ -57,7 +59,11 @@ async def test_today_fetches_stores_and_returns_8_slots(monkeypatch, clean_regio assert [s["label"] for s in body["slots"]] == ["0시", "3시", "6시", "9시", "12시", "15시", "18시", "21시"] assert all(s["temp_c"] == 18 for s in body["slots"]) assert body["slots"][0]["icon"] == "moon" - assert body["slots"][6]["icon"] == "sunset" and body["slots"][6]["note"] == "노을" + # 해 지는 시각이 든 3시간 칸이 노을 (여름엔 18시 칸, 늦가을·겨울엔 15시 칸) + _, region = await DB_SESSION_MNG.execute_lambda(lambda s: RegionCRUD().get(s, REGION)) + at = sun_times(now_kst().date(), float(region.lat), float(region.lon)).sunset_at.astimezone(KST) + dusk = body["slots"][at.hour // 3] + assert dusk["icon"] == "sunset" and dusk["note"] == "노을" assert len(calls) == 2 diff --git a/frontend/seo/foliage_2026.json b/frontend/seo/foliage_2026.json index fb2b69d..e56cc22 100644 --- a/frontend/seo/foliage_2026.json +++ b/frontend/seo/foliage_2026.json @@ -547,16 +547,6 @@ "basis": "가장 가까운 산림청 예측 지점(수리산, 단풍나무류) 날짜", "coord_point": "경복궁" }, - { - "name": "남이섬", - "kind": "ginkgo", - "region": "강원 춘천", - "lat": 37.79627, - "lon": 127.52549, - "peak": "2026-10-27", - "basis": "가장 가까운 산림청 예측 지점(강원도립화목원, 은행나무) 날짜", - "coord_point": "남이섬" - }, { "name": "덕수궁 돌담길", "kind": "ginkgo", diff --git a/frontend/src/b/FoliagePage.tsx b/frontend/src/b/FoliagePage.tsx index 5134820..b88ef90 100644 --- a/frontend/src/b/FoliagePage.tsx +++ b/frontend/src/b/FoliagePage.tsx @@ -52,7 +52,7 @@ function Marker({ p, sel }: { p: Pt; sel: boolean }) { ) } -/** 단풍 지도 페이지: 명소 68곳을 지도에서 확대해 보고 목록으로 고른다. 한 손가락은 확대 전엔 페이지 스크롤, 확대 뒤엔 지도 이동 */ +/** 단풍 지도 페이지: 명소 67곳을 지도에서 확대해 보고 목록으로 고른다. 한 손가락은 확대 전엔 페이지 스크롤, 확대 뒤엔 지도 이동 */ export function FoliagePage() { const navigate = useNavigate() const [params] = useSearchParams() diff --git a/frontend/src/b/foliage.ts b/frontend/src/b/foliage.ts index 77fbc83..d4da2af 100644 --- a/frontend/src/b/foliage.ts +++ b/frontend/src/b/foliage.ts @@ -52,7 +52,7 @@ export const PROVINCES = ( export const md = (iso: string) => `${Number(iso.slice(5, 7))}/${Number(iso.slice(8, 10))}` const province = (m: Spot) => m.region.split(' ')[0].split('·') -/** 오늘(한국 시각) 기준 명소 68곳과 단계. 단풍철이 아니면 inSeason 이 false */ +/** 오늘(한국 시각) 기준 명소 67곳과 단계. 단풍철이 아니면 inSeason 이 false */ export function useFoliage() { const [today] = useState(() => { const t = kst(new Date()) From fcc4163e151a8159d3dda7dc472962d3d5ee6b29 Mon Sep 17 00:00:00 2001 From: Mina Choi Date: Tue, 27 Oct 2026 13:14:29 +0900 Subject: [PATCH 2/4] =?UTF-8?q?feat:=20=ED=99=88=20=ED=99=94=EB=A9=B4=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20=EB=B0=B0=EB=84=88=EB=A5=BC=20=ED=8F=AC?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EC=82=AC=EC=9D=B4=20=ED=95=9C=20=EC=A4=84?= =?UTF-8?q?=20=EB=9D=A0=EB=A1=9C=20=E2=80=94=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=ED=95=98=EB=82=98(=EC=B6=94=EA=B0=80)=C2=B7=EB=8B=AB=EA=B8=B0?= =?UTF-8?q?=EB=8A=94=20=C3=97,=20=EC=84=A4=EB=AA=85=20=ED=95=9C=20?= =?UTF-8?q?=EC=A4=84=EB=A1=9C=20=EC=A4=84=EC=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/b/installBanner.tsx | 39 ++++++++++++++++---------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/frontend/src/b/installBanner.tsx b/frontend/src/b/installBanner.tsx index 4c85dda..b583368 100644 --- a/frontend/src/b/installBanner.tsx +++ b/frontend/src/b/installBanner.tsx @@ -1,6 +1,8 @@ import { useEffect, useState, type ReactNode } from 'react' import { track } from '../lib/analytics' +import { cx } from '../lib/utils' import { dismiss, dismissed, platform, promptInstall, useCanPrompt, useInstall, useInstallable } from './install' +import { TAP44 } from './ui' const SITE = 'https://weather.o2o.kr' @@ -17,27 +19,26 @@ export function InstallBanner() { if (hidden) return null return ( -