MCP Test: flag authorizing before the background connect; notice copy says Connectors

The GUI's fast poll keyed off a status the task hadn't set yet, so a failing Test
looked dead until the 5s tick.
This commit is contained in:
Rohit C Prasad
2026-08-21 10:43:16 -07:00
parent 76e7276f7a
commit 4ac1e59370
4 changed files with 37 additions and 3 deletions
+2 -1
View File
@@ -1177,6 +1177,7 @@ def create_app(manager: SessionManager) -> FastAPI:
# browser and waits on the loopback callback — that can take minutes, so it
# runs as a background task; the GUI polls /v1/mcp for the status flip
# (authorizing → connected | needs_auth + last_error).
manager.begin_mcp_connect(name) # authorizing shows on the very next poll
asyncio.create_task(manager.connect_mcp(name))
return {"ok": True, "started": True}
@@ -2367,7 +2368,7 @@ def create_app(manager: SessionManager) -> FastAPI:
engine._append_notice(
"mcp_error",
f"MCP server “{name}” failed to start{detail}"[:300]
+ " — see Settings ▸ MCP",
+ " — see Settings ▸ Connectors",
)
# Auto-compaction failure prompt (OPE-27): only an ATTENDED session may be asked
# Retry/Trim — unattended runs auto-trim (the policy in engine._compact_now).