Skip to content

fix(mcp): say each fact once in a server's detail pane - #1190

Merged
agegr merged 1 commit into
mainfrom
fix/mcp-detail-pane-dedupe
Oct 11, 2026
Merged

agegr merged 1 commit into
mainfrom
fix/mcp-detail-pane-dedupe

Conversation

@agegr

@agegr agegr commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Problem

A server's pane in Settings › MCP repeated itself and mixed fonts. After a test of an HTTP server with an Authorization header it read:

  • Status "Connected when tested", then Connection "Connected 2 tool(s) listed…";
  • Transport "HTTP" right above URL https://…;
  • Headers Authorization, then Sign-in "Authorization header";
  • Listed tools and Tools as two rows;
  • "0 resource(s) and 0 resource template(s).";
  • a switched-off server: "Turned off in the file", then "Turned off in the file, so it does not connect."

Text came in three sizes (12px, 11px secondary lines, 10px tags). Literal text came in two (12px mono URL/path, 11px mono chips). The exposure dropdown used the mono font.

Change

  • Status and Connection are one row. The state label says the state once. What the test or session found follows it without its own state word. That word stays only when the state came from elsewhere, such as a switched-off entry that was tested ("Turned off in the file" / "Connected 2 tool(s) listed…").
  • No sentence restating a label. MCP_ROW_STATE_DETAIL_KEYS keeps only disconnected and conflict, shown after the status lines and cut to what to expect or do. disabled, not-trusted, replaced, overridden and mcp-off no longer have one.
  • Tools in one row. A connected test's tools are listed under the exposure choice and its explanation.
  • No Transport row beside a URL or Command; their label already says HTTP or stdio. The row stays only when neither is present.
  • No Sign-in row for an entry with its own Authorization header and no auth.provider; the Headers row lists the header.
  • Smaller repeats. Resources show only when there are any. "Ran in" shows only when the Working directory row does not name that very folder. A refused entry and a PI_WEB_PASSWORD entry no longer add a second "nothing to test" line: Test's aria-describedby points at the refusal's own line instead.
  • Fonts. All text is 12px in the interface font; secondary lines are only dimmer. Literal text (URL, command, paths, header and tool names) is 11px mono, in chips and rows alike (.mcp-config-code). Tags are 11px. The exposure dropdown uses the interface font instead of .mcp-add-input's mono.
  • Strings. The sign-in strings that pointed at "Connection above" now point at "Status above" (en, zh-CN, zh-TW). Keys that are no longer used were removed. The topic notes (mcp-settings.md, mcp-test-sign-in.md) describe the new layout.

After a test, the context7-like case now reads:

Status    Connected when tested
          2 tool(s) listed in 2.8 s, tested at 22:02.
          Server: Context7 4.3.0
URL       https://mcp.context7.com/mcp
Headers   Authorization
Tools     [Code mode (default) ▾]
          Only the server's name and summary are listed; …
          resolve-library-id  read-only   …
          query-docs  read-only           …
File      ~/.pi/agent/mcp.json

Checks

  • npm test: 2620 tests, 0 failures. tsc --noEmit is clean. eslint is clean on the changed files.
  • McpConfig.test.mjs now reads the Status row (label + lines) and checks each removed repeat: no Transport row, no header Sign-in row, no "does not connect" sentence, no empty resources, no "Ran in" when it is the working directory, and exactly one line carrying Test's describing id.
  • Checked by hand on a scratch server (temp PI_CODING_AGENT_DIR, local fixture servers). The cases were: HTTP with an Authorization header connected with tools; stdio with cwd/env connected; stdio failing with stderr; OAuth needing sign-in; switched off but tested. Computed fonts fall into UI 12px, UI 12px bold for the state, mono 11px and tags 11px. There is no horizontal overflow at 375px.

🤖 Generated with Claude Code

Settings › MCP's server pane repeated itself and mixed fonts: Status and
Connection both said "connected", Transport restated the URL, Sign-in
restated the Authorization header, tools sat in a row apart from the Tools
choice, and the exposure dropdown used the mono font.

- Status and Connection are one row: the state once, then what the test or
  session found; the status's own word only when the state came from
  elsewhere (a switched-off entry that was tested).
- State sentences that restate their label are gone; a dropped connection or
  a taken name keeps only what to expect or do, after the status lines.
- Listed tools go under the Tools row's choice; no Transport row beside a URL
  or Command; no Sign-in row for an entry with its own Authorization header.
- Resources only when there are any; "Ran in" only when the Working directory
  row does not name that folder; Test points at a refused entry's own line.
- One text size (12px UI, dimmer secondary lines), one mono size for literal
  text (11px), the dropdown in the interface font.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@agegr
agegr merged commit e8b0236 into main Oct 11, 2026
2 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.

1 participant