Merge pull request #3199 : fix(settings): restore the floating settings card stacking

Restore z-40 on the floating settings overlay so the Windows desktop frame audits pass.

Use explicit asyncio.Runner contexts in the Copilot login test so GraphRAG's asyncio patch cannot leave the first event loop open. Includes the fix from #3206.

Web Node Tests and Python 3.12 CI passed.
This commit is contained in:
AleFlyX
2026-12-03 17:17:58 +08:00
committed by GitHub
2 changed files with 9 additions and 4 deletions

View File

@@ -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"

View File

@@ -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.
<div
className="animate-overlay-in fixed inset-0 flex items-center justify-center overflow-hidden bg-[var(--overlay)] p-0 md:p-6"
className="animate-overlay-in fixed inset-0 z-40 flex items-center justify-center overflow-hidden bg-[var(--overlay)] p-0 md:p-6"
data-settings-shell
data-desktop-shell
onMouseDown={event => {