Stabilize AMSC chart detail overlays

This commit is contained in:
2569718930@qq.com
2026-06-15 03:13:08 +08:00
parent 39977e4431
commit 6b9caf8dc2
6 changed files with 152 additions and 6 deletions
@@ -12,6 +12,7 @@ import type {
} from "@/lib/dashboard-types";
import { buildDebBaselinePath } from "@/lib/temperature-chart-paths";
import { DASHBOARD_REFRESH_POLICY_MS } from "@/lib/refresh-policy";
import { buildBrowserBackendHeaders } from "@/lib/backend-api";
import type { CityPatch } from "@/hooks/use-sse-patches";
const ROLLING_WINDOW_BEFORE_MS = 12 * 60 * 60 * 1000;
const ROLLING_WINDOW_AFTER_LIVE_MS = 2 * 60 * 60 * 1000;
@@ -1715,7 +1716,7 @@ function resolveAllBatchWaitersAsNull(
});
}
function fetchCityDetailBatchWithTimeout(
async function fetchCityDetailBatchWithTimeout(
cities: string[],
resolution: string,
forceRefresh: boolean,
@@ -1730,8 +1731,9 @@ function fetchCityDetailBatchWithTimeout(
resolution,
scope: "chart",
});
const headers = await buildBrowserBackendHeaders({ Accept: "application/json" });
return fetch(`/api/cities/detail-batch?${params.toString()}`, {
headers: { Accept: "application/json" },
headers,
signal: controller.signal,
})
.then(async (res) => {