Commit Graph

99 Commits

Author SHA1 Message Date
2569718930@qq.com 9a49ff3f5e 新增终端大洲分组与移动端卡片 CSS 模块
包含分组标题行、移动端 Tab 隐藏滚动条、信号卡片样式及浅色主题适配。
2026-05-25 01:55:55 +08:00
2569718930@qq.com e4d123d94d 重构首页为机构落地页,新增终端路由,时区感知 Polymarket 市场发现 2026-05-25 00:16:53 +08:00
2569718930@qq.com 864b1fa1f9 修复前端长时间挂机内存累积:城市缓存 LRU 逐出 + AI 预测缓存上限
Constraint: cityDetailsByName/citySummariesByName/cityDetailMetaByName 只增不减,52 城全量可达 ~5MB+
Constraint: aiCityForecastStateCache 无上限,随城市×日期组合膨胀
Tested: tsc --noEmit OK, ruff OK, pytest 184 passed
2026-05-23 21:18:32 +08:00
2569718930@qq.com 3bad968844 修复地图瓦片长时间挂机后加载失败:Observer 去重 + tileerror 重试
Constraint: MutationObserver subtree=true 导致任意 class 变化触发全量瓦片重载,长期运行触发 CDN 限流
Tested: tsc --noEmit OK, ruff OK, pytest 184 passed
2026-05-23 21:02:54 +08:00
2569718930@qq.com 72e93f8e93 Optimize multi-model caching and frontend revalidation 2026-05-20 08:58:16 +08:00
2569718930@qq.com 9d6eb54a4f 移除分布视图地图点击时的 flyTo 放大动画 2026-05-19 17:09:59 +08:00
2569718930@qq.com 476a4f85d8 修复移动端点击城市列表触发 Leaflet flyTo NaN 崩溃:隐藏地图容器跳过动画 2026-05-19 12:41:38 +08:00
2569718930@qq.com b93a75516d 移除未使用的 Groq 和 Meteoblue 服务代码及配置 2026-05-19 00:05:07 +08:00
2569718930@qq.com 8ade6dd7d2 Improve scan decision card hydration 2026-05-17 18:57:02 +08:00
2569718930@qq.com 5e8548999a feat: implement ScanTerminalDashboard UI and state management with supporting tests 2026-05-15 15:02:15 +08:00
2569718930@qq.com 747c8aa401 feat: tune scan dashboard and telegram monitor 2026-05-15 14:36:43 +08:00
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 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 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 2b2784d811 数据链路 P2 修复:stale-while-revalidate + 扫描数据复用
P2-7 stale-while-revalidate:
- ensureCityDetail 过期缓存不再阻塞等待刷新
- 立即返回缓存数据,后台异步更新
- 用户打开已有缓存的城市时不再看到 loading spinner

P2-8 扫描终端数据复用:
- 新增 store.preloadCityFromRow():从 ScanOpportunityRow 预填充 cityDetails 缓存
- handleSelectRow / handleMapCitySelect / handleOpenDecisionRow 均调用预加载
- 用户从地图/列表/决策卡选城市后,详情面板立即显示缓存数据
- 后台自动拉取完整 detail(stale-while-revalidate)

Tested: npx tsc --noEmit
2026-05-10 17:00:12 +08:00
2569718930@qq.com c0bb2acf78 修复数据链路 P0 瓶颈:缓存炸弹、Context 重渲染、LGBM 循环、TTL 不匹配
P0-1 sessionStorage 限制:
- writeCityDetailCacheBundle 只保留最近 3 个城市的详情
- 避免 3-10MB JSON 序列化阻塞主线程

P0-2 Context 拆分:
- 新增 CityDetailsContext 独立管理 cityDetailsByName 变更
- 新增 useCityDetails hook,只订阅详情的组件不再因 cities/proAccess 变化重渲染
- DashboardStoreContext 保持不变,向后兼容

P0-3 扫描终端 TTL:
- SCAN_TERMINAL_PAYLOAD_TTL_SEC 30s → 120s
- 匹配 ThreadPoolExecutor(4) x 60 城的实际重算耗时

P0-4 LGBM 循环依赖:
- LGBM 预测值不再作为 DEB 输入参与权重计算
- 保留为独立参考字段 lgbm.prediction 输出给前端展示
- 消除 DEB → LGBM 训练 → DEB 的循环

新增 docs/data-architecture-review.md 完整数据链路审查报告

