From 48b3d1889395bb63c0a3a458167ed65073538b5d Mon Sep 17 00:00:00 2001 From: Yuneng Jiang Date: Sat, 1 Aug 2026 09:28:02 -0700 Subject: [PATCH] feat(ui): note in the add-member modal that search covers existing users only Both fields select from a server-side search over existing accounts, so a typed-in address or id never becomes a value. Say so up front rather than letting the form look like it accepts a new user and fail on submit. Applies to the organization member modal too, which shares this component. --- .../common_components/user_search_modal.test.tsx | 10 ++++++++++ .../components/common_components/user_search_modal.tsx | 10 +++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ui/litellm-dashboard/src/components/common_components/user_search_modal.test.tsx b/ui/litellm-dashboard/src/components/common_components/user_search_modal.test.tsx index 72b0e10e5d6..634c78d28d0 100644 --- a/ui/litellm-dashboard/src/components/common_components/user_search_modal.test.tsx +++ b/ui/litellm-dashboard/src/components/common_components/user_search_modal.test.tsx @@ -65,4 +65,14 @@ describe("UserSearchModal", () => { expect(userFilterUICall).not.toHaveBeenCalled(); }); + + it("tells the user that only existing accounts can be selected", () => { + renderModal(); + + const notice = screen.getByRole("alert"); + expect(notice).toHaveTextContent(/users that already exist/i); + expect(notice).toHaveTextContent(/ask a proxy admin to create their account first/i); + // info, not warning: a warning here would read as an error state on an empty form + expect(notice.className).toMatch(/ant-alert-info/); + }); }); diff --git a/ui/litellm-dashboard/src/components/common_components/user_search_modal.tsx b/ui/litellm-dashboard/src/components/common_components/user_search_modal.tsx index fafafd8e5d5..9c1d64a1f86 100644 --- a/ui/litellm-dashboard/src/components/common_components/user_search_modal.tsx +++ b/ui/litellm-dashboard/src/components/common_components/user_search_modal.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import { Modal, Form, Button, Select, Tooltip } from "antd"; +import { Modal, Form, Button, Select, Tooltip, Alert } from "antd"; import { UserAddOutlined } from "@ant-design/icons"; import { useDebouncedCallback } from "@tanstack/react-pacer/debouncer"; import { userFilterUICall } from "@/components/networking"; @@ -140,6 +140,14 @@ const UserSearchModal: React.FC = ({ role: defaultRole, }} > + +