feat: Initial CBPOA commit — 武汉儿童呼吸疾病风险评估系统
Context: Build a spatial risk assessment system correlating air quality
data with children's respiratory disease incidence across Wuhan.
Approach: FastAPI backend serving PostGIS spatial queries, React
frontend with Deck.gl maps, and a PyTorch SpatialTemporalGCN pipeline
for multi-day (1d/3d/7d) risk prediction.
Changes:
- backend/ — FastAPI API with auth (JWT), alerts, risk analysis,
geocoded case data, grid statistics, and report endpoints
- frontend/ — React dashboard with interactive risk maps, alert
monitoring, district comparison charts, and timeline player
- models/ — SpatialTemporalGCN model with trained weights and ONNX
export for inference
- scripts/ — ETL pipeline for weather + medical data, grid generation,
feature engineering, training, and daily inference
- deploy/ — Docker Compose configs for backend, frontend, and MLflow
- docs/ — API docs, deployment guide, user guide, and code review
Impact: Enables spatial risk visualization, alert monitoring, and
ML-driven health risk forecasting for environmental health teams.
2026-06-05 02:13:49 +08:00
|
|
|
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
testDir: './e2e',
|
|
|
|
|
fullyParallel: true,
|
|
|
|
|
forbidOnly: !!process.env.CI,
|
|
|
|
|
retries: process.env.CI ? 2 : 0,
|
|
|
|
|
workers: process.env.CI ? 1 : undefined,
|
|
|
|
|
reporter: 'html',
|
|
|
|
|
use: {
|
|
|
|
|
baseURL: 'http://localhost:3000',
|
|
|
|
|
trace: 'on-first-retry',
|
|
|
|
|
},
|
|
|
|
|
projects: [
|
|
|
|
|
{
|
|
|
|
|
name: 'chromium',
|
feat: Phase 4 — responsive analysis pages + perf harness + god-component splits
Final phase of the UX modernization. Four conflict-free lanes.
Responsive (D4 — desktop+mobile 并重):
- 7 analysis pages made usable at 375px: grid-cols-4/5 → grid-cols-2 sm:*
responsive variants; raw tables wrapped in overflow-x-auto; page overflow guards
- new e2e/responsive.spec.ts loops all 7 analysis routes at 375px asserting no
horizontal scroll
Perf harness:
- playwright.config.ts gains an isolated `perf` project (testMatch /perf/), default
chromium project excludes it (testIgnore)
- new e2e/perf.spec.ts: CDP Network.emulateNetworkConditions (Fast 3G) +
PerformanceObserver LCP on /overview kpi-row + route-transition timing; numbers
reported as a relative regression signal (dev-server, not a prod SLA), not gated
God-component splits (pure refactors, behavior-preserving):
- MonitoringDashboard 686 → 239 lines: extracted components/monitoring/* (StatsBar,
OverviewTab, CaseStatsTab, DistrictStatsTab) + useMonitoringData hook; URL-granularity
source-of-truth + drilldown reconcile kept in the orchestrator (no desync regression)
- AlertsDashboard 816 → 301 lines: extracted components/alerts/* (Toolbar, List,
RiskPanel, MapPanel, DetailModal, …); role/privacy/grid-hide logic kept in the
orchestrator — doctor-view privacy invariant (zero patient-point) still holds
Gates: tsc 0 · vitest 75 · functional e2e 37/37 (incl doctor-view privacy +
granularity + responsive) · build ok · perf project runs + reports
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 21:00:15 +08:00
|
|
|
// Functional suite. Exclude the throttled perf spec so emulated Fast-3G
|
|
|
|
|
// latency never bleeds into (or slows) the normal acceptance run.
|
|
|
|
|
testIgnore: /perf\.spec\.ts/,
|
|
|
|
|
use: { ...devices['Desktop Chrome'] },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
// Dedicated perf project — only perf.spec.ts runs here, under CDP network
|
|
|
|
|
// throttling. Kept separate so functional and perf measurements don't mix.
|
|
|
|
|
name: 'perf',
|
|
|
|
|
testMatch: /perf\.spec\.ts/,
|
feat: Initial CBPOA commit — 武汉儿童呼吸疾病风险评估系统
Context: Build a spatial risk assessment system correlating air quality
data with children's respiratory disease incidence across Wuhan.
Approach: FastAPI backend serving PostGIS spatial queries, React
frontend with Deck.gl maps, and a PyTorch SpatialTemporalGCN pipeline
for multi-day (1d/3d/7d) risk prediction.
Changes:
- backend/ — FastAPI API with auth (JWT), alerts, risk analysis,
geocoded case data, grid statistics, and report endpoints
- frontend/ — React dashboard with interactive risk maps, alert
monitoring, district comparison charts, and timeline player
- models/ — SpatialTemporalGCN model with trained weights and ONNX
export for inference
- scripts/ — ETL pipeline for weather + medical data, grid generation,
feature engineering, training, and daily inference
- deploy/ — Docker Compose configs for backend, frontend, and MLflow
- docs/ — API docs, deployment guide, user guide, and code review
Impact: Enables spatial risk visualization, alert monitoring, and
ML-driven health risk forecasting for environmental health teams.
2026-06-05 02:13:49 +08:00
|
|
|
use: { ...devices['Desktop Chrome'] },
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
webServer: {
|
|
|
|
|
command: 'npm run dev',
|
|
|
|
|
url: 'http://localhost:3000',
|
|
|
|
|
reuseExistingServer: !process.env.CI,
|
|
|
|
|
timeout: 120000,
|
|
|
|
|
},
|
|
|
|
|
});
|