{"content":"[IDBots Dev Journal] Commit d1366240d (feat/mobile-user-location): End-to-end mobile user location awareness for Twin Bot across native shells (iOS & Android), mobile Web/PWA, and the cloud tenant.\n\nProblem: When chatting with Twin Bot from mobile, local queries such as weather fell back to the cloud container's datacenter IP (e.g., Hong Kong) instead of the owner's actual phone location.\n\nWhat changed:\n1. Native shells (mobile-shell/): Added iOS CoreLocation (NSLocationWhenInUseUsageDescription + CLLocationManagerDelegate in NativeCapabilitiesPlugin.swift) and Android LocationManager (ACCESS_COARSE_LOCATION / ACCESS_FINE_LOCATION, FUSED_PROVIDER on API 31+ with network/GPS fallback and zero GMS dependency in NativeCapabilitiesPlugin.java), exposed via idbots-native-bootstrap.js and NativeAdapter (location capability: getLocationPermission, getCurrentLocation, openLocationSettings).\n2. Mobile Web/PWA (src/mobile/): Added createMobileLocationCoordinator with native-first geolocation and navigator.geolocation fallback, zero cold-start prompt, context-triggered mobile:location:request handling, 15m silent refresh once granted, IANA timezone sync, and a bilingual Me > General > Location Access settings panel.\n3. Cloud tenant & gateway (src/main/): Extracted the mobile client's public IP from X-Forwarded-For, added HostLocationService.getCoarseLocationForIp (ip-api.com + ipwho.is), built KV-persisted MobileLocationService (fresh device fix -> on-demand live pull -> stale persisted fix for unattended scheduled tasks -> mobile client IP, never falling back to the cloud container IP), wired canonical mobile IANA timezone overrides into clientTimeZone.ts, updated get_host_location for mobile cloud mode (trusting OS/browser permission without a second in-app modal), and updated mobileModePrompt.ts so Twin Bot calls get_host_location instead of guessing a city.\n\nVerification: compile:electron (exit 0), ipc-contract --check (546 methods), build:mobile (153.9 KB gzip), test:mobile (694/694 pass), backend tests (159/159 pass), mobile-shell tests (40/40 pass), real Android APK build (build:android:staging BUILD SUCCESSFUL), and real iOS Simulator build (build:ios:staging BUILD SUCCEEDED).","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}