Skip to content

fix(layout): make all panels resizable, not just History (#1172)#1254

Open
MukundaKatta wants to merge 1 commit intomodelcontextprotocol:mainfrom
MukundaKatta:fix/resizable-top-panes-1172
Open

fix(layout): make all panels resizable, not just History (#1172)#1254
MukundaKatta wants to merge 1 commit intomodelcontextprotocol:mainfrom
MukundaKatta:fix/resizable-top-panes-1172

Conversation

@MukundaKatta
Copy link
Copy Markdown

Summary

Closes #1172.

The inspector previously only had a working resizer for the bottom History pane. The horizontal split between the tools list and the tool details / result pane was a fixed grid grid-cols-2 and could not be resized, which is what the bug report's screenshot shows: dragging the bottom splitter only changed the history height, the top tools area stayed cramped.

This PR:

  • Adds a generic useDraggableHorizontalPane(initial, min, max) hook that mirrors the existing useDraggablePane (vertical, used by History) and useDraggableSidebar (horizontal, used by the sidebar) hooks. Same drag-with-mouse-events pattern, just with caller-supplied bounds so each splitter can pick sensible limits.
  • Uses it in ToolsTab to render a column splitter between the tools list and the details pane (replacing grid grid-cols-2 gap-4 with a flex layout + a cursor-col-resize handle, matching the existing visual style of the history splitter).

The handle has role="separator" / aria-orientation="vertical" for a11y and a data-testid so future tests can grab it.

Scope note

This PR fixes the Tools tab (the one shown in the linked issue's screenshot). The other top-level tabs that use the same grid grid-cols-2 / grid-cols-3 pattern (Resources, Prompts, Tasks) can be migrated to the same hook in a small follow-up — the hook is intentionally generic so that's a pure mechanical change. Kept the diff tight here so this can land quickly and unblock the user-visible bug; happy to do the others in a follow-up PR if maintainers prefer one PR per tab, or fold them into this PR if you'd rather.

Test plan

  • cd client && npm run dev, open a server with tools, click the Tools tab.
  • Verify a vertical drag handle appears between the tools list and the tool details panel.
  • Drag left/right and confirm the list pane resizes between ~240px and ~800px and the details pane fills the remaining width.
  • Verify the existing History splitter at the bottom still works (unchanged).
  • Verify the existing sidebar splitter still works (unchanged).
  • Verify keyboard a11y is not regressed (the handle has role="separator").

…protocol#1172)

The inspector previously only had a working resizer for the bottom
History pane. The horizontal split between the tools list and the
tool details/result pane was a fixed `grid grid-cols-2` and could
not be resized, so when the tool list contained items with long
names the details column stayed cramped (and vice versa).

Adds a generic `useDraggableHorizontalPane` hook that mirrors the
existing `useDraggablePane` (history) / `useDraggableSidebar`
hooks, and uses it to render a draggable column splitter between
the tools list and the details pane in `ToolsTab`. The same hook
can be reused to upgrade the resources/prompts/tasks tabs in a
follow-up.

Fixes modelcontextprotocol#1172
@cliffhall
Copy link
Copy Markdown
Member

cliffhall commented Apr 28, 2026

Hi @MukundaKatta can you attach video / screenshots?

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.

Resizing panels only works for History

2 participants