Spaces:
Sleeping
Sleeping
Commit History
-
feat: strip Telegram integration for web-only deploy
jindalarishya +1: Claude Sonnet 4.6Removes all Telegram bot code, webhook endpoints, notify endpoints, and python-telegram-bot dependency. Web app routing, auth, feedback, and Supabase logging remain fully intact. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>666ec1c
-
feat: demo prep — unify rating flow, add coolspot pin, clean web UI
Swaminaatha krishna +1: Claude Sonnet 4.6- Unified rating system: /feedback and act_feedback now show 3-tap thermal rating (Hot/Okay/Cool) when a route exists, else redirect to /start - Added "🌳 Pin Cool Spot" to post-route What's Next? menu (3×2 grid); handles AWAITING_COOLSPOT_LOC state - Added "🌡️ Rate This Route" (rate_now) and "🔁 New Route" inline buttons to post-route menu - Added stale callback fallback: expired buttons show alert and prompt /start - Removed data logging UI from web app (📝 button, loggerModal, feedbackModal, star rating JS); API endpoints preserved Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>58a75e7
-
feat: add post-ride rating, coolspot pinning, and enrich Groq system prompt
Swaminaatha krishna1bf6430 -
fix: register Telegram webhook URL on startup, remove connectivity check
jindalarishya +1: Claude Sonnet 4.6Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>61c54f5 -
chore: remove unused start_webhook_loop
jindalarishyabb11ec0 -
fix: correct base_url format for Telegram proxy
jindalarishya24905e5 -
fix: route Telegram API calls through Render proxy
jindalarishyaf949f34 -
fix: mask bot token in error logs
jindalarishya6af9853 -
diag: add getMe test with 30s timeout to startup connectivity check
jindalarishyaa03c55b -
fix: restore original dnspython DNS patch, revert entrypoint.sh approach
jindalarishya62c72c2 -
fix: run Telegram init in background with exponential backoff, don't block startup
jindalarishyaccdd10c -
fix: force IPv4-only socket connections on HuggingFace to fix Telegram (IPv6 broken)
jindalarishyadb3bdf7 -
fix: increase Telegram httpx timeouts and retries for HuggingFace network latency
jindalarishyaabc73b3 -
fix: add async retry backoff for telegram initialization race condition
Swaminaatha krishnaaade195 -
fix: force HTTP/1.1 for Telegram bot to bypass Docker DNS crash
Swaminaatha krishna9c602b3
-
feat(routing): replace heuristic cooling bonuses with ML-derived weights
Swaminaatha krishna- Refactored in src/main.py to use . - Replaced arbitrary weights with Random Forest feature importances: Water (0.325), PCN (0.257), Canopy (0.119), and SVF proxy (0.110). - Updated to utilize the new ML weights. - Lowered Dijkstra weight floor to to allow high-value PCN and waterfront corridors to properly minimize route cost without breaking pathfinding. - Added docs/ML_Architecture_Update.md outlining the data-driven architecture.11df42f -
fix: remove custom DNS and add telegram failsafe
Swaminaatha krishnaedc76af -
chore: frontend wiring audited and secured
Swaminaatha krishna3f68f4c
-
feat: implement sweat penalty (metabolic cost for uphill, safety cost for steep downhill)
Swaminaatha krishna +1: Claude Opus 4.6Wires edge grade data from the elevation-enriched graph into get_cool_cost_fast(). Uphill edges penalized at factor 15 (capped at 3.0x multiplier), steep downhill (>5%) penalized at factor 3 (capped at 1.6x) for safety. Flat/gentle downhill unaffected. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>6a302d2 -
feat: upgrade routing engine to elevation-enriched graph (54MB)
Swaminaatha krishna +1: Claude Opus 4.6Switches road network from singapore_final.graphml.gz to singapore_enriched.graphml.gz which includes node elevation data and edge grades (slope) from Google Elevation API. This permanently solves the "Sweat Factor" gap identified in Field Test Round 1. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>d622a5a
-
Critical fixes: Telegram session management, error logging, Docker optimization
Swaminaatha krishna +1: Claude Sonnet 4.5FIXES: 1. Telegram bot session timeout bug - users unable to enter start location - Added last_active timestamp to all session initializations - Prevents immediate session reset after /start command - Fixes "Did you mean to search for a place?" error when entering valid location 2. Enhanced sensor logging error handling - Added traceback logging for Supabase errors in both telegram_bot.py and main.py - Better debugging for RLS policy violations 3. Docker build optimization - Added .dockerignore to exclude _bmad/, .claude/, .gemini/, development files - Reduces build context from ~190MB to ~187MB (Data only) - Should significantly improve HuggingFace Space startup time 4. Startup performance monitoring - Added startup timing logs to identify bottlenecks RELATED ISSUES: - Supabase RLS policy on sensor_logs needs manual fix (see commit notes) - HuggingFace startup time should improve with Docker optimization Co-Authored-By: Claude Sonnet 4.5 <noreply@anthro…939a732 -
Fix code review findings: security, perf, async, error handling
Swaminaatha krishna +1: Claude Opus 4.6HIGH: - Add report_type allowlist validation for community reports - Pre-compute lat/lon for all 45 fallback places to eliminate geocoding storm - Validate telegram_id against known users on notification endpoints MEDIUM: - Use thread-safe get_session() consistently for session init - Wrap get_suggestions() and geocode in run_in_executor to unblock event loop - Return HTTP 503 (not 200) when sensor endpoint has no DB LOW: - Replace bare except: with except Exception + logging - Populate Groq conversation history for multi-turn context Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>480f34f -
Fix DB schema mismatches and Telegram bot place input bug
Swaminaatha krishna +1: Claude Opus 4.6- sensor_logs: rename user_email to user_id to match updated Supabase schema - feedback_logs: remove route_id from inserts (column is bigint, code sent strings) - Fix handle_location missing last_active timestamp causing session timeout reset, which broke place name input after location sharing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>2cf446f -
Fix code review findings: shared executor, dead code removal, thread safety, caching
Swaminaatha krishna +1: Claude Opus 4.6- F1 (HIGH): Use shared _route_executor instead of per-request ThreadPoolExecutor - F2 (HIGH): Remove dead get_cool_cost() and calculate_sun_factor() (~65 lines) - F3 (CRITICAL): Add _session_lock and get_session() for thread-safe user_sessions - F4 (MEDIUM): Cap weather cache at 100 entries with LRU eviction - F5 (MEDIUM): Add 5-min TTL to DNS caches in config.py - F6 (MEDIUM): Guard shade_gain against fast_len == 0 division by zero - F8 (MEDIUM): Add _geocode_cache to eliminate N+1 OneMap API calls Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>0b0d8a0 -
Implement field testing fixes: concurrency, perf, nav, UX, and review fixes
Swaminaatha krishna +1: Claude Opus 4.6- Add thread-safe route cache, concurrent route stacking guard, and 30s timeout - Pre-compute static edge costs at startup (tree/water/PCN spatial queries) - Add fast cost function with per-request sun/weather, cached weather with 5-min TTL - Fix Shapely 2.x STRtree.nearest() returning index not geometry (critical) - Fix ThreadPoolExecutor blocking on exit defeating timeout purpose - Fix street name "None" bug in turn-by-turn directions - Fix stale hidden coords causing wrong routes on web app - Add backend /api/geocode endpoint replacing client-side Nominatim - Add GPS marker lerp animation and smooth map panning for navigation - Add Telegram UX: typing indicators, back buttons, session timeout, route retry - Add structured logging with timestamps to all API endpoints - Add route_id to feedback for both Telegram and web, set currentRouteId on web routes - Fix weather cache stale timestamp and redundant sun penalty condition Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>03282e0
-
feedback updated
jindalarishya15015b9
-
database
jindalarishya93ac66e -
distance
jindalarishya5ad6b01 -
all fixes
jindalarishyad246ac4 -
all fixes
jindalarishyaa27de5c
-
whole flow
jindalarishyab1df623
-
Updated to fix OAuth token issue
Verified signatureb6c6d02 -
Updated to v16.15
Verified signature68892fd -
updated to v16.10
Verified signatureb8f3458 -
Updated cool cost function with new values for PCN and threshold for cool detour route
Verified signature4379a7e -
Updated to v16.5
Verified signaturead5252c -
Updated to v16.5
Verified signaturea0aee81 -
Updated to v16.3
Verified signatureFeature Implemented: Intuitive Flow: /start → Language → Location → Route. Utilities: /food, /water, /nearby commands are restored and functional. Account Mgmt: /link and /unlink are restored. Field Ops: /report (Community) and /log (Sensors) are implemented. Feedback: Text feedback (AWAITING_FEEDBACK) and Star Ratings (tg_rate_) are both handled. Safety: is_in_singapore check prevents routing errors. extract_clean_reply hides raw JSON. Persistent Menu: setup_bot_commands is correctly called in startup logic.29aac55 -
Refined flow of the bot
Verified signature9dae948 -
Update src/helpers.py
Verified signature80a8e61 -
Update src/config.py
Verified signature0b39ff1 -
Update src/helpers.py
Verified signatured95bc32 -
route fix
jindalarishyad7e737b -
organized the folders
jindalarishyacf61bc9 -
organized the folders
jindalarishyaa76b12d