From 33cb594f057aa74b0bd6938c40363f201238bd0e Mon Sep 17 00:00:00 2001 From: yuneng-jiang Date: Mon, 23 Mar 2026 21:34:44 -0700 Subject: [PATCH 1/5] Migrate regenerate key modal from Tremor to antd components Replace Tremor Button, Grid, Col, Text, TextInput, Title with antd equivalents (Button, Typography, Input). Use antd Button loading prop instead of manual "Regenerating..." text. Replace Tailwind utility classes with inline styles to match antd patterns. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../organisms/regenerate_key_modal.tsx | 85 ++++++++++--------- 1 file changed, 44 insertions(+), 41 deletions(-) diff --git a/ui/litellm-dashboard/src/components/organisms/regenerate_key_modal.tsx b/ui/litellm-dashboard/src/components/organisms/regenerate_key_modal.tsx index 2fad101c20f..2902c792d5e 100644 --- a/ui/litellm-dashboard/src/components/organisms/regenerate_key_modal.tsx +++ b/ui/litellm-dashboard/src/components/organisms/regenerate_key_modal.tsx @@ -1,6 +1,5 @@ import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized"; -import { Button, Col, Grid, Text, TextInput, Title } from "@tremor/react"; -import { Form, InputNumber, Modal } from "antd"; +import { Button, Form, Input, InputNumber, Modal, Typography } from "antd"; import { add } from "date-fns"; import { useEffect, useState } from "react"; import { CopyToClipboard } from "react-copy-to-clipboard"; @@ -8,6 +7,8 @@ import { KeyResponse } from "../key_team_helpers/key_list"; import NotificationManager from "../molecules/notifications_manager"; import { regenerateKeyCall } from "../networking"; +const { Text, Title } = Typography; + interface RegenerateKeyModalProps { selectedToken: KeyResponse | null; visible: boolean; @@ -159,42 +160,42 @@ export function RegenerateKeyModal({ selectedToken, visible, onClose, onKeyUpdat , ] : [ - , - , ] } > {regeneratedKey ? ( - - Regenerated Key - -

- Please replace your old key with the new key generated. For security reasons,{" "} - you will not be able to view it again through your LiteLLM account. If you lose this secret key, - you will need to generate a new one. -

- - - Key Alias: -
-
{selectedToken?.key_alias || "No alias set"}
-
- New Virtual Key: -
-
{regeneratedKey}
-
- NotificationManager.success("Virtual Key copied to clipboard")} - > - - - -
+
+ Regenerated Key +

+ Please replace your old key with the new key generated. For security reasons,{" "} + you will not be able to view it again through your LiteLLM account. If you lose this secret key, + you will need to generate a new one. +

