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
12 changes: 10 additions & 2 deletions apps/admin/src/components/app-shell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ export function AppShell({ me, children }: { me: MeResponse; children: ReactNode

return (
<div className="min-h-screen bg-background text-foreground">
<a
href="#main"
className="sr-only fixed left-4 top-4 z-50 rounded-md border bg-card px-4 py-3 text-sm font-medium text-foreground shadow-md focus:not-sr-only"
>
{strings.app.skipToMain}
</a>
<header className="app-topbar sticky top-0 z-40 border-b">
<div className="mx-auto flex min-h-14 max-w-[1600px] items-center gap-3 px-4 sm:px-6">
<Link to="/" className="text-base font-semibold tracking-[-0.035em]">
Expand Down Expand Up @@ -75,8 +81,10 @@ export function AppShell({ me, children }: { me: MeResponse; children: ReactNode
</div>
</div>
</header>
<VerifyEmailBanner emailVerified={me.emailVerified} />
{children}
<main id="main" tabIndex={-1} className="min-w-0">
<VerifyEmailBanner emailVerified={me.emailVerified} />
{children}
</main>
</div>
);
}
2 changes: 1 addition & 1 deletion apps/admin/src/components/ui/skeleton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function Skeleton({ className, ...props }: React.ComponentProps<'div'>) {
<div
data-slot="skeleton"
aria-hidden="true"
className={cn('rounded-md bg-muted', className)}
className={cn('animate-pulse rounded-md bg-muted motion-reduce:animate-none', className)}
{...props}
/>
);
Expand Down
4 changes: 2 additions & 2 deletions apps/admin/src/components/workspace-switcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export function WorkspaceSwitcher({
return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button variant="outline" aria-label={switchLabel} className="gap-2">
<span className="max-w-48 truncate">
<Button variant="outline" aria-label={switchLabel} className="min-w-0 gap-2 px-2 sm:px-4">
<span className="max-w-28 truncate sm:max-w-48">
{current?.workspaceName ?? strings.nav.switchWorkspace}
</span>
<ChevronsUpDown aria-hidden="true" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { useMemo, useState } from 'react';

import { FormAlert } from '@/components/form-alert';
import { NativeSelect } from '@/components/native-select';
import { hasRole, useWorkspaceRole } from '@/components/role-gate';
import { Badge } from '@/components/ui/badge';
import { Button } from '@/components/ui/button';
Expand Down Expand Up @@ -151,9 +152,9 @@ export function BotInstructions({
<h4 className="font-medium">{strings.bots.version(selected.version)} changes</h4>
<div className="space-y-1">
<Label htmlFor="prompt-compare">Compare against</Label>
<select
<NativeSelect
id="prompt-compare"
className="block min-h-9 rounded-md border bg-background px-2 text-sm"
className="block w-full"
value={comparison}
onChange={(event) => {
setComparison(event.target.value);
Expand All @@ -169,7 +170,7 @@ export function BotInstructions({
{strings.bots.version(row.version)}
</option>
))}
</select>
</NativeSelect>
</div>
</header>
<PromptDiff before={base} after={selected} />
Expand Down
223 changes: 145 additions & 78 deletions apps/admin/src/features/eval/evaluate-page.tsx

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { useState } from 'react';

import { FormAlert } from '@/components/form-alert';
import { NativeSelect } from '@/components/native-select';
import { Button } from '@/components/ui/button';
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
import { Input } from '@/components/ui/input';
Expand Down Expand Up @@ -107,9 +108,9 @@ export function ConnectIntegrationForm({ workspaceId }: { workspaceId: string })
>
<label className="space-y-1 text-sm">
<span>{strings.integrations.provider}</span>
<select
<NativeSelect
aria-label={strings.integrations.provider}
className="h-9 w-full rounded-md border bg-transparent px-3 text-sm"
className="w-full"
value={provider}
onChange={(event) => {
const nextProvider = event.target.value as IntegrationProvider;
Expand All @@ -128,7 +129,7 @@ export function ConnectIntegrationForm({ workspaceId }: { workspaceId: string })
: providerLabel(item)}
</option>
))}
</select>
</NativeSelect>
</label>
<ProviderSetupGuide provider={provider} />
<label className="space-y-1 text-sm">
Expand Down Expand Up @@ -159,17 +160,17 @@ export function ConnectIntegrationForm({ workspaceId }: { workspaceId: string })
{provider === 'zendesk' || provider === 'freshdesk' || provider === 'pipedrive' ? (
<label className="space-y-1 text-sm">
<span>{strings.integrations.authMode}</span>
<select
<NativeSelect
aria-label={strings.integrations.authMode}
className="h-9 w-full rounded-md border bg-transparent px-3 text-sm"
className="w-full"
value={authMode}
onChange={(event) => {
setAuthMode(event.target.value as 'bearer' | 'api_key');
}}
>
<option value="bearer">{strings.integrations.bearerAuth}</option>
<option value="api_key">{strings.integrations.apiKeyAuth}</option>
</select>
</NativeSelect>
</label>
) : null}
{provider === 'zendesk' && authMode === 'api_key' ? (
Expand Down
Loading