Skip to content

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

Merged
kitlangton merged 1 commit into
v2from
mcp-error-footer
Sep 16, 2026
Merged

kitlangton merged 1 commit into
v2from
mcp-error-footer

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

Why

Since #48939, needs_auth MCP servers carry a required error reason. That made statusError() treat them as error-bearing, so the dialog footer rendered enter to view error for servers like stripe or uidotsh. But Enter does not open an error view for these servers: when the server has an integration, it starts the sign-in flow. The hint was wrong.

What Changes

The footer hint now matches what Enter actually does:

Server state Before After
needs_auth with integration (e.g. stripe) enter to view error sign in space sign in space
needs_auth without integration enter to view error space unchanged — Enter still opens the error details
failed enter to view error space unchanged

Before: MCP servers dialog for a sign-in-gated server shows enter to view error even though Enter opens sign-in.

After: the footer only offers sign in space.

Demo

Side-by-side recording of the same fixture MCP server (a remote endpoint returning 401, so it lands in needs_auth with an integration) against the pre-fix baseline (left, BEFORE mark) and this branch (right, AFTER mark). Both run the identical /mcps dialog; only the footer hint differs. See the attached mcp-footer-before-after.mp4.

Scope

This PR only changes the focused-server footer logic in DialogMcp. The Needs authentication: <reason> line in the server status dialog is informational and intentionally unchanged.

Verification

cd packages/tui
bun run test test/cli/tui/dialog-mcp.test.tsx
bun typecheck
  • The regression test fails on v2 with the exact footer from the bug report (enter to view error sign in space) and passes with the fix.
  • bun run check from the repo root: lint + typecheck clean (also enforced by the pre-push hook).
  • Manual Drive recording above compares v2 vs this branch against a live 401 MCP endpoint.
mcp-footer-before-after.mp4

@kitlangton
kitlangton enabled auto-merge (squash) September 16, 2026 19:32
@kitlangton
kitlangton merged commit 7689c36 into v2 Sep 16, 2026
10 checks passed
@kitlangton
kitlangton deleted the mcp-error-footer branch September 16, 2026 19:33
jinhuang712 pushed a commit to jinhuang712/opencode that referenced this pull request Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant