feat: implement runway temperature charting logic and UI components for scan terminal dashboard

This commit is contained in:
2569718930@qq.com
2026-05-27 08:07:49 +08:00
parent 79d94bed5f
commit 65fe2d7361
4 changed files with 131 additions and 109 deletions
@@ -15,6 +15,10 @@ export function runTests() {
path.join(projectRoot, "components", "dashboard", "scan-terminal", "GridLayoutSelector.tsx"),
"utf8",
);
const chartSource = fs.readFileSync(
path.join(projectRoot, "components", "dashboard", "scan-terminal", "LiveTemperatureThresholdChart.tsx"),
"utf8",
);
assert(
dashboardSource.includes("MAX_TERMINAL_CHARTS = 9"),
@@ -46,4 +50,9 @@ export function runTests() {
dashboardSource.includes("handleSelectCityForSlot(slotIndex, null);"),
"stale saved chart slots must render the empty city picker instead of a row=null Temperature Chart",
);
assert(
chartSource.includes("setLiveTemp(null);") &&
chartSource.includes("lastAppliedPatchRevisionRef.current = 0;"),
"switching city slots must clear the previous live temperature so Fahrenheit values cannot leak into Celsius charts",
);
}