Commit Graph

1727 Commits

Author SHA1 Message Date
2569718930@qq.com b3496bed2d feat: add LiveTemperatureThresholdChart component with SSE-driven data synchronization and automated polling fallback 2026-05-26 23:28:43 +08:00
2569718930@qq.com b6194b4756 feat: implement live temperature threshold chart logic with auto-visibility policies and snapshot testing 2026-05-26 23:12:48 +08:00
2569718930@qq.com 645e304b3e feat: implement SSE-based real-time event distribution system with replay support and heartbeat functionality 2026-05-26 22:27:55 +08:00
2569718930@qq.com 5c6ffa4742 docs: shorten realtime patch replay retention 2026-05-26 22:10:15 +08:00
2569718930@qq.com ff104cfc31 docs: design production realtime sse patches 2026-05-26 22:08:44 +08:00
2569718930@qq.com 7a9dc35c63 Settlement 标签改为显示当地官方站点名称
- HourlyForecast 新增 settlementStationLabel 字段
- 从 detail JSON settlement_station.settlement_station_label 解析
- 台北显示 中央气象署台北站,其他城市有官方站名的也会显示
2026-05-26 21:30:33 +08:00
2569718930@qq.com a17ba0efb9 docker-compose 加 json-file 日志上限 50m×3,防止容器日志吃光磁盘 2026-05-26 20:58:30 +08:00
2569718930@qq.com d029d5c4e7 Auth session 持久化 + 多分辨率跑道图表 + 拖拽缩放
- middleware: refreshMiddlewareSession 前置刷新 Supabase token
- backend-auth: getUser() 优先触发 refresh,再 getSession 拿新 token
- Dashboard: onAuthStateChange 实时更新 proAccess + 15min getSession 心跳
- detail proxy: 新增 city/[name]/detail 代理,透传 resolution 参数
- city_payloads: aggregate_runway_history + build_runway_band_history 跑道聚合
- chart: 10m→1m 自适应分辨率 + zoom 拖拽 + 跑道温区 Area + Runway Details 开关
2026-05-26 20:37:00 +08:00
2569718930@qq.com 88b80d66e8 全局替换旧域名 polyweather-pro.vercel.app → polyweather.top
- payment-host: 移除 vercel 域名,加 www.polyweather.top
- CORS: 移除 vercel,加 www
- bot: 绑定链接 + 市场概览提示
- weather_sources: User-Agent
2026-05-26 19:53:47 +08:00
2569718930@qq.com dd585ac83b 模型区间数据修复:scan row 优先 daily models,fallback 到 multi forecasts + hourly
- 后端 _build_quick_row: model_cluster_sources 先从 multi_model_daily 取 daily models
- 前端 chart: modelValues 优先 row.model_cluster_sources,缺失时从 hourly.multiModelDaily 补
2026-05-26 11:51:27 +08:00
2569718930@qq.com bf1ee43ffe 台北 Settlement 标签从 跑道实测 改为 CWA 2026-05-26 11:36:00 +08:00
2569718930@qq.com 72d2f360c6 feat: add LiveTemperatureThresholdChart component for real-time runway temperature monitoring 2026-05-26 11:28:33 +08:00
2569718930@qq.com 4ad1014108 修复全局 CORS:NEXT_PUBLIC_API_BASE_URL 默认改为空,前端请求走 Next.js 代理 2026-05-26 11:23:12 +08:00
2569718930@qq.com c43f92cdeb CI build-and-push 前后端并行构建,matrix 策略砍半墙钟时间 2026-05-26 11:18:18 +08:00
2569718930@qq.com 777b7465b7 SSE CORS 修复:EventSource 跨域 + preflight OPTIONS
- sse_router: 显式加 Access-Control-Allow-Origin + Allow-Credentials,新增 OPTIONS
- use-sse-patches: CORS 失败自动切 BFF 代理降级
2026-05-26 11:15:41 +08:00
2569718930@qq.com a4891d58cd feat: implement SSE patch synchronization with frontend hooks and backend infrastructure 2026-05-26 11:12:48 +08:00
2569718930@qq.com 55439977f6 文档更新 + SSE hook 修复 2026-05-26 11:02:33 +08:00
2569718930@qq.com 7045e11082 修复 weather_sources.py MADIS cache 清理中未定义的 now 变量 2026-05-26 10:40:00 +08:00
2569718930@qq.com 23882ac1ef SSE Patch 增量推送架构全链路实现
- web/sse_manager.py: asyncio.Queue 连接池 + broadcast + event_stream
- web/routers/sse_router.py: GET /api/events + POST /api/internal/collector-patch
- weather_sources.py: 采集后 POST patch 给 web
- Nginx polyweather.conf: /api/events proxy_buffering off
- frontend/api/events/route.ts: Next.js SSE 代理
- frontend/hooks/use-sse-patches.ts: EventSource + useLatestPatch + 重连
- LiveTemperatureThresholdChart: mergePatchIntoHourly 增量合并
- scan-terminal-query: 接入 SSE patch 更新行数据
- 新增 ssePatchArchitecture.test.ts 架构测试
2026-05-26 10:39:17 +08:00
2569718930@qq.com 14252915ab 移除图表点击时的毛玻璃 loading 蒙层,改为静默后台更新 2026-05-26 09:54:16 +08:00
2569718930@qq.com fbd00df72f 移除图表 Brush 缩放拖拽组件,简化交互 2026-05-26 09:52:09 +08:00
2569718930@qq.com 4d103a7a38 test: add unit tests for country network snapshots, city time zone mappings, and METAR data source logic 2026-05-26 09:48:46 +08:00
2569718930@qq.com dd72908e0e 60s 轮询扩展:跑道曲线 + 站点观测同步刷新
原来只轮询 summary 拿 current.temp 更新数字。
现在同时 fetch detail?depth=full 合并 amos/runway_plate_history/
airport_primary_today_obs 等字段,跑道曲线和站点线每 60s 刷新。
后端 CITY_FULL_CACHE_TTL_SEC=60 保证轻量命中缓存。
2026-05-26 09:46:36 +08:00
2569718930@qq.com 6e6d27f323 莫斯科数据源简化:移除 METAR 集群 + NOAA 结算,仅保留 UUWW 单站
- city_registry: settlement_source noaa → metar
- weather_sources: 移除 Moscow METAR cluster 5 站配置
- country_networks: 删除 RussiaStationWebNetworkProvider 类
- 文档: Tier 4 备注更新
2026-05-26 09:20:49 +08:00
2569718930@qq.com 0fffc0faa1 修复 weather_sources.py 缺少 timezone 导入 2026-05-26 09:14:34 +08:00
2569718930@qq.com 45365df694 CoWIN 6087 历史持久化 + 跑道曲线聚合 + 模型区间修复 + HKO 曲线对调 + 毛玻璃加载层
- weather_sources: CoWIN 1min 观测写入 official_intraday_observations_store
- country_networks: cowin_obs 源从 DB 回读 1min 历史,不复用 VHHH METAR
- analysis_service: 跑道实测 36h 历史按跑道分组,透传至前端
- scan_terminal_city_row: model_cluster_sources fallback 修复 + runway_plate_history
- 前端: CoWIN 6087 升级为主轴实线,HKO 退为虚线,VHHH METAR 轻虚线
- 前端: Loading 升级为毛玻璃全卡蒙层
2026-05-26 09:13:39 +08:00
2569718930@qq.com 09a8e1bfbe SEO 全链路:OG/Twitter 标签 + robots.txt + sitemap.xml + JSON-LD 结构化数据
- layout metadata: Open Graph + Twitter Card + canonical + robots 指令
- app/robots.ts: 允许首页/auth,禁止 /terminal/account/ops/api
- app/sitemap.ts: 首页 1.0 + /auth/login 0.6
- 首页 JSON-LD: WebApplication schema,含 $10/mo 定价
2026-05-26 08:43:55 +08:00
2569718930@qq.com c88d313f60 终端 header 显示当前在线人数
- src/utils/online_tracker.py:5 分钟滑动窗口,thread-safe 内存追踪
- web/core.py:认证成功时 record_activity(user_id)
- web/routers/ops.py:GET /api/ops/online-users 返回 {online: N}
- 前端 header 每 60s 轮询,Users 图标 + 数字
2026-05-26 08:40:17 +08:00
2569718930@qq.com 23203f6ebb 图表 stats bar 温度数字 60 秒级轻量轮询
liveTemp state 独立于 hourly 缓存,每 60s fetch /api/city/{city}/summary。
只取 current.temp,不触发 _analyze() 重算。
图表曲线保持 5min TTL,顶部数字最快 1min 级更新。
2026-05-26 08:30:33 +08:00
2569718930@qq.com 5b19a49ffb 首屏优化:scan terminal 加 s-maxage 缓存 + 落地页预加载 API
1. /api/scan/terminal 返回 Cache-Control: public, s-maxage=30, stale-while-revalidate=120
   → pre-warm 期间也能返回缓存,白屏 20s 变 1s
