发布 v1.7.0:市场监控面板、天气日报、后台重写、新数据源、LGBM 移除

Constraint: CHANGELOG 覆盖 v1.6.0 以来 ~340 个提交
Confidence: high
Tested: git diff --stat 11 files, sync_version.py 通过
This commit is contained in:
2569718930@qq.com
2026-05-23 20:30:46 +08:00
parent 6cbc56ac5a
commit 219fda39d9
11 changed files with 59 additions and 22 deletions
+36 -1
View File
@@ -1,6 +1,41 @@
# Changelog
## 1.6.0 - 2026-05-10
## 1.7.0 - 2026-05-23
### 新增能力
- 市场监控面板(MonitorPanel):22 城实时温度监控,温度分辨率链(AMOS 跑道 → airport_primary → airport_current → current),按数据源新鲜度驱动刷新
- 中国城市天气日报:AI 生成每日天气摘要,接入 CMA weather.com.cn 预报数据,推送至 Telegram 论坛群
- 后台管理系统重写:从 1694 行单页拆分为 9 个模块(总览、会员、订阅、支付、训练、Telegram 审计、健康检查、配置、日志),含漏斗图、KPI 卡片、缓存饼图、增长趋势图
- 跑道观测系统重构:全跑道展示、结算跑道标注、热力模型、风场分析,推送增加市场状态标签(超预期/升温中/冲顶观察/降温中)
- 新增 6 个高频数据源:AEROWEB (Météo-France)、NCM (沙特)、IMS Lod (以色列)、AMSC AWOS (中国跑道)、MSS 1 分钟 (新加坡)、AROME HD 15 分钟 (巴黎)
- 接入 HKO 1 分钟、流浮山 LFS 1 分钟、CWA 10 分钟 (台北松山) 实时温度
- NOAA MADIS HFMETAR 适配新格式(netCDF stationId 替代 icaoId+ 目录迁移适配
- KNMI 适配新数据布局 (station,time) + 5 位 WMO 码 + S3 下载认证修复
- 新增 GET /api/cities/model-range 端点
- 积分转账功能:管理员手动扣除/划转用户积分
- 支付提交前 Tx 预校验:链上验签收款地址与金额
- CI 全流程自动化:测试通过后自动 SSH 部署到 VPS
- 一键部署脚本:deploy.sh + deploy.ps1
### 移除
- 删除 LGBM 全部代码和模型文件,EMOS 简化为纯 legacy 高斯分桶
- 删除 Polymarket 价格拉取与 UI 层(MarketDecisionLine
- 删除 Groq、Meteoblue、NMC、俄罗斯 pogodaiklimat 数据源
- 删除预热(prewarm)系统
- 删除市场提醒引擎(market_alert_engine
- 删除 Lagos、Masroor Air Base 城市
- 移除季付/年付计划,统一月付 10 USDC
### 修复与优化
- 修复移动端城市列表搜索无数据、Leaflet flyTo NaN 崩溃
- 修复 MacBook Safari 布局崩溃(100vw/dvh、-webkit-backdrop-filter、grid minmax 溢出)
- 修复温度曲线图三个渲染问题:数据点过少、张力过高、canvas CSS 拉伸
- 修复 Open-Meteo 冷却期无限循环导致多模型数据缺失
- 修复转化漏斗数据显示 3750%(前端重复乘以 100)
- 多模型缓存优化 + ETag 缓存 + stale-while-revalidate
- 性能优化:Context 重渲染、LGBM 循环移除、TTL 对齐
- 账户页 Pro 状态偶发性丢失修复
- 机场推送重构:观测缓存分离 + 全城市覆盖 + 四路并发
- 全面修复前端 UI 设计审查 15 项问题:消除工程债务、统一 token 体系、提升可维护性
- CSS 架构:消除 !important 滥用(134→49,仅保留 Leaflet/图表所必需项)、浅色主题重构为 `html.light` 选择器体系
+15 -7
View File
@@ -9,10 +9,11 @@ PolyWeather Pro — a production weather-intelligence stack for temperature sett
## Environment & Preferences (ALWAYS follow)
### Working Directory
- All commands run from the repo root: `E:/web/PolyWeather`
- All commands run from the repo root
- Python virtual env: `venv\Scripts\activate` (Windows) / `source venv/bin/activate` (Linux/macOS)
- Frontend dev server: `cd frontend && npm run dev` → http://localhost:3000
- Backend API server: `uvicorn web.app:app --reload --host 0.0.0.0 --port 8000` → http://localhost:8000
- When I say "start the server", assume the correct working directory is `E:/web/PolyWeather`
- When I say "start the server", assume the working directory is the repo root
### Git Conventions
- **Commit language: Chinese (简体中文) ONLY**
@@ -38,7 +39,7 @@ Users (Web / Telegram) → Next.js Frontend (Vercel) → FastAPI /web/app.py
Payment Layer (Intent + Event + Confirm Loop)
```
- **Backend**: FastAPI on port 8000 (`web/app.py``web/app_factory.py``web/routers/` (8 route modules) + `web/services/` (14 service modules) + `web/core.py`)
- **Backend**: FastAPI on port 8000 (`web/app.py``web/app_factory.py``web/routers/` (8 route modules: `system`, `city`, `auth`, `analytics`, `scan`, `payments`, `ops`, `routes` (legacy)) + `web/services/` (14 service modules) + `web/core.py`)
- **Frontend**: Next.js 15 + React 19 + TypeScript + Tailwind CSS 3 + shadcn/ui (new-york style) on port 3000 (dev)
- **Bot**: Telegram bot via `bot_listener.py``src/bot/`
- **Shared analysis core** in `src/` is used by both web API and bot
@@ -59,7 +60,7 @@ npm run build # Production build (runs sync-next-server-chunks.mjs after)
npm run start # Production server
npm run lint # ESLint via next lint
npm run typecheck # tsc --noEmit
npm run test:business # Business state tests (also runs in CI)
npm run test:business # Business state tests via scripts/run-business-state-tests.mjs (also runs in CI)
```
### Backend (dev on port 8000)
@@ -82,10 +83,17 @@ The compose file defines two services: `polyweather` (bot) and `polyweather_web`
### Python tests
```bash
pytest tests/ # all tests
pytest tests/test_web_observability.py # single test file
python -m pytest tests/ # all tests
python -m pytest tests/test_web_observability.py # single test file
```
### Version bump (see RELEASE.md)
```bash
python scripts/bump_version.py patch # or minor / major / 1.5.0
python scripts/sync_version.py # verify sync across files
```
`VERSION` file is the single source of truth; frontend `package.json` and docs sync from it.
### Lint & Format
```bash
ruff check . # Python lint (pycodestyle + Pyflakes, line-length 88)
@@ -131,7 +139,7 @@ curl http://127.0.0.1:8000/metrics
- **State storage**: SQLite primary path (set via `POLYWEATHER_STATE_STORAGE_MODE=sqlite` + `POLYWEATHER_DB_PATH`). Legacy JSON/JSONL files are migration/fallback only.
- **Runtime data**: External dir recommended (`POLYWEATHER_RUNTIME_DATA_DIR=/var/lib/polyweather`) to avoid git conflicts
- **Configuration**: `.env.example` is the comprehensive reference (8 config sections: runtime, Telegram, weather cache, auth, ops, frontend, optional modules, Polygon monitor). Copy to `.env` and fill in secrets.
- **Auth gating** (frontend middleware): Token-based (`POLYWEATHER_DASHBOARD_ACCESS_TOKEN`) or Supabase session-based (`POLYWEATHER_AUTH_ENABLED`). Local dev hosts bypass auth.
- **Auth gating** (frontend middleware): Three-tier priority in `middleware.ts` — (1) local dev hosts (localhost / 127.0.0.1 / ::1) bypass auth entirely, (2) Supabase session-based when `POLYWEATHER_AUTH_ENABLED=true` via `handleSupabaseAuthGate` or `handleSupabaseOptionalSession`, (3) legacy token fallback via `POLYWEATHER_DASHBOARD_ACCESS_TOKEN` cookie/query-param. Public pages (`/`, `/docs`, `/auth/*`, `/entitlement-required`) and public API routes are always accessible.
- **CORS**: Allowed origins from `WEB_CORS_ORIGINS` env var (defaults: localhost:3000, polyweather-pro.vercel.app)
- **API proxy**: Frontend uses Next.js rewrites to proxy `/api/*` to the FastAPI backend; see `frontend/lib/api-proxy.ts` and `frontend/lib/backend-api.ts`
+1 -1
View File
@@ -243,5 +243,5 @@ docker compose logs -f polyweather | egrep "polymarket wallet activity watcher s
## Version
- Version: `v1.6.0`
- Version: `v1.7.0`
- Last Updated: `2026-05-11`
+1 -1
View File
@@ -260,5 +260,5 @@ docker compose logs -f polyweather | egrep "polymarket wallet activity watcher s
## 当前版本
- 版本:`v1.6.0`
- 版本:`v1.7.0`
- 文档最后更新:`2026-05-11`
+1 -1
View File
@@ -1 +1 @@
1.5.5
1.7.0
+1 -1
View File
@@ -1,4 +1,4 @@
# PolyWeather API 文档(v1.5.4
# PolyWeather API 文档(v1.7.0
最后更新:`2026-04-27`
+1 -1
View File
@@ -1,4 +1,4 @@
# Supabase + 登录 + 支付接入说明(v1.5.1
# Supabase + 登录 + 支付接入说明(v1.7.0
最后更新:`2026-03-14`
+1 -1
View File
@@ -1,4 +1,4 @@
# 技术债与工程待办(v1.6.0
# 技术债与工程待办(v1.7.0
最后更新:`2026-05-10`
+1 -1
View File
@@ -1,4 +1,4 @@
# PolyWeatherCheckout PolygonScan 验证(v1.5.1
# PolyWeatherCheckout PolygonScan 验证(v1.7.0
最后更新:`2026-03-20`
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "polyweather-frontend",
"version": "1.5.5",
"version": "1.7.0",
"private": true,
"scripts": {
"dev": "node scripts/sync-next-server-chunks.mjs --clean-root && next dev",
-6
View File
@@ -18,18 +18,12 @@ TEXT_REPLACEMENTS = {
ROOT / "README_ZH.md": [
(r"- 版本:`v[\d.]+`", f"- 版本:`{DISPLAY_VERSION}`"),
],
ROOT / "FRONTEND_REDESIGN_REPORT.md": [
(r"前端交付与重构报告(v[\d.]+", f"前端交付与重构报告({DISPLAY_VERSION}"),
],
ROOT / "docs" / "API_ZH.md": [
(r"PolyWeather API 文档(v[\d.]+", f"PolyWeather API 文档({DISPLAY_VERSION}"),
],
ROOT / "docs" / "SUPABASE_SETUP_ZH.md": [
(r"Supabase \+ 登录 \+ 支付接入说明(v[\d.]+", f"Supabase + 登录 + 支付接入说明({DISPLAY_VERSION}"),
],
ROOT / "docs" / "TECH_DEBT.md": [
(r"技术债与工程待办(v[\d.]+", f"技术债与工程待办({DISPLAY_VERSION}"),
],
ROOT / "docs" / "TECH_DEBT_ZH.md": [
(r"技术债与工程待办(v[\d.]+", f"技术债与工程待办({DISPLAY_VERSION}"),
],