| ... | @@ -10,7 +10,7 @@ import { | ... | @@ -10,7 +10,7 @@ import { |
| 10 | type LimitPoolWindow, | 10 | type LimitPoolWindow, |
| 11 | remainingPercent, | 11 | remainingPercent, |
| 12 | } from "@t3tools/shared/usageLimits"; | 12 | } from "@t3tools/shared/usageLimits"; |
| 13 | import { TicketIcon } from "lucide-react"; | 13 | import { AlertTriangleIcon, TicketIcon } from "lucide-react"; |
| 14 | import { type ReactNode, useState } from "react"; | 14 | import { type ReactNode, useState } from "react"; |
| 15 | | 15 | |
| 16 | import { usePrimarySettings } from "../../hooks/useSettings"; | 16 | import { usePrimarySettings } from "../../hooks/useSettings"; |
| ... | @@ -20,6 +20,7 @@ import { ProviderInstanceIcon } from "../chat/ProviderInstanceIcon"; | ... | @@ -20,6 +20,7 @@ import { ProviderInstanceIcon } from "../chat/ProviderInstanceIcon"; |
| 20 | import { getDriverOption } from "../settings/providerDriverMeta"; | 20 | import { getDriverOption } from "../settings/providerDriverMeta"; |
| 21 | import { RedactedSensitiveText } from "../settings/RedactedSensitiveText"; | 21 | import { RedactedSensitiveText } from "../settings/RedactedSensitiveText"; |
| 22 | import { Button } from "../ui/button"; | 22 | import { Button } from "../ui/button"; |
| | 23 | import { Alert, AlertTitle } from "../ui/alert"; |
| 23 | import { Popover, PopoverPopup, PopoverTrigger } from "../ui/popover"; | 24 | import { Popover, PopoverPopup, PopoverTrigger } from "../ui/popover"; |
| 24 | import { | 25 | import { |
| 25 | PaceIcon, | 26 | PaceIcon, |
| ... | @@ -545,7 +546,7 @@ export function UsageLimitsPooled({ | ... | @@ -545,7 +546,7 @@ export function UsageLimitsPooled({ |
| 545 | const notices = collectLimitNotices(presentations); | 546 | const notices = collectLimitNotices(presentations); |
| 546 | return ( | 547 | return ( |
| 547 | <div className="flex flex-col gap-8"> | 548 | <div className="flex flex-col gap-8"> |
| 548 | {pools.length === 0 ? ( | 549 | {pools.length === 0 && notices.length === 0 ? ( |
| 549 | <p className="text-sm text-muted-foreground"> | 550 | <p className="text-sm text-muted-foreground"> |
| 550 | No provider on the selected environments reports subscription limits. | 551 | No provider on the selected environments reports subscription limits. |
| 551 | </p> | 552 | </p> |
| ... | @@ -562,10 +563,13 @@ export function UsageLimitsPooled({ | ... | @@ -562,10 +563,13 @@ export function UsageLimitsPooled({ |
| 562 | function LimitNotices({ notices }: { readonly notices: readonly string[] }) { | 563 | function LimitNotices({ notices }: { readonly notices: readonly string[] }) { |
| 563 | if (notices.length === 0) return null; | 564 | if (notices.length === 0) return null; |
| 564 | return ( | 565 | return ( |
| 565 | <ul className="flex flex-col gap-1 text-xs text-muted-foreground"> | 566 | <Alert variant="warning" controlAlignment="first-line"> |
| | 567 | <AlertTriangleIcon /> |
| 566 | {notices.map((notice) => ( | 568 | {notices.map((notice) => ( |
| 567 | <li key={notice}>{notice}</li> | 569 | <AlertTitle key={notice} className="break-words"> |
| | 570 | {notice} |
| | 571 | </AlertTitle> |
| 568 | ))} | 572 | ))} |
| 569 | </ul> | 573 | </Alert> |
| 570 | ); | 574 | ); |
| 571 | } | 575 | } |