Commit Graph

84 Commits

Author SHA1 Message Date
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
2569718930@qq.com 2ead56f59d Simplify detail panel loading state 2026-04-16 13:21:29 +08:00
2569718930@qq.com 4bfd2534bb Allow free users to load city detail panels 2026-04-16 00:30:12 +08:00
2569718930@qq.com c4b45be757 Remove Polymarket price integration from dashboard 2026-04-15 16:30:13 +08:00
2569718930@qq.com c55b83a134 Remove dashboard prewarm requests 2026-04-15 15:51:08 +08:00
2569718930@qq.com c66b9f898d Refresh Busan snapshots and prefer populated nearby stations 2026-04-15 13:57:27 +08:00
2569718930@qq.com 2e2c55d77a Add market detail depth caching for dashboard data 2026-04-14 12:03:37 +08:00
2569718930@qq.com baaccc6636 feat: implement multi-source weather data collection system and dashboard frontend with integrated analysis services. 2026-04-13 18:42:27 +08:00
2569718930@qq.com 41cfb65b92 Show queued subscription access and fix forecast time plotting 2026-04-13 16:35:22 +08:00
2569718930@qq.com 1d54f44189 Speed up intraday modal loading and add sync status 2026-04-13 11:19:24 +08:00
2569718930@qq.com f0940b9c8b Speed up JMA nearby refresh and link Tokyo to 10-minute data 2026-04-13 11:02:45 +08:00
2569718930@qq.com f7f6ba39f7 Refresh nearby stations after map idle 2026-04-12 21:03:16 +08:00
2569718930@qq.com a27ae564fb Load nearby stations before opening intraday analysis 2026-04-12 20:49:51 +08:00
2569718930@qq.com a0adf05d1e Delay background preload until map interaction stops 2026-04-12 10:44:03 +08:00
2569718930@qq.com 627bb8aa06 Prioritize homepage summary preloading for Asia and Europe 2026-04-12 10:42:00 +08:00
2569718930@qq.com 77b4d7b341 feat: implement METAR data collection service and dashboard infrastructure 2026-04-11 20:11:01 +08:00