版本发布 4
### Fixed - Version tag and GitHub link not left-aligned on mobile — compound padding from wrapper and child overrides **Full changelog**: https://github.com/aallan/floodwatch/compare/v1.3.0...v1.3.1
### Added - Version tag displayed in site header next to "View on GitHub" link - Pre-commit hook to keep version.json in sync via `git describe` - Atomic file writes for all CSV operations - API retry with exponential backoff and jitter in dev server - Bind warning when dev server listens on all interfaces ### Fixed - Dartmoor Line rendering gap near Colebrooke ### Changed - Test count: 95 → 104 (64 Python + 40 JavaScript) **Full changelog**: https://github.com/aallan/floodwatch/compare/v1.2.0...v1.3.0
## CI linting, accessibility, and fetch hardening ### Added - Ruff linting and format checks in CI (`ruff check .`, `ruff format --check .`) - Expanded ruff lint rules: `UP` (pyupgrade), `B` (bugbear), `SIM` (simplify), `RUF` - ARIA attributes: `aria-live="polite"` on flood status, `aria-busy` on refresh button, `role="button"` and `aria-expanded` on flood warnings summary - `prefers-reduced-motion` media query — disables spinner, warning pulse, and log slide-in animations - Response validation (`if (!resp.ok)`) on all `fetch()` calls (GeoJSON overlays, EA API, flood warnings, backend sync) ### Fixed - Red console error (`OPTIONS 405`) on every page load from backend detection — switched to silent `XMLHttpRequest` - Data freshness timestamp and flood status delayed ~2s on load — show timestamp immediately after markers, run network probes non-blocking ### Changed - Pre-commit hooks now filter to Python files only (skip JS/CSS/JSON/GeoJSON) - Expanded `.gitignore` with standard exclusions (`.env`, `venv/`, IDE dirs, `*.log`) - Applied ruff auto-fixes: `timezone.utc` → `UTC` alias, removed redundant `"r"` mode args
## What's Changed ### Fixed - Popup buttons (time range, forecast, tidal/discharge tabs) not responding to clicks after the v1.0.0 refactor - Canvas loading text stretched and distorted when switching views ### Added - 15 UI integration tests for `floodwatch.js` — event delegation, canvas coordinates, popup HTML, init() wiring, marker construction - `sizeCanvasToDisplay()` helper for DPR-aware canvas rendering - Test harness that loads `floodwatch.js` into jsdom with mocked Leaflet/Chart.js/Papa Parse ### Changed - Test count: 80 → 95 (55 Python + 40 JavaScript) - Docs updated to reflect external CSS/JS file structure **Full Changelog**: https://github.com/aallan/floodwatch/compare/v1.0.0...v1.1.0