f1dd48808be27a5d9d23349f7f637d2f07e22007
ROOT CAUSE: Race condition where StationsPage renders before auth token is ready, causing DOM state mismatch. Timeline of the bug: 1. Auth0 sets isAuthenticated=true 2. App renders StationsPage before isAuthInitialized=true 3. useSavedStations hook is disabled (enabled: false) 4. Google Maps loads and manipulates DOM 5. Auth token finally acquired, isAuthInitialized=true 6. Component re-renders with query now enabled 7. React tries to remove DOM nodes already removed by Google Maps 8. NotFoundError: removeChild fails SOLUTION: Add isAuthGateReady check in App.tsx before rendering protected routes. Show "Initializing session..." until auth gate is fully initialized. Changes: - Import useIsAuthInitialized hook in App.tsx - Call hook in App component - Add guard check after isAuthenticated check - Show loading UI if authenticated but auth gate not ready - Add debug logs to track render flow Now the page won't render until BOTH: 1. isAuthenticated=true (Auth0) 2. isAuthInitialized=true (our token gate) This prevents the race condition that causes the removeChild DOM error. 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
MotoVaultPro — Simplified Architecture
Simplified 5-container architecture with integrated platform feature.
Requirements
- Mobile + Desktop: Implement and test every feature on both.
- Docker-first, production-only: All testing and validation in containers.
- See
CLAUDE.mdfor development partnership guidelines.
Quick Start (containers)
make setup # build + start + migrate (uses mvp-* containers)
make start # start 5 services
make rebuild # rebuild on changes
make logs # tail all logs
make migrate # run DB migrations
Documentation
- AI quickload:
AI-INDEX.md - Docs hub:
docs/README.md - Features:
backend/src/features/{name}/README.md - Frontend:
frontend/README.md - Backend core:
backend/src/core/README.md
URLs and Hosts
- Frontend:
https://motovaultpro.com - Backend health:
https://motovaultpro.com/api/health
Description
Languages
TypeScript
80.5%
Python
15%
Shell
2.3%
PLpgSQL
1.3%
JavaScript
0.4%
Other
0.4%