diff --git a/tests/services/test_github_copilot_auth.py b/tests/services/test_github_copilot_auth.py index b92d63096..2ff7b732e 100644 --- a/tests/services/test_github_copilot_auth.py +++ b/tests/services/test_github_copilot_auth.py @@ -403,10 +403,15 @@ def test_sequential_event_loops_never_leave_orphaned_waiting_state(tmp_path, mon started = await service.start_login() assert started["operation_state"] == "waiting" - asyncio.run(start_in_loop_one()) + # GraphRAG's nest_asyncio2 patch can make asyncio.run reuse an open loop. + # Own the loop explicitly so leaving this block cancels the polling task. + with asyncio.Runner() as runner: + first_loop = runner.get_loop() + runner.run(start_in_loop_one()) + assert first_loop.is_closed() - # Loop 1 is now closed; loop 2 must detect the orphaned task and never return waiting. - status_in_loop_two = asyncio.run(service.status()) + with asyncio.Runner() as runner: + status_in_loop_two = runner.run(service.status()) assert status_in_loop_two["operation_state"] != "waiting" assert status_in_loop_two["connection"] == "error" diff --git a/web/components/settings/SettingsMain.tsx b/web/components/settings/SettingsMain.tsx index e6833f072..b39c61293 100644 --- a/web/components/settings/SettingsMain.tsx +++ b/web/components/settings/SettingsMain.tsx @@ -101,7 +101,7 @@ export default function SettingsMain({ children }: { children: React.ReactNode } // its own rounded edge, so opening settings no longer replaces the whole // window. Phones have no room for a floating card and get the full sheet.
{