inspector icon indicating copy to clipboard operation
inspector copied to clipboard

Really unfortunate word wrapping issue in the docs

Open mindplay-dk opened this issue 2 weeks ago • 4 comments

this is a documentation issue (there's no template for that)

the command examples are word-wrapping mid-word! resulting in commands that don't work

image

mindplay-dk avatar Nov 18 '26 14:11 mindplay-dk

Reproduced on https://modelcontextprotocol.io/docs/2026-07-28/tools/inspector in Chrome 157 (macOS arm64).

Where it happens: The Client | Invocation | What it's for table at the top of the page wraps @modelcontextprotocol/inspector mid-word across every tested viewport:

  • 640px (td 198px): @modelcontextprotocol/i / nspector
  • 1110px (td 234px): @modelcontextprotocol/inspec / tor
  • 1280px (td 175px, narrowed by the right TOC): @modelcontextprotoco / l/inspector
  • 1440px (td 227px): @modelcontextprotocol/inspe / ctor

The same rule splits table flags/env vars on /tools/inspector/cli (e.g., --prompt- / args, resources/templates / /list) and /tools/inspector/mcpdo (e.g., MCP_ALLOW_DEFAULT_CO / NNECTION), while /tools/inspector/tui tables have no mid-word splits. Fenced code blocks (<pre><code>) on all four pages use white-space: pre; word-break: normal and scroll horizontally without wrapping.

CSS cause & copy-paste check: Mintlify's base rule on code:not(pre *) sets word-break: break-word; overflow-wrap: break-word; box-decoration-break: clone;, so each wrapped line renders as a separate pill inside table-layout: auto cells. Drag-selecting across all lines or triple-clicking the cell in Chrome still copies npx @modelcontextprotocol/inspector cleanly without inserted newlines (and fenced block Copy buttons copy intact), so the break is visual — though the split pills and lack of a Copy button make partial selection or retyping error-prone.

Routing note: This page and its stylesheet live in modelcontextprotocol/modelcontextprotocol (docs/docs/2026-07-28/tools/inspector.mdx and docs/style.css), where either adjusting table inline-code wrapping in docs/style.css (e.g., table td code { white-space: nowrap; } with horizontal table scroll) or moving full commands out of narrow table cells would resolve it.

AI disclosure: Verified locally and drafted with an AI coding agent (Antigravity / Gemini) using headless Chrome viewport, computed-CSS, and selection checks.

KilianTheMagnificent avatar Nov 19 '26 00:11 KilianTheMagnificent

Reproduced the wrap issue in the docs pages, and the cause sits outside this repo: the page and stylesheet live in modelcontextprotocol/modelcontextprotocol (docs/docs/2026-07-28/tools/inspector.mdx and docs/style.css), so the fix belongs there rather than here. I can open the fix in that repo once a maintainer confirms the location, likely a Mintlify CSS rule that keeps code and command examples from wrapping mid-word. Let me know if that is the right home for it.

techaurah avatar Nov 19 '26 06:11 techaurah

Triage: Priority Low (total 4)

  • Severity 2 — code in the docs tables wraps mid-word, which makes it hard to read
  • Urgency 2 — wanted eventually
  • Bonuses: none (relabeled from bug to documentation)

Note: the page and its stylesheet live in modelcontextprotocol/modelcontextprotocol (docs/docs/2026-07-28/tools/inspector.mdx, docs/style.css), so the fix probably belongs there.

Board: #28, Status Incoming (awaiting maintainer review — no milestone yet).

cliffhall avatar Nov 24 '26 03:11 cliffhall

Thanks for the triage, @cliffhall. I will open the fix in modelcontextprotocol/modelcontextprotocol once a maintainer confirms that is the right repo. It will be a small CSS/docs change so code in docs tables does not wrap mid-word. My claim to work on this stands.

techaurah avatar Nov 24 '26 07:11 techaurah