Skip to content

CL-9721: Pre-fill MCP server name from URL and serverInfo - #1089

Merged
TheGreatAxios merged 8 commits into
mainfrom
cl-9721-mcp-prefill
Oct 9, 2026
Merged

TheGreatAxios merged 8 commits into
mainfrom
cl-9721-mcp-prefill

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Implements CL-9721.

The Tools page's add-by-URL card now pre-fills the server name:

  • Live suggestion from the pasted URL's host (skips generic mcp/api prefixes, so mcp.linear.app reads as Linear).
  • 'Look up name' probes the server through the hub's discovery route and prefers its self-reported serverInfo title/name, parsed with arktype.
  • The field stays editable: typed text is never overwritten, the hint shows the suggestion source, and name/handle collisions are de-duped against connected servers (Linear 2, handle-2).
  • Edge cases: empty/invalid URL falls back to 'MCP server'; blank/non-string serverInfo falls back to the URL; unreachable or auth-gated servers keep the URL suggestion with a toast; submit trims.

Verification: apps/web 99/99 unit tests pass (14 new in mcp-server-name.test.ts); e2e/mcp/oauth-connect passes; repo typecheck/lint/fmt green. Remaining e2e and no-test-file workspace failures reproduce identically on main.

@linear-code

linear-code Bot commented Oct 3, 2026

Copy link
Copy Markdown

CL-9721

Covers deriving a display name from serverInfo (title, then name)
with URL-host and plain fallbacks: trimming, capping, de-duping,
and null-safe handling of empty/invalid URLs.
The Tools page's add-by-URL card now fills the server name from the
pasted URL's host, offers a hub-probed lookup of the server's own
reported name, and keeps every suggestion editable with its source
shown. Names and handles are trimmed and de-duped against connected
servers; an unreachable server keeps the URL suggestion.
CL-9780 disables the new-workbench composer until workspace roles
have loaded. First-run e2e was clicking Start while the send button
was still disabled, so every suite that goes through first-run
timed out after the merge.
After CL-9782 the connected-server row reads "1 tool live". The
prefill suite still waited for the old plural string and timed out.
@TheGreatAxios
TheGreatAxios marked this pull request as draft October 7, 2026 17:25
@corbits-triage

corbits-triage Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

@TheGreatAxios, please address the following:

  • pull request is a draft
  • required checks are failing: e2e
  • pull request is too large: 790 lines (max 500)

Cover the fixes for the reviewed PR: an internationalized host reads back as
its real name, an IPv6 loopback gets a meaningful handle, a token-refused
server is marked as needing a bearer, and a typed name survives a look-up.
Brings the e2e flow's hint/button selectors up to the new name-row markup.
A suggestion never clobbers what was typed: look-up only resets the edit flag
when the field had not already been edited. International host names decode
from Punycode before being humanized, and an IPv6 loopback reads as
'localhost' instead of a degenerate slug.

Discovery failures now distinguish a token-refused server ('add it below')
from one that never answered ('check the URL'), and the no-name lookup no
longer toasts. The add-by-URL card's name row gains its own group so the long
hint wraps on full width, the look-up button meets the 44px touch target,
the inline flex spacer and bare rem gap give way to the 4/8/16px rhythm, and
the hint is wired to the field with aria-describedby.
@TheGreatAxios
TheGreatAxios marked this pull request as ready for review October 9, 2026 05:25
@TheGreatAxios
TheGreatAxios merged commit fc8e994 into main Oct 9, 2026
3 checks passed
@TheGreatAxios
TheGreatAxios deleted the cl-9721-mcp-prefill branch October 9, 2026 05:26
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