feat: add tabbed interface with About and Tools tabs to server detail page#306
feat: add tabbed interface with About and Tools tabs to server detail page#306
Conversation
… page Introduce a tabbed layout on the catalog detail page with an About tab (existing server info) and a Tools tab (table listing MCP tool definitions extracted from server metadata). Add Zod schema validation for parsing _meta publisher-provided metadata, uniform 48px row heights across both tables, and OSV server fixture for MSW mocking. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@claude succinct review |
|
Claude finished @peppescg's task in 57s —— View job Code Review
Review SummaryOverall: Clean implementation with good adherence to project guidelines. A few minor suggestions for improvement. Strengths:
Suggestions:
No blocking issues - ready to merge after considering the suggestions. |
There was a problem hiding this comment.
Pull request overview
This PR adds a tabbed interface to the server detail page, enabling users to view both server information and available MCP tools. It introduces runtime validation using Zod to safely parse server metadata, extracts tool definitions from publisher-provided metadata, and displays them in a dedicated "Tools" tab.
Changes:
- Adds "About" and "Tools" tabs to the server detail page using a new
ServerDetailTabscomponent - Introduces Zod schemas for validating and parsing server metadata from the MCP registry
- Creates utility functions
getTools()to extract tool definitions and refactorsisVirtualMCPServer()to use the new schema-based parsing - Adds comprehensive tests for the new tab component and utility functions
- Updates mock data to include an example server with tool definitions
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/lib/schemas/server-meta.ts | New Zod schemas for validating server metadata structure and tool definitions |
| src/lib/utils.ts | Refactored isVirtualMCPServer() and added getTools() to use schema-based parsing |
| src/lib/utils.test.ts | Updated tests to use structured test data and added tests for getTools() |
| src/app/catalog/[repoName]/[serverName]/[version]/page.tsx | Integrated tab component and extracted tools from server data |
| src/app/catalog/[repoName]/[serverName]/[version]/components/server-detail-tabs.tsx | New tabbed interface component for About/Tools tabs |
| src/app/catalog/[repoName]/[serverName]/[version]/components/server-tools-table.tsx | New table component for displaying MCP tools with empty state |
| src/app/catalog/[repoName]/[serverName]/[version]/components/tests/server-detail-tabs.test.tsx | Comprehensive tests for tab switching and tool display |
| src/app/catalog/components/servers-table.tsx | Adjusted padding for visual consistency across tables |
| src/mocks/fixtures/registry_v0_1_servers/get.ts | Added OSV server with tool definitions for testing |
| package.json, pnpm-lock.yaml | Added Zod v4 dependency |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Added tools definition in the detail page
Kapture.2026-02-11.at.19.17.52.mp4