semblance-dev/backend/app
Vadym Samoilenko 2e85fc1acc Fix root cause: naive vs aware datetime crash + stuck AI mode indicator
The autonomous loop was crashing on every decision with:
  TypeError: can't subtract offset-naive and offset-aware datetimes
because MongoDB stores created_at without timezone info but the code
compared it against datetime.now(timezone.utc).

- conversation_context_service: make created_at timezone-aware before
  subtraction (replace tzinfo=utc when naive)
- DiscussionPanel: fix sync effect — when server reports AI mode is
  inactive, always clear localAiModeActive regardless of its value,
  so the "AI is generating..." spinner doesn't get stuck when the
  backend fails/stops before the frontend has confirmed AI mode started

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 19:30:04 +00:00
..
auth Apply Jintech security audit remediation (sprint 3) — 87/92 findings fixed 2026-03-20 12:51:18 +00:00
models Fix focus group create: 500 on update + 400 on autosave 2026-03-23 15:20:40 +00:00
routes Fix AI mode: race condition, split-brain UI, and stuck local state 2026-03-23 19:02:15 +00:00
services Fix root cause: naive vs aware datetime crash + stuck AI mode indicator 2026-03-23 19:30:04 +00:00
utils Fix make_serializable import — move to utils/__init__.py (was shadowed by utils/ package) 2026-03-20 13:33:11 +00:00
.DS_Store changed permissions 2025-12-19 19:26:16 +00:00
__init__.py Fix AI autonomous mode: cross-loop WebSocket emit + polling fallback 2026-03-23 18:22:24 +00:00
db.py Apply Jintech security audit remediation (sprint 3) — 87/92 findings fixed 2026-03-20 12:51:18 +00:00
extensions.py changed permissions 2025-12-19 19:26:16 +00:00
websocket_debug_tap.py changed permissions 2025-12-19 19:26:16 +00:00
websocket_manager.py Apply Jintech security audit remediation (sprint 3) — 87/92 findings fixed 2026-03-20 12:51:18 +00:00
websocket_manager_async.py Fix AI autonomous mode: cross-loop WebSocket emit + polling fallback 2026-03-23 18:22:24 +00:00