-
Notifications
You must be signed in to change notification settings - Fork 625
fix: resolve MCP market button alignment and layout issues #769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughUI layout adjustments in McpBuiltinMarket.vue: grid items set to equal height, card content constrained to prevent overflow, server key and action row made responsive with stacking on small screens, button titles dynamic based on install state, and alignment refinements. No data fetching or business logic changes. Changes
Sequence Diagram(s)Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changesPoem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (4)
src/renderer/src/components/settings/McpBuiltinMarket.vue (4)
42-42: Grid stretch is on point; consider auto-rows-fr for more robust equal-height cards across rows
items-stretch+h-fullaligns cards within a row. If you also want consistent track heights across auto-generated rows, addauto-rows-fr(Tailwind: grid-auto-rows: minmax(0,1fr)). This can further stabilize button alignment vertically when content lengths vary significantly.Please verify your Tailwind config includes the
auto-rows-frutility (Tailwind ≥ v3). Also sanity-check at 638px and 640px widths.- class="p-4 grid gap-3 grid-cols-1 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 items-stretch" + class="p-4 grid gap-3 grid-cols-1 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 items-stretch auto-rows-fr"Minor: coding guidelines request English for comments/logs; consider translating in-file comments in a follow-up.
59-61: Resolve conflicting margins:mt-2is overridden bymt-autoRight now the container has both
mt-2andmt-auto. Due to identical specificity, one wins globally (build-order dependent), leading to unpredictable spacing. If the intent is “normal spacing on small screens, bottom-pinned on md+”, scopemt-autoto md.Visually check on <640px that there’s a small gap above the action row; on ≥md it should pin to the bottom.
- class="mt-2 flex flex-col gap-2 md:flex-row md:items-center md:justify-between mt-auto" + class="mt-2 md:mt-auto flex flex-col gap-2 md:flex-row md:items-center md:justify-between"
62-66: Tiny UX win: make server_key easier to copyAdd
select-allso users can click-and-copy the full key. Truncation +titleis great; this complements it for copyability.- class="text-xs font-mono px-2 py-0.5 bg-muted rounded truncate" + class="text-xs font-mono px-2 py-0.5 bg-muted rounded truncate select-all"
67-71: Prevent duplicate installs by disabling the button while a request is in flightCurrently the button disables only after install completes (when in
installedServers). Rapid clicks can fire multiple installs and duplicate toasts. Track in-flight installs perserver_keyand disable accordingly. Also setaria-busyfor a11y.I can push a follow-up commit wiring this if you’d like.
Diff within this block:
- :disabled="installedServers.has(item.server_key)" + :disabled="installedServers.has(item.server_key) || installingKeys.has(item.server_key)" @@ - class="w-full md:w-auto" + :aria-busy="installingKeys.has(item.server_key)" + class="w-full md:w-auto"Additions outside this block (script setup):
// near other refs const installingKeys = ref<Set<string>>(new Set()) // in install() const install = async (item: MarketItem) => { try { if (installingKeys.value.has(item.server_key)) return installingKeys.value.add(item.server_key) if (!apiKeyInput.value.trim()) { toast({ title: t('mcp.market.apiKeyRequiredTitle'), description: t('mcp.market.apiKeyRequiredDesc'), variant: 'destructive' }) return } await mcpP.setMcpRouterApiKey?.(apiKeyInput.value.trim()) const ok = await mcpP.installMcpRouterServer?.(item.server_key) if (ok) { toast({ title: t('mcp.market.installSuccess') }) installedServers.value.add(item.server_key) } else { toast({ title: t('mcp.market.installFailed'), variant: 'destructive' }) } } catch (e) { toast({ title: t('mcp.market.installFailed'), description: String(e), variant: 'destructive' }) } finally { installingKeys.value.delete(item.server_key) } }Also applies to: 72-78
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
src/renderer/src/components/settings/McpBuiltinMarket.vue(1 hunks)
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{ts,tsx,js,jsx,vue}
📄 CodeRabbit inference engine (CLAUDE.md)
Use English for logs and comments
Files:
src/renderer/src/components/settings/McpBuiltinMarket.vue
src/renderer/src/**/*.vue
📄 CodeRabbit inference engine (CLAUDE.md)
src/renderer/src/**/*.vue: Use Composition API for all Vue 3 components
Use Tailwind CSS with scoped styles for styling
Organize components by feature in src/renderer/src/
Follow existing component patterns in src/renderer/src/ when creating new UI components
Use Composition API with proper TypeScript typing for new UI components
Implement responsive design with Tailwind CSS for new UI components
Add proper error handling and loading states for new UI componentsUse scoped styles to prevent CSS conflicts between components
Files:
src/renderer/src/components/settings/McpBuiltinMarket.vue
src/renderer/src/**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (CLAUDE.md)
src/renderer/src/**/*.{ts,tsx,vue}: Use Pinia for frontend state management
Renderer to Main: Use usePresenter.ts composable for direct presenter method calls
Files:
src/renderer/src/components/settings/McpBuiltinMarket.vue
src/renderer/src/**/*
📄 CodeRabbit inference engine (.cursor/rules/i18n.mdc)
src/renderer/src/**/*: All user-facing strings must use i18n keys (avoid hardcoded user-visible text in code)
Use the 'vue-i18n' framework for all internationalization in the renderer
Ensure all user-visible text in the renderer uses the translation system
Files:
src/renderer/src/components/settings/McpBuiltinMarket.vue
src/renderer/**/*.{vue,ts,js,tsx,jsx}
📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)
渲染进程代码放在
src/renderer
Files:
src/renderer/src/components/settings/McpBuiltinMarket.vue
src/renderer/src/**/*.{vue,ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/vue-best-practices.mdc)
src/renderer/src/**/*.{vue,ts,tsx,js,jsx}: Use the Composition API for better code organization and reusability
Implement proper state management with Pinia
Utilize Vue Router for navigation and route management
Leverage Vue's built-in reactivity system for efficient data handling
Files:
src/renderer/src/components/settings/McpBuiltinMarket.vue
src/renderer/**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)
src/renderer/**/*.{ts,tsx,vue}: Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).
Use TypeScript for all code; prefer types over interfaces.
Avoid enums; use const objects instead.
Use arrow functions for methods and computed properties.
Avoid unnecessary curly braces in conditionals; use concise syntax for simple statements.
Files:
src/renderer/src/components/settings/McpBuiltinMarket.vue
src/renderer/**/*.{vue,ts}
📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)
Implement lazy loading for routes and components.
Files:
src/renderer/src/components/settings/McpBuiltinMarket.vue
src/renderer/**/*.{ts,vue}
📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)
src/renderer/**/*.{ts,vue}: Use useFetch and useAsyncData for data fetching.
Implement SEO best practices using Nuxt's useHead and useSeoMeta.
Files:
src/renderer/src/components/settings/McpBuiltinMarket.vue
🔇 Additional comments (2)
src/renderer/src/components/settings/McpBuiltinMarket.vue (2)
47-47: Card container change looks good
flex flex-col h-fullon the card is the right call to letmt-autowork reliably.
53-56: Description overflow handling is correct
line-clamp-3+min-h-0 overflow-hiddenprevents text from pushing the layout. Good improvement for the reported overflow.
close #768



Summary by CodeRabbit
Style
Bug Fixes