Skip to content

fix(webui): keep manual OAuth sign-in available for recovery and account switching - #1599

Merged
Dumbris merged 1 commit into
smart-mcp-proxy:mainfrom
tomgrin10:fix/manual-oauth-signin
Oct 13, 2026
Merged

Dumbris merged 1 commit into
smart-mcp-proxy:mainfrom
tomgrin10:fix/manual-oauth-signin

Conversation

@tomgrin10

@tomgrin10 tomgrin10 commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Description

Fixes #1598.

When an OAuth timeout is classified as a reconnect error, the Web UI hides Login. A healthy connection also has no direct account-switching action.

Add Sign in / Sign in again to the card's More actions menu and the detail page's Actions menu. One shared eligibility helper recognizes configured or discovered OAuth upstreams without depending on the suggested health action or background connection state. Disabled, stdio and non-OAuth servers remain excluded. The existing login endpoint and primary health actions are unchanged.

This PR is based directly on main and has no dependency on the remote-browser OAuth PR #1597.

Testing

  • I have tested these changes locally
  • I have added/updated tests that prove my fix is effective or my feature works
  • All existing tests pass
npm run test -- --run tests/unit/oauth-manual-signin.spec.ts tests/unit/server-card-quarantined-oauth-login.spec.ts --maxWorkers=2
Test Files  2 passed (2)
Tests       10 passed (10)

npm run build passes, including TypeScript checking. The new tests cover menu actions during reconnect/timeouts, connected OAuth servers, logout, discovered OAuth and exclusion of disabled/stdio/non-OAuth servers. The complete repository suite was not rerun for this UI-only change.

The two independent PR branches also merge without conflicts; their combined 14 affected frontend tests and production build pass.

@tomgrin10
tomgrin10 force-pushed the fix/manual-oauth-signin branch from 2127f5c to a195b50 Compare October 12, 2026 09:14
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Dumbris Dumbris changed the title Keep manual OAuth sign-in available for recovery and account switching fix(webui): keep manual OAuth sign-in available for recovery and account switching Oct 13, 2026
@Dumbris

Dumbris commented Oct 13, 2026

Copy link
Copy Markdown
Member

Thank you @tomgrin10 — this is a clean, well-scoped fix and exactly the right layer for it (a shared eligibility helper rather than another health.action special case).

What I checked before merging:

  • Read the diff against the existing sign-in gates (oauthSignInState, the Spec 109 one-primary-action rule) — the new entry lives in the secondary menus only, so the primary CTA table is untouched.
  • Ran the full frontend unit suite on a combined branch with fix(oauth): support OAuth sign-in from a remote Web UI #1597 (2652 tests) plus npm run build.
  • Live check on a scratch core with a test OAuth provider: the entry shows in the card's More actions and the detail Actions menu, triggers the login endpoint, and the label flips to "Sign in again" once connected.
  • Independent cross-model review (opencode, gpt-6.1-sol): no blocking findings. Two notes for later, neither worth holding this PR: the /oauth/i fallback on last_error can offer Sign in on a non-OAuth server whose error merely mentions OAuth (harmless, the login call just fails with a toast), and the "Sign in again" label keys on authenticated, which the backend sets as soon as a token record exists (a DCR registration creates one), so it can read "again" before any sign-in. That second one is a pre-existing backend quirk, not this PR.

I only retitled the PR to the conventional-commit form our title check requires. Merging.

@Dumbris
Dumbris merged commit 4031e33 into smart-mcp-proxy:main Oct 13, 2026
41 of 43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web UI hides manual OAuth sign-in during reconnect errors and account switching

3 participants