2. 落地页 2s 后静默 prefetch /api/cities,预热后端进程和连接池
3. metadata 加 preconnect api.polyweather.top
2026-05-26 08:23:33 +08:00
2569718930@qq.com 4bc352519a 文档更新:香港 HKO 改 10min + CoWIN 6087 补入优先级链 + 深圳移入 Tier 3 2026-05-26 08:16:42 +08:00
2569718930@qq.com 5d10d60dcb 缓存 TTL 对齐:图表内存/会话缓存统一降为 5 分钟(metar),与大表刷新同步
- HOURLY_CACHE_TTL_MS: model(30min) → metar(5min)
- SESSION_CACHE_TTL_MS: 10min → metar(5min)
- 消除大表已刷新但折线图仍显示旧温度的时差问题
2026-05-26 08:13:37 +08:00
2569718930@qq.com 8a534160f0 修复 MADIS 测试:HH:MM 时间戳改为 ISO 格式,避免日期回退导致 slot 错位
normObs 对 HH:MM 格式调用 getCityLocalUtcTimestamp 时未传 referenceLocalDate,
导致取当前真实日期而非测试数据日期,所有观测挤到最后一个 slot。
2026-05-26 08:11:13 +08:00
2569718930@qq.com 18b5e9cfed 修正深圳 HKO 站名:Shenzhen (LFS) → Lau Fau Shan 匹配天文台 CSV 2026-05-26 08:01:04 +08:00
2569718930@qq.com c331c89289 修复 fallback fetch 依赖:rows.length 改为 useRef 标记,避免 terminalData 刷新时无意义 re-run 2026-05-26 07:59:55 +08:00
2569718930@qq.com 598cd17c0b 城市图表增加 LoadingSignal 组件:detail 数据加载中显示进度指示 2026-05-26 07:57:38 +08:00
2569718930@qq.com 20d53e1ae2 新增 CoWIN 6087 数据源:香港保良局陳守仁小學 1 分钟参考站
- cowin_sources.py:从 cowin.hku.hk API 抓取站 6087 的逐分钟温度
- weather_sources.py:CowinSourceMixin 接入采集链,优先级高于 HKO
- country_networks.py:_airport_primary_from_raw 加入 COWIN 优先检查
  airport_primary.source_label 显示为 CoWIN 6087,前端图表默认可见
