Move model views out of the dashboard utility bulk
Probability and multi-model view adapters were still embedded in dashboard-utils even though table, panel, modal, and city-card views use them as small pure selectors. This moves them into model-utils and keeps dashboard-utils re-export compatibility. Constraint: Preserve model/probability return shapes and existing fallback behavior. Rejected: Merge model-utils with chart-utils | model selectors and chart data preparation change at different rates. Confidence: high Scope-risk: narrow Reversibility: clean Tested: TypeScript diagnostics for model-utils, dashboard-utils, and PanelSections Tested: npm run build Not-tested: Bundle analyzer size comparison.
This commit is contained in:
@@ -26,10 +26,9 @@ import {
|
||||
import { getTemperatureChartData } from "@/lib/chart-utils";
|
||||
import {
|
||||
getFutureModalView,
|
||||
getModelView,
|
||||
getProbabilityView,
|
||||
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 {
|
||||
|
||||
@@ -8,10 +8,7 @@ import type {
|
||||
ScanOpportunityRow,
|
||||
} from "@/lib/dashboard-types";
|
||||
import { getLocalizedCityName } from "@/lib/dashboard-home-copy";
|
||||
import {
|
||||
getModelView,
|
||||
getProbabilityView,
|
||||
} from "@/lib/dashboard-utils";
|
||||
import { getModelView, getProbabilityView } from "@/lib/model-utils";
|
||||
import { getTodayPaceView } from "@/lib/pace-utils";
|
||||
import {
|
||||
formatTemperatureValue,
|
||||
|
||||
@@ -15,11 +15,10 @@ import {
|
||||
import { getTemperatureChartData } from "@/lib/chart-utils";
|
||||
import {
|
||||
getHeroMetaItems,
|
||||
getModelView,
|
||||
getProbabilityView,
|
||||
getRiskBadgeLabel,
|
||||
getWeatherSummary,
|
||||
} from "@/lib/dashboard-utils";
|
||||
import { getModelView, getProbabilityView } from "@/lib/model-utils";
|
||||
import {
|
||||
normalizeObservationSourceCode,
|
||||
normalizeObservationSourceLabel,
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
useCityMarketScan,
|
||||
} from "@/components/dashboard/scan-terminal/use-ai-city-card-data";
|
||||
import type { CityDetail, ScanOpportunityRow } from "@/lib/dashboard-types";
|
||||
import { getModelView } from "@/lib/dashboard-utils";
|
||||
import { getModelView } from "@/lib/model-utils";
|
||||
import { getTodayPaceView } from "@/lib/pace-utils";
|
||||
import { formatTemperatureValue } from "@/lib/temperature-utils";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user