Commit Graph

373 Commits

Author SHA1 Message Date
2569718930@qq.com e7fc3c97cb feat: add scan terminal dashboard components, monitoring panels, and associated utility hooks 2026-05-15 12:52:39 +08:00
2569718930@qq.com 1a284c9990 跑道观测卡片移除机场报文展示 2026-05-15 04:37:40 +08:00
2569718930@qq.com 77488e561a 跑道观测面板每 60 秒自动刷新观测时间 2026-05-15 04:36:45 +08:00
2569718930@qq.com c6f1eac6c1 跑道观测面板添加移动端响应式布局(768px / 480px 断点) 2026-05-15 04:04:54 +08:00
2569718930@qq.com 0f7322dbd8 feat: add RunwayObservationsPanel component to display AMSC airport weather data 2026-05-15 02:28:26 +08:00
2569718930@qq.com 9868784494 移除跑道观测面板刷新按钮,数据随面板加载自动拉取 2026-05-15 02:21:54 +08:00
2569718930@qq.com d4892a5294 feat: add RunwayObservationsPanel component for tracking major Chinese airport runway temperatures 2026-05-15 02:15:03 +08:00
2569718930@qq.com 644b592fe8 修复 MarketOverviewBanner 未使用 fetchBackendApi 导致生产环境 404
组件内裸 fetch() 请求到 Vercel 前端域名,缺少路由 handler 返回 404。
统一使用 fetchBackendApi() 走后端代理,其他 scan-terminal 组件已正确使用。
2026-05-15 02:01:41 +08:00
2569718930@qq.com 4cc579ccb3 feat: add AMSC runway observations 2026-05-15 01:41:49 +08:00
2569718930@qq.com 2ee00f8016 MiMo AI 能力扩展:TAF解读、概率分布解读、异常检测、市场概览
AI 解读字段扩展:
    - 新增 taf_read_zh/en:解读机场预报中影响今日峰值窗口的变化
    - 新增 probability_read_zh/en:描述概率分布形态(最高桶、偏左/偏右)
    - stream max_tokens 900→1200 容纳新输出字段
    - 缓存 key 简化为 METAR原文+观测时间,大幅提升命中率
    - 兜底函数补全 TAF 和概率字段的确定性生成

    异常检测:
    - 纯数学计算,零 AI 延迟:实测温度 vs 全部模型预测上下限
    - 三级告警:breakout_above / breakout_below / deviation

    市场概览:
    - 新增 POST /api/scan/terminal/overview(MiMo 批量解读,缓存10分钟)
    - 前端 MarketOverviewBanner 可折叠横幅(顶栏与标签栏之间)
    - 移动端适配 640px/768px 断点,暗色/亮色双主题

    Scope-risk: MEDIUM — 170 测试通过,TypeScript 零错误,ruff 零告警
    Tested: python -m pytest -q (170 passed), npx tsc --noEmit (0 errors), ruff check .
2026-05-14 22:41:31 +08:00
2569718930@qq.com 6c08a68413 @
性能与用户体验全面优化

    前端性能:
    - 移除 Three.js 依赖(~600KB),天气粒子改为纯 CSS 动画 + Canvas 2D
    - Google Fonts 切换为 next/font 自托管,消除跨域字体请求
    - 合并 ScanTerminalLightTheme.module.css (37KB) 到主 CSS,亮/暗主题统一用 CSS 变量
    - 新增 /api/dashboard/init 聚合端点,首次加载 4 次往返 → 1 次
    - 添加 Service Worker 静态资源缓存,修复 PWA manifest 配置

    用户体验:
    - 新增全局错误边界 error.tsx / global-error.tsx,崩溃不再白屏
    - 决策卡和城市详情的更新时间改为相对时间("15秒前"),每秒自动刷新
    - 数据陈旧时状态标签从青色切换为琥珀色提示

    DEB 算法增强:
    - 市场扫描路径接入 Open-Meteo 多模型数据(ECMWF/GFS/ICON/JMA/HRDPS 等)
    - MAE 计算加入时间衰减(decay_factor=0.85),近期模型误差权重更高

    Scope-risk: MEDIUM — 全量 170 测试通过,前端 TypeScript/build 通过,ruff 零告警
    Tested: python -m pytest -q (170 passed), npx tsc --noEmit (0 errors), npm run build (success), ruff check .
@
2026-05-14 21:31:05 +08:00
2569718930@qq.com 5617e5b112 拆分 FutureForecastModalContent:提取 TodayLayout 组件
- 新建 FutureForecastTodayLayout:封装今日视图双栏布局(左侧卡片+右侧图表)
- FutureForecastModalContent 从 1098 行降至 999 行
- 纯 JSX 提取,不修改任何业务逻辑、状态或数据流

