MCP servers clarity improvements & new filters/sort - #162
Conversation
|
@ChristophePRAT is attempting to deploy a commit to the Proxy Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughAdds transport_type to MCPServerPublic in backend schemas, propagates it through control_plane construction, updates frontend types, and enhances MCP servers page with sorting, a “Custom Only” filter, and a transport type badge. Rendering now sorts filtered results by selected criteria. Changes
Sequence Diagram(s)sequenceDiagram
participant UI as Frontend UI (MCP Servers page)
participant API as API/Control Plane
participant DB as Data Store
UI->>API: GET /mcp-servers
API->>DB: Query MCP servers
DB-->>API: Server records (including transport_type)
API-->>UI: MCPServerPublic[] { ..., transport_type }
rect rgb(240, 248, 255)
note over UI: Client-side processing
UI->>UI: Apply search/category filters
UI->>UI: Apply customOnly filter
UI->>UI: Sort by name/type/last_synced/created_at/updated_at
UI->>UI: Render grid with transport type badge
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
backend/aci/common/schemas/mcp_server.py (1)
141-141: Remove the obsolete TODO comment.This TODO is now resolved by the addition of
transport_typeat Line 152 in this PR.Apply this diff to remove the comment:
- # TODO: is it necessary to expose transport_type?frontend/src/app/(dashboard)/mcp-servers/page.tsx (1)
243-248: Explicitly handle both transport type values.The current ternary assumes only two values but doesn't explicitly check for
"streamable_http". While this works, a more explicit check improves maintainability and makes unexpected values visible.Apply this diff for more robust handling:
- <Badge variant="outline" className="text-xs text-muted-foreground"> - {server.transport_type === "sse" ? "SSE" : "HTTP"} - </Badge> + <Badge variant="outline" className="text-xs text-muted-foreground"> + {server.transport_type === "sse" + ? "SSE" + : server.transport_type === "streamable_http" + ? "HTTP" + : server.transport_type?.toUpperCase()} + </Badge>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
backend/aci/common/schemas/mcp_server.py(1 hunks)backend/aci/control_plane/schema_utils.py(1 hunks)frontend/src/app/(dashboard)/mcp-servers/page.tsx(6 hunks)frontend/src/features/mcp/types/mcp.types.ts(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
frontend/src/app/(dashboard)/mcp-servers/page.tsx (3)
frontend/src/components/ui/checkbox.tsx (1)
Checkbox(32-32)frontend/src/components/ui/label.tsx (1)
Label(24-24)frontend/src/components/ui/select.tsx (5)
Select(149-149)SelectTrigger(152-152)SelectValue(151-151)SelectContent(153-153)SelectItem(155-155)
backend/aci/common/schemas/mcp_server.py (1)
backend/aci/common/enums.py (1)
MCPServerTransportType(52-54)
🔇 Additional comments (11)
backend/aci/common/schemas/mcp_server.py (1)
152-152: LGTM!The
transport_typefield addition correctly uses theMCPServerTransportTypeenum and integrates well with the existing schema structure.backend/aci/control_plane/schema_utils.py (1)
45-45: LGTM!The
transport_typefield is correctly sourced frommcp_server.transport_typeand passed to theMCPServerPublicconstructor, maintaining consistency with the schema definition.frontend/src/features/mcp/types/mcp.types.ts (1)
49-49: LGTM!The nullable
transport_typefield provides defensive typing that gracefully handles cases where the value might be absent, which is appropriate for UI resilience.frontend/src/app/(dashboard)/mcp-servers/page.tsx (8)
7-8: LGTM!The
CheckboxandLabelimports are correctly added to support the new "Custom Only" filter UI.
32-33: LGTM!The new state variables for sorting and filtering are properly initialized with sensible defaults.
57-59: LGTM!The explicit return statement in the
serversmemoization improves code clarity without changing functionality.
68-80: LGTM!The filtering logic correctly implements the "Custom Only" filter by checking
organization_id !== null, and the boolean expression properly handles both the enabled and disabled states of the filter.
82-110: LGTM!The sorting implementation correctly handles all sort options with appropriate null handling and date comparisons. The descending order for date fields (most recent first) provides a good user experience.
151-196: LGTM!The UI layout improvements provide a clean, responsive interface for the new filtering and sorting controls. The flex-based layout adapts well to different screen sizes.
221-221: LGTM!Correctly updated to render
sortedServersinstead offilteredServers, ensuring the sorting logic is applied to the displayed results.
228-241: LGTM!The refactored header layout with the logo and name on the same row improves visual hierarchy and card aesthetics.
🏷️ Ticket
#139
📝 Description
I added the transport type (
SSEorStreamable HTTP), a sort option (either by name, creation date, update date or last synced date), and a custom-servers-only switch.🎥 Demo
Screen.Recording.2025-10-09.at.17.11.52.mov
✅ Checklist
Summary by cubic
Adds transport type and new filters/sorting to the MCP Servers page for clearer browsing and faster discovery. Addresses #139 by exposing transport type and adding a “Custom Only” filter and sort options.
Summary by CodeRabbit
New Features
UI Improvements