AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
TypeScript ai-agentai-agent-toolsai-agentsai-agents-frameworkmcpmcp-servermcp-toolsmcpsn8n-alternativeno-code-automationworkflowworkflow-automationworkflows
fix(platform-admin): make the admin pages fit phone screens (#17138)
Othman Abu Ajamieh01f6fd81cb14
diff --git a/packages/web/src/app/components/admin/settings-panel.tsx b/packages/web/src/app/components/admin/settings-panel.tsxindex 4920dc1bcae..2ceb0ce7d2b 100644--- a/packages/web/src/app/components/admin/settings-panel.tsx+++ b/packages/web/src/app/components/admin/settings-panel.tsx@@ -81,27 +81,34 @@ export function SettingsRow({{...rest}><div className="flex flex-wrap items-center gap-4">- {media && <div className="flex shrink-0 items-center">{media}</div>}- {icon && (- <div className="flex size-9 shrink-0 items-center justify-center rounded-lg border bg-gray-3 text-gray-12 [&_svg:not([class*='size-'])]:size-4">- {icon}- </div>- )}- <div className="flex min-w-0 flex-1 basis-56 flex-col gap-1">- <div- id={titleId}- className="flex items-center gap-2 text-sm font-medium text-gray-12"- >- {title}- </div>- {description && (- <div id={descriptionId} className="text-sm text-gray-11">- {description}+ <div+ className={cn(+ 'flex min-w-0 flex-1 items-center gap-4',+ media || icon ? 'basis-68' : 'basis-56',+ )}+ >+ {media && <div className="flex shrink-0 items-center">{media}</div>}+ {icon && (+ <div className="flex size-9 shrink-0 items-center justify-center rounded-lg border bg-gray-3 text-gray-12 [&_svg:not([class*='size-'])]:size-4">+ {icon}</div>)}+ <div className="flex min-w-0 flex-1 flex-col gap-1">+ <div+ id={titleId}+ className="flex flex-wrap items-center gap-x-2 gap-y-1 text-sm font-medium text-gray-12"+ >+ {title}+ </div>+ {description && (+ <div id={descriptionId} className="text-sm text-gray-11">+ {description}+ </div>+ )}+ </div></div>{children && (- <div className="flex max-w-full shrink-0 items-center gap-2">+ <div className="ml-auto flex max-w-full shrink-0 items-center gap-2">{children}</div>)}diff --git a/packages/web/src/app/routes/platform/infra/event-destinations/destination-form/events-step.tsx b/packages/web/src/app/routes/platform/infra/event-destinations/destination-form/events-step.tsxindex ef467161085..bc73aaa355b 100644--- a/packages/web/src/app/routes/platform/infra/event-destinations/destination-form/events-step.tsx+++ b/packages/web/src/app/routes/platform/infra/event-destinations/destination-form/events-step.tsx@@ -94,7 +94,7 @@ export const EventsStep = ({const groupCheckboxId = `${checkboxIdPrefix}-group`;return (- <FormItem className="flex flex-col gap-4">+ <FormItem className="@container flex flex-col gap-4"><div className="flex items-center gap-2"><SearchInputplaceholder={t('Search events')}@@ -119,10 +119,10 @@ export const EventsStep = ({<divclassName={cn(adminSurface.card,- 'grid min-h-85 grid-cols-[240px_minmax(0,1fr)] overflow-hidden',+ 'grid min-h-85 grid-cols-1 grid-rows-[auto_1fr] overflow-hidden @xl:grid-cols-[240px_minmax(0,1fr)] @xl:grid-rows-none',)}>- <nav className="flex flex-col gap-0.5 border-r bg-gray-3 p-1.5">+ <nav className="flex gap-0.5 overflow-x-auto border-b bg-gray-3 p-1.5 @xl:flex-col @xl:border-r @xl:border-b-0">{visibleGroups.map((group) => {const isActive = group.key === activeGroup?.key;const selectedCount = group.events.filter((event) =>@@ -135,7 +135,7 @@ export const EventsStep = ({onClick={() => setActiveGroupKey(group.key)}aria-current={isActive ? 'true' : undefined}className={cn(- 'flex h-8 items-center gap-2 rounded-md px-2.5 text-left text-sm transition-colors',+ 'flex h-8 shrink-0 items-center gap-2 rounded-md px-2.5 text-left text-sm transition-colors',isActive? 'bg-panel font-semibold text-gray-12': 'hover:bg-gray-4',@@ -214,7 +214,7 @@ export const EventsStep = ({>{eventLabels[event]}</Label>- <span className="font-mono text-xs text-gray-11">+ <span className="hidden font-mono text-xs text-gray-11 @md:inline">{event}</span></div>diff --git a/packages/web/src/app/routes/platform/infra/event-destinations/destination-form/index.tsx b/packages/web/src/app/routes/platform/infra/event-destinations/destination-form/index.tsxindex 8323758ec20..d16576351c0 100644--- a/packages/web/src/app/routes/platform/infra/event-destinations/destination-form/index.tsx+++ b/packages/web/src/app/routes/platform/infra/event-destinations/destination-form/index.tsx@@ -201,7 +201,7 @@ const DestinationForm = ({'flex w-full flex-wrap items-center justify-end gap-2 px-4 py-3 md:px-6',)}>- <span className="min-w-0 flex-1 text-sm text-gray-11">+ <span className="min-w-0 flex-1 text-sm text-gray-11 max-sm:basis-full">{footerStatus}</span><Buttondiff --git a/packages/web/src/app/routes/platform/infra/event-destinations/destination-form/open-telemetry-connection.tsx b/packages/web/src/app/routes/platform/infra/event-destinations/destination-form/open-telemetry-connection.tsxindex 87401c2d9f0..1cd519af6a2 100644--- a/packages/web/src/app/routes/platform/infra/event-destinations/destination-form/open-telemetry-connection.tsx+++ b/packages/web/src/app/routes/platform/infra/event-destinations/destination-form/open-telemetry-connection.tsx@@ -110,7 +110,7 @@ export const OpenTelemetryConnection = ({</FormDescription></div><RadioGroup- className="flex gap-6"+ className="flex flex-wrap gap-x-6 gap-y-2"value={field.value}onValueChange={(value) => {const encoding = OTLP_FORMATS.find(diff --git a/packages/web/src/app/routes/platform/infra/event-destinations/destination-form/test-event-card.tsx b/packages/web/src/app/routes/platform/infra/event-destinations/destination-form/test-event-card.tsxindex 0b91b0d3681..d57a7947f49 100644--- a/packages/web/src/app/routes/platform/infra/event-destinations/destination-form/test-event-card.tsx+++ b/packages/web/src/app/routes/platform/infra/event-destinations/destination-form/test-event-card.tsx@@ -87,7 +87,7 @@ export const TestEventCard = ({return (<SettingsPanel title={t('Send test event')} description={description}>- <div className="flex gap-2">+ <div className="flex flex-wrap gap-2"><Selectvalue={activeEvent ?? ''}onValueChange={(value) =>@@ -95,7 +95,7 @@ export const TestEventCard = ({}disabled={events.length === 0}>- <SelectTrigger className="flex-1">+ <SelectTrigger className="flex-1 basis-40"><SelectValue placeholder={t('Choose an event')} /></SelectTrigger><SelectContent>diff --git a/packages/web/src/app/routes/platform/setup/ai/capabilities-tab/index.tsx b/packages/web/src/app/routes/platform/setup/ai/capabilities-tab/index.tsxindex fa7d4f68028..95bb1c91a0a 100644--- a/packages/web/src/app/routes/platform/setup/ai/capabilities-tab/index.tsx+++ b/packages/web/src/app/routes/platform/setup/ai/capabilities-tab/index.tsx@@ -187,70 +187,72 @@ function CapabilityCard({><look.icon className="size-4" /></div>- <div className="flex min-w-0 flex-1 flex-col gap-1">- <p className="truncate text-sm font-semibold text-gray-12">- {capabilityInfo.name}- </p>- <p className="text-sm text-gray-11">{capabilityInfo.description}</p>- </div>- <div className="flex shrink-0 items-center gap-1">- {config && (- <ConfirmationDeleteDialog- title={t('Reset {name}', { name: capabilityInfo.name })}- message={- chatProviderFallback- ? isEmbeddings- ? t('Knowledge bases go back to using {provider}.', {- provider: chatProviderFallback.name,- })- : t('Chat goes back to using {provider}.', {- provider: chatProviderFallback.name,- })- : t(- 'This removes the saved API key and disables this capability.',- )- }- entityName={capabilityInfo.name}- showToast- onError={() => undefined}- controlId={AdminControl.AI_CAPABILITY_RESET_CONFIRM}- mutationFn={async () => {- await onDelete(config.id);- }}- >- <Button- variant="ghost"- size="icon-sm"- className="text-gray-11 opacity-0 transition-opacity hover:text-danger-11 group-focus-within:opacity-100 group-hover:opacity-100"- {...adminControl(AdminControl.AI_CAPABILITY_RESET_OPEN)}+ <div className="flex min-w-0 flex-1 flex-wrap items-start gap-3">+ <div className="flex min-w-0 flex-1 basis-40 flex-col gap-1">+ <p className="truncate text-sm font-semibold text-gray-12">+ {capabilityInfo.name}+ </p>+ <p className="text-sm text-gray-11">{capabilityInfo.description}</p>+ </div>+ <div className="flex shrink-0 items-center gap-1">+ {config && (+ <ConfirmationDeleteDialog+ title={t('Reset {name}', { name: capabilityInfo.name })}+ message={+ chatProviderFallback+ ? isEmbeddings+ ? t('Knowledge bases go back to using {provider}.', {+ provider: chatProviderFallback.name,+ })+ : t('Chat goes back to using {provider}.', {+ provider: chatProviderFallback.name,+ })+ : t(+ 'This removes the saved API key and disables this capability.',+ )+ }+ entityName={capabilityInfo.name}+ showToast+ onError={() => undefined}+ controlId={AdminControl.AI_CAPABILITY_RESET_CONFIRM}+ mutationFn={async () => {+ await onDelete(config.id);+ }}>- <Trash2 className="size-4" />+ <Button+ variant="ghost"+ size="icon-sm"+ className="text-gray-11 opacity-0 transition-opacity hover:text-danger-11 group-focus-within:opacity-100 group-hover:opacity-100"+ {...adminControl(AdminControl.AI_CAPABILITY_RESET_OPEN)}+ >+ <Trash2 className="size-4" />+ </Button>+ </ConfirmationDeleteDialog>+ )}+ {needsProviderKey ? (+ <Button asChild variant="outline" size="sm">+ <Link to="/platform/ai">+ {t('Connect a provider')}+ <ArrowRight className="size-4" />+ </Link></Button>- </ConfirmationDeleteDialog>- )}- {needsProviderKey ? (- <Button asChild variant="outline" size="sm">- <Link to="/platform/ai">- {t('Connect a provider')}- <ArrowRight className="size-4" />- </Link>- </Button>- ) : (- <AiCapabilityDialog- capabilityInfo={capabilityInfo}- existingConfig={config}- defaultProviderId={chatProviderFallback?.id}- onSaved={onSaved}- >- <Button- variant="outline"- size="sm"- {...adminControl(AdminControl.AI_CAPABILITY_OPEN)}+ ) : (+ <AiCapabilityDialog+ capabilityInfo={capabilityInfo}+ existingConfig={config}+ defaultProviderId={chatProviderFallback?.id}+ onSaved={onSaved}>- {inUse ? t('Change') : t('Set up')}- </Button>- </AiCapabilityDialog>- )}+ <Button+ variant="outline"+ size="sm"+ {...adminControl(AdminControl.AI_CAPABILITY_OPEN)}+ >+ {inUse ? t('Change') : t('Set up')}+ </Button>+ </AiCapabilityDialog>+ )}+ </div></div></div><div className="mt-auto flex min-h-11 min-w-0 items-center gap-2 border-t px-5 py-2.5 text-xs text-gray-11">diff --git a/packages/web/src/app/routes/platform/setup/ai/providers-tab/default-chat-model-card.tsx b/packages/web/src/app/routes/platform/setup/ai/providers-tab/default-chat-model-card.tsxindex 25bda739128..be01b199db7 100644--- a/packages/web/src/app/routes/platform/setup/ai/providers-tab/default-chat-model-card.tsx+++ b/packages/web/src/app/routes/platform/setup/ai/providers-tab/default-chat-model-card.tsx@@ -70,8 +70,8 @@ export function DefaultChatModelCard({title={t('Default chat model')}description={t('New chats start on this model.')}>- <div className="flex items-center gap-2">- <div className="flex min-w-7 shrink-0 items-center justify-end">+ <div className="flex min-w-0 items-center gap-2">+ <div className="flex min-w-7 shrink-0 items-center justify-end max-sm:empty:hidden">{!isNil(status) && status.unavailable && (<Tooltip><TooltipTrigger asChild>@@ -103,7 +103,7 @@ export function DefaultChatModelCard({)}</div><div- className="w-64"+ className="w-64 min-w-0"{...adminControl(AdminControl.AI_DEFAULT_CHAT_MODEL_SELECT)}>{isNil(configuration) ? (diff --git a/packages/web/src/app/routes/platform/setup/general/brand-image-field.tsx b/packages/web/src/app/routes/platform/setup/general/brand-image-field.tsxindex 5a2f6d8a70e..ff00a8b980d 100644--- a/packages/web/src/app/routes/platform/setup/general/brand-image-field.tsx+++ b/packages/web/src/app/routes/platform/setup/general/brand-image-field.tsx@@ -54,7 +54,7 @@ export const BrandImageField = ({<divdata-dragging={dragging || undefined}className={cn(- 'grid grid-cols-[auto_minmax(0,1fr)] items-center gap-4 rounded-lg border border-dashed border-gray-7 p-4 transition-colors sm:grid-cols-[auto_minmax(0,1fr)_auto]',+ 'flex flex-wrap items-center gap-4 rounded-lg border border-dashed border-gray-7 p-4 transition-colors','data-dragging:border-accent-8 data-dragging:bg-accent-2',disabled && 'opacity-50',)}@@ -88,7 +88,10 @@ export const BrandImageField = ({<ImageUp className="size-5 text-gray-9" />)}</div>- <div id={hintId} className="flex min-w-0 flex-col gap-1">+ <div+ id={hintId}+ className="flex min-w-0 flex-1 basis-48 flex-col gap-1"+ ><span className="text-sm text-gray-11">{hint}</span><span className="text-xs text-gray-11">{t(@@ -99,7 +102,7 @@ export const BrandImageField = ({)}</span></div>- <div className="col-span-2 flex shrink-0 items-center gap-2 sm:col-span-1">+ <div className="flex shrink-0 items-center gap-2">{file && (<Buttontype="button"diff --git a/packages/web/src/app/routes/platform/setup/pieces/piece-sets/mode-radio-cards.tsx b/packages/web/src/app/routes/platform/setup/pieces/piece-sets/mode-radio-cards.tsxindex e0444a0db6c..19322cd7c01 100644--- a/packages/web/src/app/routes/platform/setup/pieces/piece-sets/mode-radio-cards.tsx+++ b/packages/web/src/app/routes/platform/setup/pieces/piece-sets/mode-radio-cards.tsx@@ -13,7 +13,7 @@ export function ModeRadioCards<TValue extends string>({onChange: (value: TValue) => void;}) {return (- <div className="flex flex-col gap-2.5">+ <div className="@container flex flex-col gap-2.5"><span className="text-sm font-semibold">{title}</span><RadioGroupvalue={value}@@ -23,7 +23,7 @@ export function ModeRadioCards<TValue extends string>({onChange(option.value);}}}- className="grid grid-cols-2 gap-3"+ className="grid grid-cols-1 @md:grid-cols-2 gap-3">{options.map((option) => (<labeldiff --git a/packages/web/src/components/custom/data-table/index.tsx b/packages/web/src/components/custom/data-table/index.tsxindex 9455ee57d6c..f3cd7c05746 100644--- a/packages/web/src/components/custom/data-table/index.tsx+++ b/packages/web/src/components/custom/data-table/index.tsx@@ -676,9 +676,11 @@ export function DataTable<</Table></div>{!hidePagination && !virtualizeRows && (- <div className="flex items-center justify-end gap-4 px-2 py-4 text-sm">+ <div className="flex flex-wrap items-center justify-end gap-x-4 gap-y-2 px-2 py-4 text-sm"><div className="flex items-center gap-2">- <span className="text-gray-11">{t('Rows per page')}</span>+ <span className="text-gray-11 whitespace-nowrap">+ {t('Rows per page')}+ </span><Selectvalue={`${table.getState().pagination.pageSize}`}onValueChange={(value) => {@@ -702,44 +704,46 @@ export function DataTable<</SelectContent></Select></div>- <Button- variant="ghost"- size="sm"- className="gap-1"- onClick={() => {- if (clientPagination) {- table.previousPage();- } else {- setCurrentCursor(previousPageCursor);+ <div className="flex items-center gap-4">+ <Button+ variant="ghost"+ size="sm"+ className="gap-1"+ onClick={() => {+ if (clientPagination) {+ table.previousPage();+ } else {+ setCurrentCursor(previousPageCursor);+ }+ }}+ disabled={+ clientPagination+ ? !table.getCanPreviousPage()+ : !previousPageCursor}- }}- disabled={- clientPagination- ? !table.getCanPreviousPage()- : !previousPageCursor- }- >- <ChevronLeft className="h-4 w-4" />- {t('Previous')}- </Button>- <Button- variant="ghost"- size="sm"- className="gap-1"- onClick={() => {- if (clientPagination) {- table.nextPage();- } else {- setCurrentCursor(nextPageCursor);+ >+ <ChevronLeft className="h-4 w-4" />+ {t('Previous')}+ </Button>+ <Button+ variant="ghost"+ size="sm"+ className="gap-1"+ onClick={() => {+ if (clientPagination) {+ table.nextPage();+ } else {+ setCurrentCursor(nextPageCursor);+ }+ }}+ disabled={+ clientPagination ? !table.getCanNextPage() : !nextPageCursor}- }}- disabled={- clientPagination ? !table.getCanNextPage() : !nextPageCursor- }- >- {t('Next')}- <ChevronRight className="h-4 w-4" />- </Button>+ >+ {t('Next')}+ <ChevronRight className="h-4 w-4" />+ </Button>+ </div></div>)}{bulkActions.length > 0 && (diff --git a/packages/web/src/components/custom/date-time-picker-range.tsx b/packages/web/src/components/custom/date-time-picker-range.tsxindex 9e8a938aad7..d4aa5f686d8 100644--- a/packages/web/src/components/custom/date-time-picker-range.tsx+++ b/packages/web/src/components/custom/date-time-picker-range.tsx@@ -226,7 +226,7 @@ export function DateTimePickerWithRange({};return (- <div className={cn('grid gap-2', className)}>+ <div className={cn('grid shrink-0 gap-2', className)}><Popover><PopoverTrigger asChild><Buttondiff --git a/packages/web/src/features/agents/ai-model/model-picker-popover.tsx b/packages/web/src/features/agents/ai-model/model-picker-popover.tsxindex d583cf0b1f6..a6bd388edeb 100644--- a/packages/web/src/features/agents/ai-model/model-picker-popover.tsx+++ b/packages/web/src/features/agents/ai-model/model-picker-popover.tsx@@ -183,6 +183,7 @@ export function ModelPickerPopover<T>({const list = (<Command+ className="max-h-[calc(var(--radix-popover-content-available-height)-2px)]"shouldFilter={false}value={highlighted}onValueChange={(value) => {@@ -214,7 +215,7 @@ export function ModelPickerPopover<T>({{notices}<CommandListclassName={cn(- 'overflow-y-auto',+ 'min-h-0 overflow-y-auto',detail === undefined ? 'max-h-80' : 'max-h-96',)}onPointerMove={(event) => {