Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions apps/web/src/components/auth/PairingRouteSurface.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
submitServerAuthCredential,
} from "../../environments/primary";
import { readHostedPairingRequest } from "../../hostedPairing";
import { Alert, AlertDescription } from "../ui/alert";
import { Button } from "../ui/button";
import { Input } from "../ui/input";
import { useAtomCommand } from "../../state/use-atom-command";
Expand Down Expand Up @@ -135,9 +136,9 @@ export function PairingRouteSurface({
</div>

{errorMessage ? (
<div className="rounded-lg border border-destructive/30 bg-destructive/6 px-3 py-2 text-sm text-destructive">
{errorMessage}
</div>
<Alert variant="error">
<AlertDescription>{errorMessage}</AlertDescription>
</Alert>
) : null}

<div className="flex flex-wrap gap-2">
Expand Down Expand Up @@ -260,10 +261,12 @@ export function HostedPairingRouteSurface() {
) : null}

{status === "error" ? (
<div className="mt-5 rounded-lg border border-destructive/30 bg-destructive/6 px-3 py-2 text-sm text-destructive">
Verify the backend is reachable from this browser, supports CORS for hosted clients, and
is served over HTTPS when opening this page from HTTPS.
</div>
<Alert variant="error" className="mt-5">
<AlertDescription>
Verify the backend is reachable from this browser, supports CORS for hosted clients,
and is served over HTTPS when opening this page from HTTPS.
</AlertDescription>
</Alert>
) : null}

<div className="mt-6 flex flex-wrap gap-2">
Expand Down
11 changes: 4 additions & 7 deletions apps/web/src/components/onboarding/WelcomeWizard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ import { TerminalViewport } from "../ThreadTerminalDrawer";
import { CloudEnvironmentConnectRows } from "../cloud/CloudEnvironmentConnectList";
import { ProviderInstanceIcon } from "../chat/ProviderInstanceIcon";
import { T3Wordmark } from "../T3Wordmark";
import { Alert, AlertDescription } from "../ui/alert";
import { Button } from "../ui/button";
import { Checkbox } from "../ui/checkbox";
import { Collapsible, CollapsiblePanel, CollapsibleTrigger } from "../ui/collapsible";
Expand Down Expand Up @@ -567,13 +568,9 @@ function PairingForm({
/>
</div>
{errorMessage ? (
<div
id="onboarding-pairing-error"
role="alert"
className="rounded-lg border border-destructive/30 bg-destructive/6 px-3 py-2 text-sm text-destructive"
>
{errorMessage}
</div>
<Alert id="onboarding-pairing-error" variant="error">
<AlertDescription>{errorMessage}</AlertDescription>
</Alert>
) : null}
<Collapsible>
<div className="flex items-center justify-between gap-3">
Expand Down
10 changes: 4 additions & 6 deletions apps/web/src/components/settings/AcpRegistrySearchStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { type FormEvent, useEffect, useLayoutEffect, useRef, useState } from "re
import { serverEnvironment } from "../../state/server";
import { useEnvironmentQuery } from "../../state/query";
import { useAtomCommand } from "../../state/use-atom-command";
import { Alert, AlertDescription } from "../ui/alert";
import { Button } from "../ui/button";
import { InputGroup, InputGroupAddon, InputGroupInput } from "../ui/input-group";
import { ScrollArea } from "../ui/scroll-area";
Expand Down Expand Up @@ -204,12 +205,9 @@ export function AcpRegistrySearchStep({
</div>

{search.error || prepareError ? (
<div
aria-live="polite"
className="rounded-xl border border-destructive/30 bg-destructive/5 px-3 py-2 text-sm text-destructive"
>
{prepareError ?? search.error}
</div>
<Alert variant="error" role="status" aria-live="polite">
<AlertDescription>{prepareError ?? search.error}</AlertDescription>
</Alert>
) : null}

{isInitialSearch ? (
Expand Down
7 changes: 4 additions & 3 deletions apps/web/src/components/settings/ConnectionsSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ import { Menu, MenuItem, MenuPopup, MenuSeparator, MenuTrigger } from "../ui/men
import { Switch } from "../ui/switch";
import { stackedThreadToast, toastManager } from "../ui/toast";
import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
import { Alert, AlertDescription } from "../ui/alert";
import { Button } from "../ui/button";
import { Empty, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "../ui/empty";
import { AnimatedHeight } from "../AnimatedHeight";
Expand Down Expand Up @@ -2793,9 +2794,9 @@ export function ConnectionsSettings() {
</label>
</div>
{savedBackendError || discoveredSshHostsError ? (
<div className="rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-xs text-destructive">
{savedBackendError ?? discoveredSshHostsError}
</div>
<Alert variant="error">
<AlertDescription>{savedBackendError ?? discoveredSshHostsError}</AlertDescription>
</Alert>
) : null}
<Button
variant="outline"
Expand Down
10 changes: 4 additions & 6 deletions apps/web/src/components/settings/ThemeSearchSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
AlertDialogPopup,
AlertDialogTitle,
} from "../ui/alert-dialog";
import { Alert, AlertDescription } from "../ui/alert";
import { Button } from "../ui/button";
import { InputGroup, InputGroupAddon, InputGroupInput } from "../ui/input-group";
import { Select, SelectItem, SelectPopup, SelectTrigger, SelectValue } from "../ui/select";
Expand Down Expand Up @@ -342,12 +343,9 @@ export function ThemeSearchSection({
</div>

{error ? (
<div
aria-live="polite"
className="rounded-xl border border-destructive/30 bg-destructive/5 px-3 py-2 text-destructive text-sm"
>
{error}
</div>
<Alert variant="error" role="status" aria-live="polite">
<AlertDescription>{error}</AlertDescription>
</Alert>
) : null}

{isSearching && results === null ? (
Expand Down
Loading