Conversation
|
Changed-file classification: UI-sensitive. Author-reported runtime / visual state
Checkboxes are author attestations. GitHub Actions results remain the execution evidence for CI; this check does not prove that a local command ran. This comment updates automatically when the description or changed files change. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #6215. After merging, reviewer o3LL noted that
static/js/settings.js's Add MCP Server failure branch still shows a genericFailed (${r.status})instead of the server's actual validation message, and flagged it as fine for a separate PR.routes/mcp/mcp_routes.py'sadd_server()returnsHTTPException(400, "...")for every validation failure (missing command, missing URL, malformed Args), and FastAPI puts that message in the response body'sdetailfield.static/js/admin.js's own Add MCP Server handler already reads it (data.detail || \Failed (${res.status})``, admin.js:2391); settings.js's copy of the same form never picked it up. This fix mirrors that existing line exactly.Target branch
dev, notmain.Linked Issue
Fixes #6282
Type of Change
Checklist
devdocker compose uporuvicorn app:app) and verified the change works end-to-end. Type-checks and unit tests are not enough.How to Test
node --check static/js/settings.jspasses.uf-mcp-saveclick handler, the real source lines rather than a rewritten copy, from bothorigin/devand this branch, and ran each in a Nodevmsandbox with a mocked 400 response carrying{"detail": "command is required for stdio transport"}: thedevversion rendersFailed (400), this branch renders the server's actual message. The other three branches of thatif/else(needs_auth,connected, plainSaved) are untouched by the diff.initUnifiedIntegrations's MCP form (tests/helpers/test_settings_shell*.jscover the extractedsettings/*.jsshell modules, a different file), and the equivalent line inadmin.jsis likewise untested today.Visual / UI changes, REQUIRED if you touched anything that renders
#uf-mcp-msgstatus line and the exact fallback already used atadmin.js:2391for the same failure.