Tested: npx tsc --noEmit, python -m ruff check .
2026-05-10 16:48:28 +08:00
2569718930@qq.com e374ad4bf0 feat: add AI city forecast terminal and integration components 2026-04-26 10:43:14 +08:00
2569718930@qq.com 312b366a50 feat: implement PolyWeather dashboard UI with Leaflet map integration and backend data collection support 2026-04-26 10:22:11 +08:00
2569718930@qq.com 1ee8408b1f feat: implement Leaflet map hook and AI-assisted city card forecast view for dashboard 2026-04-26 10:13:44 +08:00
2569718930@qq.com 0f23d8af9d feat: implement dashboard types, Polymarket data collection, and decision utilities for AI-driven city weather analysis 2026-04-26 09:40:02 +08:00
2569718930@qq.com 1595f4a92e feat: implement ScanTerminalDashboard with AI-driven city forecast streaming and opportunity tracking 2026-04-26 08:12:31 +08:00
2569718930@qq.com b25c9312da feat: add multi-model Open-Meteo data collection and implement scan terminal dashboard service 2026-04-26 06:55:16 +08:00
2569718930@qq.com 901b870240 feat: implement scan terminal service with caching and add corresponding dashboard UI components 2026-04-26 05:58:07 +08:00
2569718930@qq.com ce0f7629a2 feat: implement scan terminal dashboard with AI-driven city analysis and state management 2026-04-26 03:42:13 +08:00
2569718930@qq.com 3237f95e8c feat: implement scan terminal dashboard with real-time opportunity tracking and visualization components 2026-04-26 00:24:11 +08:00
2569718930@qq.com d5fb40a544 feat: implement weather dashboard components, state management, and API routes for terminal scanning and assistant chat 2026-04-25 06:42:24 +08:00
2569718930@qq.com 467f736602 feat: implement dashboard store and API routes for city market scanning and analysis 2026-04-24 12:46:44 +08:00
2569718930@qq.com c05cdd17c6 feat: implement dashboard store and scan terminal components for city market analysis 2026-04-24 06:31:29 +08:00
2569718930@qq.com ca81fda287 feat: implement analysis service, dashboard components, and data collection utilities for PolyWeather 2026-04-23 21:10:22 +08:00
2569718930@qq.com 54b326ff42 feat: implement comprehensive Polymarket weather analysis service with frontend dashboard and market scanning capabilities 2026-04-23 20:45:32 +08:00
2569718930@qq.com 4f57d4ed1a feat: implement PolyWeather dashboard core components, state management, and API integration 2026-04-23 19:40:38 +08:00
2569718930@qq.com 73eeb11b88 feat: implement PolyWeather dashboard components and state management store 2026-04-23 10:31:09 +08:00
2569718930@qq.com e4d43ddf8c Remove view-all links and preserve manual map zoom 2026-04-23 06:08:10 +08:00
2569718930@qq.com 7575891a00 Improve homepage light theme map 2026-04-23 05:20:31 +08:00
2569718930@qq.com df40749e62 Retry homepage city loading 2026-04-23 00:09:11 +08:00
2569718930@qq.com c3ca20c849 Hydrate homepage market data 2026-04-23 00:02:25 +08:00
2569718930@qq.com e3a9f7fb00 Show full city card on explicit focus 2026-04-22 23:34:27 +08:00
2569718930@qq.com 4bab7d1138 Make city clicks update homepage focus 2026-04-22 23:24:20 +08:00
2569718930@qq.com d1fa49ee35 Fix city-local nearby station time labels 2026-04-19 18:45:25 +08:00
2569718930@qq.com 7e2209e928 Include UTC offsets in city and nearby observation times 2026-04-19 14:47:18 +08:00
2569718930@qq.com b16a8b51b6 Improve nearby station timing labels 2026-04-19 02:44:18 +08:00
2569718930@qq.com fbbd13b1c3 Add nearby station timing sync labels 2026-04-19 02:38:34 +08:00
2569718930@qq.com f521cb537e Show stale detail blocker while refreshing city data 2026-04-18 23:14:25 +08:00
2569718930@qq.com bc09a3753c Fix today analysis modal routing 2026-04-17 20:40:17 +08:00
2569718930@qq.com ce7a037b6d Fix intraday modal races and METAR temperature fallbacks 2026-04-17 18:05:52 +08:00
2569718930@qq.com e2cb0cfe5e Add professional intraday meteorology analysis 2026-04-16 17:13:53 +08:00
2569718930@qq.com 46b0e63ffd Prefer METAR over NMC for city observation display 2026-04-16 15:53:00 +08:00
2569718930@qq.com 25424700ce Restore observed temperatures on map and trend charts 2026-04-16 15:29:26 +08:00
2569718930@qq.com c0e5307893 Add cached dashboard prewarm hints for priority cities 2026-04-16 15:05:14 +08:00