Tested: npx tsc --noEmit ✓
2026-05-14 18:39:10 +08:00
2569718930@qq.com 5ad89b4c29 移除未使用的 HistoryModal 历史对账组件
该组件未被任何地方引用,属于死代码。同时移除关联 CSS Module
及 scan-root-styles.ts 中的 barrel 注册。
2026-05-14 18:13:41 +08:00
2569718930@qq.com ac90ef9206 修复 CSS Module spin 动画::global(spin) 改为本地 @keyframes spin
PostCSS 将 :global(spin) 解析为伪元素 :: 导致 Vercel 构建失败。
改用在每个 CSS Module 中定义本地 @keyframes spin。
2026-05-14 18:06:53 +08:00
2569718930@qq.com c8103179e1 修正市场监控新高提醒:统一数据源并修复 HKO/跑道城市逻辑
- resolveMaxSoFar:HKO 城市优先使用 current.max_so_far(天文台结算锚点)
- trendClass:跑道城市跳过比较(跑道表面温度 vs 空气温度无意义)
- newHigh badge / audio alert:跑道城市屏蔽新高判断
- 所有调用处传入 key 参数确保 HKO fallback 生效
2026-05-14 17:51:08 +08:00
2569718930@qq.com 4f13faa311 优化日内温度曲线图加载性能并修复图标旋转动画
- AiCityTemperatureChart:React.memo 包裹 + useMemo 依赖移除 detail 避免每帧重算
- ScanTerminalCard 等 9 个 CSS Module:animation: spin 改为 :global(spin) 修复 CSS Modules 作用域问题
2026-05-14 17:31:25 +08:00
2569718930@qq.com 8dd9aa59b3 接入新加坡 MSS 1分钟实时温度及 MGM/JMA/FMI/KNMI 高频源到 airport_primary
- 新建 singapore_mss_sources.py:拉取 data.gov.sg 1分钟干球温度(S24 樟宜站)
- country_networks.py:_airport_primary_from_raw 新增 MGM/JMA/FMI/KNMI/SG_MSS 分支
- weather_sources.py:注入 jma_current/fmi_current/knmi_current/singapore_mss_current
- 前端 MonitorPanel:resolveSourceLabel 根据 airport_primary.source_code 显示数据源标签
- 文档:更新 AIRPORT_REALTIME_SOURCES.md 新增新加坡

Tested: ruff check . ✓  npx tsc --noEmit ✓
2026-05-14 17:12:11 +08:00
2569718930@qq.com 96676e7097 修正市场监控温度数据源:接入 NOAA MADIS 5分钟高频数据并优化展示
- 首尔/釜山:隐藏大号跑道温度值,改为"跑道温度"标签(跑道表面温度 ≠ 空气温度)
- US 城市:MADIS HFMETAR 5分钟小数温度接入 airport_primary,前端优先读取
- 其他城市:整数值不再强制 toFixed(1) 追加虚假 .0 精度
- 后端:weather_sources.py 注入 madis_hfmetar_current 到 results
- 后端:country_networks.py 的 _airport_primary_from_raw 新增 MADIS 优先分支
- 文档:更新 AIRPORT_REALTIME_SOURCES.md 新增 11 个 US 城市
- 文档:更新 CLAUDE.md 补充市场监控、高频数据管道、Country Network Provider 架构

