semblance-dev/backend/app/routes
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
..
ai_personas.py Migrate task result delivery from WebSocket to HTTP polling 2026-03-23 16:46:58 +00:00
auth.py Apply Jintech security audit remediation (sprint 3) — 87/92 findings fixed 2026-03-20 12:51:18 +00:00
focus_group_ai.py Fix AI mode: race condition, split-brain UI, and stuck local state 2026-03-23 19:02:15 +00:00
focus_groups.py Allow document uploads (PDF, DOCX, TXT, etc.) as focus group assets 2026-03-23 17:08:30 +00:00
folders.py Apply Jintech security audit remediation (sprint 3) — 87/92 findings fixed 2026-03-20 12:51:18 +00:00
personas.py Fix data isolation + conversation/decision 500 errors 2026-03-23 17:02:10 +00:00
tasks.py Fix data isolation + conversation/decision 500 errors 2026-03-23 17:02:10 +00:00