2026-05-26 07:52:49 +08:00
2569718930@qq.com 00e3007949 feat: add LiveTemperatureThresholdChart component to dashboard scan-terminal 2026-05-26 07:32:02 +08:00
2569718930@qq.com 04dcbcd6ea 移除图表跑道系列的 AMOS/AMSC source 标签 2026-05-26 06:31:55 +08:00
2569718930@qq.com 3a82c11e78 feat: implement LiveTemperatureThresholdChart and add visibility and refresh policy unit tests 2026-05-26 06:13:18 +08:00
2569718930@qq.com 636a81d6df test: add unit tests for temperature chart data and visibility policy, and document city data sources 2026-05-26 06:02:47 +08:00
2569718930@qq.com e1417f607d feat: implement LiveTemperatureThresholdChart and add visibility policy unit tests 2026-05-26 05:46:45 +08:00
2569718930@qq.com 8ca9ce4223 feat: add scan terminal dashboard, fallback city mapping, and Nginx deployment configuration 2026-05-26 05:20:36 +08:00
2569718930@qq.com 1ac41dde33 Callback 修复补丁:redirect URL 改用 siteUrl 构造,避免跳转到 localhost:3000 2026-05-26 04:48:07 +08:00
2569718930@qq.com a7076f48a6 deploy.sh 成功后自动清理旧镜像,防止磁盘积满 2026-05-26 04:36:43 +08:00
2569718930@qq.com f884b016cc 修复 callback 无限重定向:origin 比较改为 host header 比较
nextUrl.origin 在 route handler 中不认 x-forwarded-* headers,
导致 canonical origin 检查始终失败,callback 无限重定向到自身。
改用 request.headers.get(host) 比较。
2026-05-26 04:27:37 +08:00
2569718930@qq.com ecf9481dfe smoke test 修复:scan terminal 换 api/cities,避免 pre-warm 阻塞超时 2026-05-26 04:07:33 +08:00
2569718930@qq.com ee3d489d8b 部署修复:healthz 重试从 60s 扩大到 150s,适配 pre-warm 125s 2026-05-26 03:57:22 +08:00
2569718930@qq.com f5aefb27e3 部署修复:sleep 5 改重试循环,等 backend 真正 ready 再 smoke test
backend Python imports 需要 10-15s,固定 sleep 5 不够。
2026-05-26 03:55:21 +08:00
2569718930@qq.com e2f11d580e CI 修复:添加 setup-buildx 解决 GHA cache 导出报错
默认 docker driver 不支持 cache-to type=gha,需要 buildx driver。
2026-05-26 03:46:01 +08:00