From 5ac527d49d112c04bd5dfca1916ef047b1994f26 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 23 Apr 2026 16:42:24 +0000 Subject: [PATCH] feat(ui): claude_code_plugins/MakeSkillPublicForm to shadcn - antd Modal/Button/Checkbox + @tremor Text/Title/Badge \u2192 shadcn Dialog/Button/Checkbox/Badge. - antd Steps/Step preserved for the 2-step wizard progress indicator. - Published/domain badges use categorical emerald/blue palette; confirmation info callouts use blue/amber tints (file added to .eslintrc.json overrides). Gates: TS \u2713 | Build \u2713. Co-authored-by: yuneng-jiang --- ui/litellm-dashboard/.eslintrc.json | 1 + .../MakeSkillPublicForm.tsx | 204 +++++++++++------- 2 files changed, 125 insertions(+), 80 deletions(-) diff --git a/ui/litellm-dashboard/.eslintrc.json b/ui/litellm-dashboard/.eslintrc.json index 6b7a80fb493..3b9b0ed0ec2 100644 --- a/ui/litellm-dashboard/.eslintrc.json +++ b/ui/litellm-dashboard/.eslintrc.json @@ -64,6 +64,7 @@ "src/components/mcp_tools/mcp_server_columns.tsx", "src/components/playground/chat_ui/A2AMetrics.tsx", "src/components/common_components/PassThroughGuardrailsSection.tsx", + "src/components/claude_code_plugins/MakeSkillPublicForm.tsx", "src/components/permissions/VectorStorePermissions.tsx", "src/components/permissions/AgentPermissions.tsx", "src/components/permissions/MCPServerPermissions.tsx", diff --git a/ui/litellm-dashboard/src/components/claude_code_plugins/MakeSkillPublicForm.tsx b/ui/litellm-dashboard/src/components/claude_code_plugins/MakeSkillPublicForm.tsx index 351502d78b4..ffacaffe1b1 100644 --- a/ui/litellm-dashboard/src/components/claude_code_plugins/MakeSkillPublicForm.tsx +++ b/ui/litellm-dashboard/src/components/claude_code_plugins/MakeSkillPublicForm.tsx @@ -1,7 +1,18 @@ import React, { useState, useEffect } from "react"; -import { Modal, Form, Steps, Button, Checkbox } from "antd"; -import { Text, Title, Badge } from "@tremor/react"; -import { enableClaudeCodePlugin, disableClaudeCodePlugin } from "../networking"; +import { Form, Steps } from "antd"; +import { Badge } from "@/components/ui/badge"; +import { Button } from "@/components/ui/button"; +import { Checkbox } from "@/components/ui/checkbox"; +import { + Dialog, + DialogContent, + DialogHeader, + DialogTitle, +} from "@/components/ui/dialog"; +import { + enableClaudeCodePlugin, + disableClaudeCodePlugin, +} from "../networking"; import NotificationsManager from "../molecules/notifications_manager"; import { Plugin } from "./types"; @@ -60,10 +71,11 @@ const MakeSkillPublicForm: React.FC = ({ } }; - // Pre-check already-published skills when modal opens useEffect(() => { if (visible && skillsList.length > 0) { - setSelectedSkills(new Set(skillsList.filter((s) => s.enabled).map((s) => s.name))); + setSelectedSkills( + new Set(skillsList.filter((s) => s.enabled).map((s) => s.name)), + ); } }, [visible, skillsList]); @@ -86,15 +98,19 @@ const MakeSkillPublicForm: React.FC = ({ return disableClaudeCodePlugin(accessToken, skill.name); } return Promise.resolve(); - }) + }), ); - NotificationsManager.success(`Skill Hub updated — ${selectedSkills.size} skill(s) published`); + NotificationsManager.success( + `Skill Hub updated — ${selectedSkills.size} skill(s) published`, + ); handleClose(); onSuccess(); } catch (error) { console.error("Error publishing skills:", error); - NotificationsManager.fromBackend("Failed to update skills. Please try again."); + NotificationsManager.fromBackend( + "Failed to update skills. Please try again.", + ); } finally { setLoading(false); } @@ -107,65 +123,76 @@ const MakeSkillPublicForm: React.FC = ({ const renderStep1 = () => (
- Select Skills to Publish - handleSelectAll(e.target.checked)} - disabled={skillsList.length === 0} - > - Select All ({skillsList.length}) - +

Select Skills to Publish

+
- +

Selected skills will be visible to all users in the Skill Hub. Deselected skills will be unpublished. - +

-
+
{skillsList.length === 0 ? ( -
- No skills registered yet. +
+

No skills registered yet.

) : ( skillsList.map((skill) => ( -
handleSkillSelection(skill.name, e.target.checked)} + onCheckedChange={(c) => + handleSkillSelection(skill.name, c === true) + } />
- {skill.name} + + {skill.name} + {skill.enabled && ( - Public + + Public + )}
{skill.description && ( - + {skill.description} - + )}
{skill.domain && ( - {skill.domain} + + {skill.domain} + )} -
+ )) )}
{selectedSkills.size > 0 && ( -
- - {selectedSkills.size} skill{selectedSkills.size !== 1 ? "s" : ""} will be published - +
+

+ {selectedSkills.size} skill + {selectedSkills.size !== 1 ? "s" : ""} will be published +

)}
@@ -173,25 +200,32 @@ const MakeSkillPublicForm: React.FC = ({ const renderStep2 = () => (
- Confirm Publish to Skill Hub +

Confirm Publish to Skill Hub

-
- - Note: Published skills will be visible to all users in the Skill Hub tab. - Skills not in the list below will be unpublished. - +
+

+ Note: Published skills will be visible to all users + in the Skill Hub tab. Skills not in the list below will be unpublished. +

- Skills to be published: -
+

Skills to be published:

+
{Array.from(selectedSkills).map((name) => { const skill = skillsList.find((s) => s.name === name); return ( -
- {name} - {skill?.domain && {skill.domain}} +
+ {name} + {skill?.domain && ( + + {skill.domain} + + )}
); })} @@ -199,50 +233,60 @@ const MakeSkillPublicForm: React.FC = ({
-
- - Total: {selectedSkills.size} skill{selectedSkills.size !== 1 ? "s" : ""} will be published - +
+

+ Total: {selectedSkills.size} skill + {selectedSkills.size !== 1 ? "s" : ""} will be published +

); return ( - (!o ? handleClose() : undefined)} > -
- - - - + + + Publish to Skill Hub + + + + + + - {currentStep === 0 ? renderStep1() : renderStep2()} + {currentStep === 0 ? renderStep1() : renderStep2()} -
- -
- {currentStep === 0 && ( - - )} - {currentStep === 1 && ( - - )} +
+ +
+ {currentStep === 0 && ( + + )} + {currentStep === 1 && ( + + )} +
-
- - + + + ); };