diff --git a/backend/requirements.txt b/backend/requirements.txt index 36fe73b7..d5d1b869 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -4,7 +4,7 @@ httpx==0.28.1 # Core Framework (updated for CI fix) fastapi==0.135.2 uvicorn[standard]==0.42.0 -pydantic~=2.11.9 +pydantic[email]~=2.11.9 pydantic-settings~=2.10.1 python-dateutil==2.9.0.post0 @@ -50,6 +50,9 @@ black==26.3.1 # Utilities python-dotenv~=1.1.1 +bcrypt>=4.2.0 +PyJWT>=2.8.0 +psutil>=5.9.8 # Distributed Tracing - OpenTelemetry # Note: opentelemetry-exporter-jaeger 1.21.0 is the latest version compatible with Python 3.11 diff --git a/backend/src/tests/unit/test_asset_conversion_service.py b/backend/src/tests/unit/test_asset_conversion_service.py index 31c7095c..5520f516 100644 --- a/backend/src/tests/unit/test_asset_conversion_service.py +++ b/backend/src/tests/unit/test_asset_conversion_service.py @@ -92,14 +92,14 @@ async def test_call_ai_engine_convert_asset_success(self, service): @pytest.mark.asyncio async def test_fallback_texture_conversion(self, service): - with patch('shutil.copy2') as mock_copy: + with patch('services.asset_conversion_service.shutil.copy2') as mock_copy: result = await service._fallback_texture_conversion("in.png", "out.png") assert result["success"] is True mock_copy.assert_called_once() @pytest.mark.asyncio async def test_fallback_sound_conversion(self, service): - with patch('shutil.copy2') as mock_copy: + with patch('services.asset_conversion_service.shutil.copy2') as mock_copy: result = await service._fallback_sound_conversion("in.ogg", "out.ogg") assert result["success"] is True mock_copy.assert_called_once() diff --git a/frontend/src/components/BehaviorEditor/VisualEditor/VisualEditor.tsx b/frontend/src/components/BehaviorEditor/VisualEditor/VisualEditor.tsx index 5b931d4c..cb97e56f 100644 --- a/frontend/src/components/BehaviorEditor/VisualEditor/VisualEditor.tsx +++ b/frontend/src/components/BehaviorEditor/VisualEditor/VisualEditor.tsx @@ -131,7 +131,9 @@ export const VisualEditor: React.FC = ({ } const category = categories.find((c) => c.id === categoryId); if (!category) return []; - return fields.filter((field) => category.fields.includes(field.name)); + // ⚡ Bolt optimization: Convert array to Set for O(1) lookups instead of O(N*M) array.includes() filter + const categoryFieldsSet = new Set(category.fields); + return fields.filter((field) => categoryFieldsSet.has(field.name)); }, [fields, categories] );