Add three, @react-three/fiber, @react-three/drei (runtime) and gltf-transform /
gltfpack (dev) plus apps/web/scripts/build-3d-assets.sh, which compresses the
local Baía de Guanabara + celso_furtado source packs into web-ready GLBs
(meshopt geometry + WebP@1024 textures — no KTX2 transcoder needed under our
COOP/COEP). v1 subset = batimetria + ilhas + ponte + vessel (~21MB, down from
~640MB); topografia excluded (pathological per-tile textures). Generated GLBs are
gitignored — run the script once locally before using the 3D view.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add react-router-dom with two routes: "/" → MyScenariosPage (scenario grid with
search, create, open, delete against the scenarios API) and "/editor" → AppShell.
"Sair do cenário" returns to the list. New: use-scenarios hook, ScenarioCard,
MyScenariosPage (+ tests, 235 web tests green).
API: backfill legacy initialConditions rows missing instanceId so GET /scenarios
serializes under the updated schema.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Environmental Conditions feature:
- C++ EnvironmentTimeline: time-series current/wind data, JSON serialization
- WASM bindings: loadEnvironment(), World integration
- TypeScript types: CurrentSeries, WindSeries, EnvironmentPayload
- Zustand environmentStore with React panel (EnvironmentConditionPanel)
- Mock WASM current drift physics: nautical→body-frame velocity applied in step()
Bug fixes:
- Vessel instanceId: unique auto-increment ID per scenario instance prevents duplicate
vesselId crash when adding two vessels of same type
- vesselPanelStore: separate vesselTypeId field so config fetch uses correct type ID
(not instanceId) after the instanceId/vesselId split
- VesselMarker stable eventHandlers: useMemo + useRef pattern prevents react-leaflet
from re-registering Leaflet listeners every 50ms tick, fixing panel clicks during
active simulation
Tests:
- Playwright regression suite (e2e/regression.spec.ts): 8 tests covering panel open
during simulation, multi-click consistency, two VLCC no error, dual marker render,
individual panel open, remove-one behavior, current drift, no-drift baseline
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
react-leaflet v5 requires React 19 — now fully compatible without
peer dependency warnings. No API changes needed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
react-leaflet v5 requires React 19 — caused "render2 is not a function"
runtime crash and white screen. Downgraded to v4.2.1.
fix(docker): separate DB volume mount from API dist directory
Volume was mounted at /app/apps/api, overwriting compiled dist/ with stale
files from previous container runs. Changed mount to /app/data for DB only.
fix(api): copy area.json and vessel1.json into API Docker image
Seed files could not resolve JSON data at container startup.
Added COPY in Dockerfile and corrected path depth from 5 to 4 levels.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>