fix(layout): make all panels resizable, not just History (#1172)#1254
Open
MukundaKatta wants to merge 1 commit intomodelcontextprotocol:mainfrom
Open
fix(layout): make all panels resizable, not just History (#1172)#1254MukundaKatta wants to merge 1 commit intomodelcontextprotocol:mainfrom
MukundaKatta wants to merge 1 commit intomodelcontextprotocol:mainfrom
Conversation
…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
Member
|
Hi @MukundaKatta can you attach video / screenshots? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-2and 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:
useDraggableHorizontalPane(initial, min, max)hook that mirrors the existinguseDraggablePane(vertical, used by History) anduseDraggableSidebar(horizontal, used by the sidebar) hooks. Same drag-with-mouse-events pattern, just with caller-supplied bounds so each splitter can pick sensible limits.ToolsTabto render a column splitter between the tools list and the details pane (replacinggrid grid-cols-2 gap-4with aflexlayout + acursor-col-resizehandle, matching the existing visual style of the history splitter).The handle has
role="separator"/aria-orientation="vertical"for a11y and adata-testidso 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-3pattern (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.role="separator").