Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/tui/src/component/dialog-mcp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
})

Expand Down
3 changes: 2 additions & 1 deletion packages/tui/test/cli/tui/dialog-mcp.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down Expand Up @@ -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",
},
],
Expand Down
Loading