fix(plugins): improve MCP setup and configuration (v5.0 backport)

Merged
WE
15h ago
+335-43

Description

Improve MCP setup focus and discovery indicators. Expose editable server URLs with validation and accessible errors. Preserve read-only access and OAuth pass-through selection.

Manual cherry-pick of #16414 from main (381123cae9a63314ac271290cae6e11ca85ee58d). The original stack merged on main; its automatic release backport did not run. This cherry-pick applied without code changes.

Builds on https://github.com/onyx-dot-app/onyx/pull/16450. Merge this stack from bottom to top into release/v5.0.

How Has This Been Tested?

Validated the complete backport stack on release/v5.0:

  • 202 frontend component tests passed across MCP configuration, authentication, setup, default Chat, and OpenAPI plugins.
  • 353 backend MCP, route-contract, and OpenAPI availability tests passed.
  • Changed-file pre-commit checks passed, including Python and TypeScript typing, coverage, lint, formatting, translations, and feature-map integrity.
  • PostgreSQL setup and locking tests could not start: local PostgreSQL refused connections on port 5432.
  • Live provider OAuth was not rerun locally. Release CI will run on this PR.

Additional Options

  • [Optional] Please cherry-pick this PR to the latest release version.

Summary by cubic

Backports the MCP setup and configuration improvements from #16414 to the v5.0 release branch. The automatic backport didn't run, so this is a manual cherry-pick applied without code changes.

  • Setup now focuses the Server Name field and shows neutral probe indicators until a valid URL starts discovery; clearing or changing the URL resets the indicators and cancels the pending probe.
  • OAuth pass-through appears whenever Onyx OAuth login is enabled, even with advanced settings collapsed.
  • Saved servers show an editable URL with HTTP(S) validation for editors; viewers see a read-only field. URL changes open authentication to reconnect and rediscover tools; whitespace-only edits preserve credentials.
  • Metadata-only saves omit the URL, keep access grants, and retain cached server data if the reload fails.
  • Opal date-range picker and toast hooks now declare their client boundary at the source module.