Repository navigation
[codex] Show MCP server names on installed cards - #1429
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
✅ Review complete. This review was performed through OpenHands Cloud Automation. You can log in and view the conversation here. |
all-hands-bot
left a comment
There was a problem hiding this comment.
🟡 Acceptable — Clean extraction of display logic into a dedicated, testable utility. The priority ordering (user-configured name > catalog name > command/URL fallback) is correct and the JSDoc comment explains the slug-vs-explicit-name distinction well. Two minor gaps to address before this is merge-ready.
[TESTING GAPS]
All three tests exercise shttp remote servers. The stdio command-fallback branch (server.type === "stdio" → name ?? server.command ?? "") is completely untested. Add at least one test case for it.
[PR Description — Evidence]
The Validation section lists commands to run but includes no actual output or screenshots. This is a visible UI change (MCP installed-card title). A before/after screenshot of the card with a user-configured server name vs. the catalog slug would confirm the fix works end-to-end in the real product.
[RISK ASSESSMENT]
- [Overall PR]
⚠️ Risk Assessment: 🟢 LOW
Display-only change confined to a single UI component and its new utility module. No data mutation, no API surface changes, no security implications.
VERDICT:
✅ Worth merging once the stdio test case is added and evidence is included in the description.
KEY INSIGHT:
The implicit convention that "marketplace installs store catalog.id as server.name" is load-bearing logic — the name !== catalog?.id guard is what distinguishes auto-generated slugs from user intent. This assumption holds as long as the marketplace install path is the only thing writing matching slug names; if that invariant ever breaks, the heuristic silently misfires.
This review was generated by an AI agent (OpenHands) on behalf of the user through OpenHands Automation. View conversation
Improve this review? If any feedback above seems incorrect or irrelevant to this repository, you can teach the reviewer to do better:
- Add a
.agents/skills/custom-codereview-guide.mdfile to your branch (or edit it if one already exists) with the/codereviewtrigger and the context the reviewer is missing. See the customization docs for the required frontmatter format.- Re-request a review - the reviewer reads guidelines from the PR branch, so your changes take effect immediately.
- When your PR is merged, the guideline file goes through normal code review by repository maintainers.
Resolve with AI? Install the iterate skill in your agent and run
/iterateto automatically drive this PR through CI, review, and QA until it's merge-ready.Was this review helpful? React with 👍 or 👎 to give feedback.
|
✅ Review complete. This review was performed through OpenHands Cloud Automation. You can log in and view the conversation here. Verdict: APPROVED — see inline review for one minor suggestion (add a whitespace-trim test case). |
all-hands-bot
left a comment
There was a problem hiding this comment.
Code Review Summary
Taste Rating: 🟢 Good taste — focused, well-named helper with a doc comment that explains the non-obvious "why" (the marketplace stores its slug as server.name for backend stability, so we have to detect that case). The change is minimal and ships with sensible unit coverage.
Behavior — For shttp/sse servers with a name but no catalog match, the card now shows the configured name instead of the raw URL. That is a behavior change versus the old catalog?.name ?? getServerTitle(server) path (which would have shown the URL), and it is the right call: a user-entered label is more useful than the URL on the installed card. Marketplace auto-installs continue to resolve to the catalog display name (GitHub) instead of the persisted slug (github), which is the bug this PR fixes. Stdio servers are unchanged.
Tests — Four cases cover the main branches (named remote, slug-only remote, unnamed remote URL fallback, unnamed stdio command fallback). See one inline suggestion to lock in the whitespace-trim behavior.
No critical or blocking issues.
Reviewer self-improvement: If anything above is wrong or irrelevant to this repo, add .agents/skills/custom-codereview-guide.md to your branch with the /codereview trigger and the missing context — the reviewer reads it from your branch on the next pass.
This review was generated by an AI agent (OpenHands) on behalf of the user through OpenHands Automation. View conversation
Evidence for PR #1429 / issue #1491. Shows installed MCP integration cards resolving titles per the configured-name -> catalog -> URL order. Co-authored-by: openhands <openhands@all-hands.dev>
|
PR Artifacts Notice This PR contains a
|
Evidence for PR #1429 / issue #1491. Shows installed MCP integration cards resolving titles per the configured-name -> catalog -> URL order. Co-authored-by: openhands <openhands@all-hands.dev>
c91eb0b to
ed786cc
Compare
✅ Mock-LLM Docker E2E Test Results60/60 passed Commit: Details
Posted by the Mock-LLM E2E workflow · results are deterministic (scripted LLM responses) |
✅ Mock-LLM E2E Tests60/60 passed Commit: Details
Posted by the Mock-LLM E2E workflow · results are deterministic (scripted LLM responses) |
|
🚀 Released in v1.2.0. |
HUMAN:
This PR makes installed MCP cards show the user-configured server name as the title, falling back to the marketplace catalog name or the URL/command. I re-verified the behavior by capturing a fresh screenshot in a fully isolated Agent Canvas run with a distinct settings directory and ports.
AGENT:
Why
Installed MCP cards used to show the marketplace slug or URL even when the user had configured a custom server name. The title should honor an explicit configured name first, then the catalog display name, then fall back to URL (remote) or command (stdio).
Summary
getInstalledServerTitle(server, catalog?)resolving configured (trimmed) name -> catalog display name -> URL/command fallback.How to Test
npx vitest run src/utils/mcp-installed-server-display.test.tsnpm run typecheck && npm run build🐳 Docker images for this PR
• GHCR package: https://github.com/OpenHands/agent-canvas/pkgs/container/agent-canvas
ghcr.io/openhands/agent-canvasghcr.io/openhands/agent-server:1.31.1-pythonopenhands-automation==1.1.2ed786ccf699c16d943ba1f41ea5352a0552785a1Pull (multi-arch manifest)
# Multi-arch manifest — Docker automatically pulls the correct architecture docker pull ghcr.io/openhands/agent-canvas:sha-ed786ccRun
All tags pushed for this build
About Multi-Architecture Support
sha-ed786cc) is a multi-arch manifest supporting both amd64 and arm64sha-ed786cc-amd64) are also available if neededCloses #2007
Evidence
Local run of the
codex/show-mcp-installed-card-namebranch against a local agent-server backend, with three configured remote MCP servers:work_githubhttps://api.githubcopilot.com/mcp/context_layer_namedhttps://openhands-context-layer.vercel.app/api/mcphttps://example.com/mcpTitle resolution order observed in the UI: configured server name -> marketplace catalog display name -> URL fallback.
1. Installed MCP card whose title resolves to the CONFIGURED server name (
work_github):2. Contrast — installed MCP card with no configured name, falling back to the URL:
3. Installed section overview showing all three cards together (
work_github,context_layer_named, URL fallback):