fix(backend,frontend): address CodeRabbit review comments

Backend:
- Fix async fixture decorators in conftest.py and test files
- Add loop_scope="session" to async fixtures for consistency
- Change @pytest.fixture to @pytest_asyncio.fixture for graph_cleanup

Frontend:
- Update help text to reference inline toggle instead of settings page
This commit is contained in:
Zamil Majdy
2026-01-24 11:35:05 -06:00
parent aeb36fee2f
commit dfac022c18
4 changed files with 5 additions and 6 deletions

View File

@@ -22,7 +22,7 @@ from .model import PendingHumanReviewModel
FIXED_NOW = datetime.datetime(2023, 1, 1, 0, 0, 0, tzinfo=datetime.timezone.utc)
@pytest_asyncio.fixture
@pytest_asyncio.fixture(scope="session", loop_scope="session")
async def client(server, mock_jwt_user) -> AsyncGenerator[httpx.AsyncClient, None]:
"""Create async HTTP client with auth overrides"""
from autogpt_libs.auth.jwt_utils import get_jwt_payload

View File

@@ -45,7 +45,7 @@ def test_user_id() -> str:
return str(uuid.uuid4())
@pytest_asyncio.fixture
@pytest_asyncio.fixture(scope="session", loop_scope="session")
async def test_user(server, test_user_id: str):
"""Create a test user in the database."""
await PrismaUser.prisma().create(

View File

@@ -1,7 +1,6 @@
import logging
import os
import pytest
import pytest_asyncio
from dotenv import load_dotenv
@@ -28,7 +27,7 @@ async def server():
yield server
@pytest.fixture(scope="session", autouse=True)
@pytest_asyncio.fixture(scope="session", loop_scope="session", autouse=True)
async def graph_cleanup(server):
created_graph_ids = []
original_create_graph = server.agent_server.test_create_graph

View File

@@ -326,8 +326,8 @@ export function PendingReviewsList({
</div>
<Text variant="small" className="text-textGrey">
You can turn auto-approval on or off anytime in this agent&apos;s
settings.
You can turn auto-approval on or off using the toggle above for each
node.
</Text>
</div>
</div>