fix(tui): hide error hint when MCP Enter starts sign-in (#49403)

This commit is contained in:
Kit Langton
2026-09-16 12:33:08 -07:00
committed by GitHub
Unverified
parent 7df0935ada
commit 7689c3654e
2 changed files with 4 additions and 1 deletions
@@ -93,6 +93,8 @@ export function DialogMcp(props: { initialServer?: string; details?: boolean } =
const focusedError = createMemo(() => {
const server = focusedServer()
// Enter starts sign-in for auth-gated integrations instead of showing the auth reason
if (server?.status.status === "needs_auth" && server.integrationID) return undefined
return server ? statusError(server.status) : undefined
})
@@ -22,6 +22,7 @@ test.each(["enter", "space"])("starts OAuth with %s for an MCP server requiring
try {
await fixture.app.waitForFrame((frame) => frame.includes("Sign in required"))
expect(fixture.app.captureCharFrame()).not.toContain("enter to view error")
if (key === "enter") fixture.app.mockInput.pressEnter()
else fixture.app.mockInput.pressKey(" ")
await fixture.app.waitForFrame((frame) => frame.includes("Waiting for authorization"))
@@ -79,7 +80,7 @@ async function renderMcp(options?: { failed?: boolean; location?: { directory: s
name: "linear",
status: options?.failed
? { status: "failed", error: "MCP error -32000: Connection closed" }
: { status: "needs_auth" },
: { status: "needs_auth", error: "Authentication required" },
integrationID: "mcp_linear",
},
],