Tested: npx tsc --noEmit ✓  ruff check . ✓
2026-05-14 16:00:55 +08:00
2569718930@qq.com c9d03fd3e1 feat: implement dashboard state management, API proxy layer, and modular UI components for weather monitoring and payments 2026-05-14 15:05:13 +08:00
2569718930@qq.com 02add6d994 feat: implement city weather detail API routing, dashboard data models, and monitoring infrastructure 2026-05-14 14:21:28 +08:00
2569718930@qq.com 0e220d890f feat: add component styles for future forecast modal v2 2026-05-14 02:55:16 +08:00
2569718930@qq.com 4bda402270 feat: implement MonitorPanel component for real-time weather monitoring and temperature tracking 2026-05-14 02:47:37 +08:00
2569718930@qq.com 8bfe23138c feat: implement MonitorPanel component with real-time airport weather tracking and concurrency-controlled polling 2026-05-14 02:41:51 +08:00
2569718930@qq.com f5acae3c81 feat: implement ScanTerminalDashboard with integrated monitoring, paywall, and AI-driven city analysis features 2026-05-14 02:32:56 +08:00
2569718930@qq.com 294ac30026 feat: add MonitorPanel component for real-time airport weather tracking and automated refresh coordination 2026-05-14 02:15:49 +08:00
2569718930@qq.com fb4ba622a8 feat: implement MonitorPanel component for tracking real-time airport weather data with automated concurrency and stale-data prioritization 2026-05-14 02:02:30 +08:00
2569718930@qq.com d7d1744313 feat: implement MonitorPanel dashboard component with status indicators and grid view 2026-05-14 02:00:00 +08:00
2569718930@qq.com 357e01be3c feat: add monitor panel component with consolidated CSS root styles 2026-05-14 01:51:55 +08:00
2569718930@qq.com 3529d97d58 移除国内城市(NMC并非机场温度,无用) 2026-05-14 01:41:16 +08:00
2569718930@qq.com 329e3afe38 监控页新增 7 个国内城市(上海/北京/成都等,NMC 5min数据) 2026-05-14 01:37:37 +08:00
2569718930@qq.com 4ab749c136 市场监控新增 11 个美国城市(NY/LA/Chicago/Denver 等) 2026-05-14 01:17:09 +08:00
2569718930@qq.com d2472fa0c2 市场监控 1 分钟强制刷新 11 城数据 2026-05-14 01:13:53 +08:00
2569718930@qq.com 79944432fb MonitorPanel 自动触发未加载城市的 ensureCityDetail 2026-05-14 00:52:14 +08:00
2569718930@qq.com c006d13fea MonitorPanel 从独立 API 改为复用 DashboardStore 数据,砍掉 /api/m 和 /m/json 2026-05-14 00:43:19 +08:00
2569718930@qq.com 7a28810f25 监控页刷新间隔 30s → 60s 2026-05-14 00:32:30 +08:00
2569718930@qq.com c5fdb93ae5 监控页:后端 30s 缓存 + 前端 loading 态 2026-05-14 00:29:51 +08:00
2569718930@qq.com 2202f8e211 砍掉 /m HTML 页面,只保留 /m/json 给 React 组件用 2026-05-14 00:23:03 +08:00
2569718930@qq.com fc48795299 监控页从 iframe 改为原生 React 组件:无加载延迟,30s JSON 轮询 2026-05-14 00:18:26 +08:00
2569718930@qq.com fd12c15518 Monitor tab 中文名+iframe 常驻避免重新加载 2026-05-14 00:13:32 +08:00
2569718930@qq.com 5e653c2ec1 前端接入监控页面:新增 Monitor 标签页 + /api/m 代理 2026-05-14 00:04:26 +08:00
AmandaloveYang ff4c8b0139 修复手机端无法滚动:添加 viewport meta 标签并在移动端允许根容器垂直滚动
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 10:06:12 +08:00
AmandaloveYang 3d4e803488 城市决策卡移除信心指标显示
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 17:33:01 +08:00
AmandaloveYang 52ad2dfde4 AMOS 跑道面板仅限首尔/釜山显示,其余城市无真实 AMOS 数据
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 17:11:57 +08:00
AmandaloveYang 81e9aeb98f fix: remove "Now" vertical line from intraday temperature chart
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 09:05:44 +08:00
2569718930@qq.com 17b93803af 修复业务测试:observedHighBreak 断言适配新的行动指引文案 2026-05-10 20:25:05 +08:00
2569718930@qq.com b26ec05b81 AMOS 跑道温度范围:城市决策卡头部展示"跑道实况 14.6~15.2℃"
后端:
- amos_station_sources.py 新增 runway_temp_range (跑道温度 min,max)
- 取所有有效跑道温度的最小值和最大值

前端:
- CityCardHeader 新增 observedLabel prop(标签自定义)
- 有 AMOS 数据时显示"跑道实况"替代"当前温度"
- 温度展示格式:14.6~15.2℃(跑道温度范围)
- 无 AMOS 时回退原有 METAR 温度显示
2026-05-10 20:19:48 +08:00
2569718930@qq.com f4f613ad02 Fix AMOS runway observations 2026-05-10 19:20:52 +08:00
2569718930@qq.com 40cd8fc2a6 修复机场观测面板不显示 + 放宽 AMOS 展示条件 2026-05-10 19:06:22 +08:00
2569718930@qq.com 3f351ac60c Busan 机场观测面板:METAR 数据兜底展示
问题:AMOS 仅支持仁川 RKSI,釜山 RKPK 无法获取跑道级数据
解决:AmosRunwayPanel 新增 airportCurrent 回退模式

- 有 AMOS 数据时:展示完整跑道卡片网格(首尔/仁川)
- 无 AMOS 时:展示单张机场观测卡片(釜山/所有其他机场)
  包含:温度、风向风速、气压 QNH、能见度
  标注数据来源(METAR/AMOS)和是否过旧
- AirportCurrentConditions 类型新增 pressure_hpa 字段

这样首尔有完整的 4 对跑道数据,釜山至少展示机场官方观测值
2026-05-10 18:58:42 +08:00
2569718930@qq.com 163ad8cb4e 修复 AmosRunwayPanel TS strict null check 2026-05-10 18:40:22 +08:00