fix(rls): add account_id to AISessionStep creations, fix boards toast
- flowpilot_engine: pass account_id at all 5 AISessionStep instantiation sites (_create_step_from_parsed x3, briefing step, status update step). Phase 4 RLS blocked every INSERT with NULL account_id — this broke all new FlowPilot sessions since the Phase 4 migration was applied. - integrations: list_boards returns [] on PSAError instead of 502, stopping the spurious 'Server error' toast on dashboard load (boards are optional). - client.ts: 5xx global toast now shows backend detail when available. - useFlowPilotSession: startSession extracts backend detail for error state; suppresses duplicate toast for 5xx (global interceptor already handles it). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -362,8 +362,9 @@ async def list_boards(
|
||||
provider = await get_provider_for_account(current_user.account_id, db)
|
||||
boards = await provider.list_boards()
|
||||
return [PSABoardResponse(id=b.id, name=b.name) for b in boards]
|
||||
except PSAError as e:
|
||||
raise HTTPException(status_code=502, detail=str(e))
|
||||
except PSAError:
|
||||
# Boards are optional UI chrome — degrade gracefully rather than surfacing a toast
|
||||
return []
|
||||
|
||||
|
||||
@router.get("/tickets/search", response_model=list[PSATicketSearchResult])
|
||||
|
||||
Reference in New Issue
Block a user