Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_ocr_rust_default

This commit is contained in:
Devin AI 2026-07-27 16:59:38 +00:00
commit c7b45dc0ed
2 changed files with 33 additions and 2 deletions

View file

@ -367,6 +367,30 @@ describe("AllModelsTable", () => {
expect(onTeamChange).toHaveBeenCalledWith("team-1");
});
it("truncates long team options instead of clipping them at the popup edge", async () => {
const user = userEvent.setup();
const longLabel = "db29687d-0ca2-4bbe-a0f1-9c5f0f7c2a11";
render(
<AllModelsTable
{...baseProps}
teamOptions={[
{ value: "personal", label: "Personal" },
{ value: "team-long", label: longLabel },
]}
/>,
);
await user.click(screen.getByTestId("models-team-select"));
const option = await screen.findByRole("option", { name: longLabel });
const label = option.querySelector("[data-slot='select-item-label']");
expect(label).not.toBeNull();
expect(label).toHaveClass("truncate");
expect(label).toHaveAttribute("title", longLabel);
expect(option).toHaveClass("[&>div]:min-w-0");
});
it("runs the full reset from the filter drawer", async () => {
const user = userEvent.setup();
const onResetFilters = vi.fn();

View file

@ -224,8 +224,15 @@ export function AllModelsTable({
</SelectTrigger>
<SelectContent>
{teamOptions.map((option) => (
<SelectItem key={option.value} value={option.value} disabled={isLoadingTeams}>
{option.label}
<SelectItem
key={option.value}
value={option.value}
disabled={isLoadingTeams}
className="[&>div]:min-w-0"
>
<span data-slot="select-item-label" className="min-w-0 truncate" title={option.label}>
{option.label}
</span>
</SelectItem>
))}
</SelectContent>