semblance-dev/backend/app
Vadym Samoilenko 283b31e786 Fix AI mode: race condition, split-brain UI, and stuck local state
- Backend: set status to ai_mode in the route handler before submitting
  to AI runner, eliminating the race condition where frontend's immediate
  status poll read the old status
- Frontend: replace all raw isAiModeActive prop usages with
  effectiveAiModeActive in DiscussionPanel (13 locations) so ReasoningPanel,
  status text, loading indicator, and manual/AI controls all reflect the
  correct state instantly on Start AI Mode click
- Frontend: add useEffect to sync localAiModeActive back to null once
  the parent prop catches up, preventing permanent override after natural
  session end
- These fixes also unblock the 3-second AI message polling which was
  never activating due to isAiModeActive staying false

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 19:02:15 +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 Allow document uploads (PDF, DOCX, TXT, etc.) as focus group assets 2026-03-23 17:08:30 +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