Move weather summaries out of the dashboard utility bulk

Weather labels, METAR translation, risk badges, and hero meta chips were still embedded in dashboard-utils even though panel, modal, and detail views use them as focused presentation helpers. This moves them into weather-summary-utils while keeping dashboard-utils re-export compatibility.

Constraint: Preserve existing weather/METAR/risk/hero meta wording.

Rejected: Move airport narrative in the same pass | it has broader AI narrative coupling and should be separated independently.

Confidence: high

Scope-risk: narrow

Reversibility: clean

Tested: TypeScript diagnostics for weather-summary-utils, dashboard-utils, PanelSections, DetailPanel, and FutureForecastModal

Tested: npm run build

Not-tested: Visual snapshot of every weather icon/label combination.
This commit is contained in:
2569718930@qq.com
2026-04-28 12:17:42 +08:00
parent 5dc39b1573
commit a77d613c2b
5 changed files with 208 additions and 193 deletions
@@ -26,11 +26,11 @@ import {
import { getTemperatureChartData } from "@/lib/chart-utils";
import {
getFutureModalView,
getWeatherSummary,
} from "@/lib/dashboard-utils";
import { getModelView, getProbabilityView } from "@/lib/model-utils";
import { getTodayPaceView } from "@/lib/pace-utils";
import { dashboardClient } from "@/lib/dashboard-client";
import { getWeatherSummary } from "@/lib/weather-summary-utils";
import {
normalizeObservationSourceCode,
normalizeObservationSourceLabel,