Skip to content

fix(client): fully collapse Output Schema and Meta panels in ToolsTab#1295

Open
SarthakB11 wants to merge 1 commit intomodelcontextprotocol:mainfrom
SarthakB11:fix/issue-928
Open

fix(client): fully collapse Output Schema and Meta panels in ToolsTab#1295
SarthakB11 wants to merge 1 commit intomodelcontextprotocol:mainfrom
SarthakB11:fix/issue-928

Conversation

@SarthakB11
Copy link
Copy Markdown

Summary

The Output Schema and Meta panels in the tool detail view kept rendering their JSON body inside a clipped scroll well (max-h-[8rem] overflow-y-auto) when "collapsed", so a chunk of the panel content stayed on screen and the toggle didn't really collapse anything. The issue's screenshot shows this clearly.

This PR conditionally renders each body only when the corresponding isOutputSchemaExpanded / isMetadataExpanded flag is true. Collapsed state now shows just the header row and the Expand button, matching the user expectation in #928.

The fix targets V1 (client/src/components/ToolsTab.tsx); the issue's screenshot is from the current V1 UI even though the issue carries the v2 label.

Fixes #928

Test plan

  • npm run prettier-fix clean
  • Manual: connect to the Everything server in UI mode, open a tool with an output schema, toggle Expand/Collapse on both the Output Schema and Meta panels. Collapsed state now shows only the header.
  • No existing test asserted collapsed-DOM contents in client/src/components/__tests__/ToolsTab.test.tsx, so no new test was added.

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.

Expand/Collapse should fully collapse panel

1 participant