+ Key Alias: +
+
+              {selectedToken?.key_alias || "No alias set"}
+            
+
+ New Virtual Key: +
+
+              {regeneratedKey}
+            
+
+ NotificationManager.success("Virtual Key copied to clipboard")} + > + + +
) : (
- + @@ -217,18 +218,20 @@ export function RegenerateKeyModal({ selectedToken, visible, onClose, onKeyUpdat - - + + -
+ Current expiry: {selectedToken?.expires ? new Date(selectedToken.expires).toLocaleString() : "Never"} -
- {newExpiryTime &&
New expiry: {newExpiryTime}
} + + {newExpiryTime && ( +
New expiry: {newExpiryTime}
+ )} - + -
+ Recommended: 24h to 72h for production keys to allow seamless client migration. -
+ )} From 6fc1937d33cd9ad08ef53c562a02798ddb002782 Mon Sep 17 00:00:00 2001 From: yuneng-jiang Date: Mon, 23 Mar 2026 21:55:34 -0700 Subject: [PATCH 2/5] Use antd Text type="success" instead of hardcoded color Replace inline color "#52c41a" with antd's native for the new expiry message. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../src/components/organisms/regenerate_key_modal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/litellm-dashboard/src/components/organisms/regenerate_key_modal.tsx b/ui/litellm-dashboard/src/components/organisms/regenerate_key_modal.tsx index 2902c792d5e..9894da7e003 100644 --- a/ui/litellm-dashboard/src/components/organisms/regenerate_key_modal.tsx +++ b/ui/litellm-dashboard/src/components/organisms/regenerate_key_modal.tsx @@ -225,7 +225,7 @@ export function RegenerateKeyModal({ selectedToken, visible, onClose, onKeyUpdat Current expiry: {selectedToken?.expires ? new Date(selectedToken.expires).toLocaleString() : "Never"} {newExpiryTime && ( -
New expiry: {newExpiryTime}
+ New expiry: {newExpiryTime} )} Date: Mon, 23 Mar 2026 22:10:00 -0700 Subject: [PATCH 3/5] Add missing display: block to Current expiry Text The original
was block-level by default. The replacement renders inline, causing it to flow into the preceding form field. Add display: "block" to match the sibling New expiry element. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../src/components/organisms/regenerate_key_modal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/litellm-dashboard/src/components/organisms/regenerate_key_modal.tsx b/ui/litellm-dashboard/src/components/organisms/regenerate_key_modal.tsx index 9894da7e003..59b46bb35c6 100644 --- a/ui/litellm-dashboard/src/components/organisms/regenerate_key_modal.tsx +++ b/ui/litellm-dashboard/src/components/organisms/regenerate_key_modal.tsx @@ -221,7 +221,7 @@ export function RegenerateKeyModal({ selectedToken, visible, onClose, onKeyUpdat - + Current expiry: {selectedToken?.expires ? new Date(selectedToken.expires).toLocaleString() : "Never"} {newExpiryTime && ( From 345af54100292fd953ece75b247f09e1217c3e18 Mon Sep 17 00:00:00 2001 From: yuneng-jiang Date: Mon, 23 Mar 2026 22:12:40 -0700 Subject: [PATCH 4/5] Address greptile review feedback (greploop iteration 1) Add missing display: block and marginTop: 8 to the grace period recommendation Text element, matching the original div styling. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../src/components/organisms/regenerate_key_modal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/litellm-dashboard/src/components/organisms/regenerate_key_modal.tsx b/ui/litellm-dashboard/src/components/organisms/regenerate_key_modal.tsx index 59b46bb35c6..59d59cd519f 100644 --- a/ui/litellm-dashboard/src/components/organisms/regenerate_key_modal.tsx +++ b/ui/litellm-dashboard/src/components/organisms/regenerate_key_modal.tsx @@ -241,7 +241,7 @@ export function RegenerateKeyModal({ selectedToken, visible, onClose, onKeyUpdat > - + Recommended: 24h to 72h for production keys to allow seamless client migration. From 52343c1a997257d3a426f6c60bc96ef716df0597 Mon Sep 17 00:00:00 2001 From: yuneng-jiang Date: Mon, 23 Mar 2026 22:15:43 -0700 Subject: [PATCH 5/5] Address greptile review feedback (greploop iteration 2) Add missing marginTop: 8 to Current expiry Text element to restore the mt-2 spacing from the original div. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../src/components/organisms/regenerate_key_modal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/litellm-dashboard/src/components/organisms/regenerate_key_modal.tsx b/ui/litellm-dashboard/src/components/organisms/regenerate_key_modal.tsx index 59d59cd519f..1d7a95b598b 100644 --- a/ui/litellm-dashboard/src/components/organisms/regenerate_key_modal.tsx +++ b/ui/litellm-dashboard/src/components/organisms/regenerate_key_modal.tsx @@ -221,7 +221,7 @@ export function RegenerateKeyModal({ selectedToken, visible, onClose, onKeyUpdat - + Current expiry: {selectedToken?.expires ? new Date(selectedToken.expires).toLocaleString() : "Never"} {newExpiryTime && (