> For AI agents: the complete documentation index is available at https://wallarm.github.io/design-system/llms.txt, the full documentation bundle is available at https://wallarm.github.io/design-system/llms-full.txt.

# Integrations settings

**Components:** [`AppShell`](https://wallarm.github.io/design-system/components/app-shell.md), [`AppShellHeader`](https://wallarm.github.io/design-system/components/app-shell.md), [`AppShellRail`](https://wallarm.github.io/design-system/components/app-shell.md), [`AppShellRemote`](https://wallarm.github.io/design-system/components/app-shell.md), `TopHeader`, `TopHeaderLogo`, `TopHeaderActions`, `TopHeaderSeparator`


+95 more

[`ChatTrigger`](https://wallarm.github.io/design-system/components/chat.md), [`NotificationCenter`](https://wallarm.github.io/design-system/components/notification-center.md), [`NotificationCenterTrigger`](https://wallarm.github.io/design-system/components/notification-center.md), [`Logo`](https://wallarm.github.io/design-system/components/logo.md), `NavRail`, `NavRailBody`, `NavRailItem`, `NavRailSeparator`, `NavRailFooter`, [`RemoteShell`](https://wallarm.github.io/design-system/components/remote-shell.md), [`RemoteShellPanel`](https://wallarm.github.io/design-system/components/remote-shell.md), [`RemoteShellBreadcrumb`](https://wallarm.github.io/design-system/components/remote-shell.md), [`RemoteShellContent`](https://wallarm.github.io/design-system/components/remote-shell.md), [`Page`](https://wallarm.github.io/design-system/components/page.md), [`PageHeader`](https://wallarm.github.io/design-system/components/page.md), [`PageHeaderGroup`](https://wallarm.github.io/design-system/components/page.md), [`PageTitle`](https://wallarm.github.io/design-system/components/page.md), [`PageDescription`](https://wallarm.github.io/design-system/components/page.md), [`PageToolbar`](https://wallarm.github.io/design-system/components/page.md), [`PageContent`](https://wallarm.github.io/design-system/components/page.md), [`SearchInput`](https://wallarm.github.io/design-system/components/search-input.md), [`SegmentedTabs`](https://wallarm.github.io/design-system/components/segmented-tabs.md), [`SegmentedTabsList`](https://wallarm.github.io/design-system/components/segmented-tabs.md), [`SegmentedTabsTrigger`](https://wallarm.github.io/design-system/components/segmented-tabs.md), [`NumericBadge`](https://wallarm.github.io/design-system/components/numeric-badge.md), [`Table`](https://wallarm.github.io/design-system/components/table.md), [`TableEmptyState`](https://wallarm.github.io/design-system/components/table.md), [`EmptyState`](https://wallarm.github.io/design-system/components/empty-state.md), [`EmptyStateIllustration`](https://wallarm.github.io/design-system/components/empty-state.md), [`EmptyStateMessage`](https://wallarm.github.io/design-system/components/empty-state.md), [`EmptyStateTitle`](https://wallarm.github.io/design-system/components/empty-state.md), [`EmptyStateDescription`](https://wallarm.github.io/design-system/components/empty-state.md), [`EmptyStateActions`](https://wallarm.github.io/design-system/components/empty-state.md), [`Badge`](https://wallarm.github.io/design-system/components/badge.md), [`Tag`](https://wallarm.github.io/design-system/components/tag.md), [`OverflowList`](https://wallarm.github.io/design-system/components/overflow-list.md), [`FormatDateTime`](https://wallarm.github.io/design-system/components/format-date-time.md), [`Switch`](https://wallarm.github.io/design-system/components/switch.md), [`SwitchControl`](https://wallarm.github.io/design-system/components/switch.md), [`SwitchLabel`](https://wallarm.github.io/design-system/components/switch.md), [`DropdownMenu`](https://wallarm.github.io/design-system/components/dropdown-menu.md), [`DropdownMenuTrigger`](https://wallarm.github.io/design-system/components/dropdown-menu.md), [`DropdownMenuContent`](https://wallarm.github.io/design-system/components/dropdown-menu.md), [`DropdownMenuItem`](https://wallarm.github.io/design-system/components/dropdown-menu.md), [`DropdownMenuItemIcon`](https://wallarm.github.io/design-system/components/dropdown-menu.md), [`DropdownMenuItemText`](https://wallarm.github.io/design-system/components/dropdown-menu.md), [`DropdownMenuSeparator`](https://wallarm.github.io/design-system/components/dropdown-menu.md), [`Drawer`](https://wallarm.github.io/design-system/components/drawer.md), [`DrawerContent`](https://wallarm.github.io/design-system/components/drawer.md), [`DrawerHeader`](https://wallarm.github.io/design-system/components/drawer.md), [`DrawerTitle`](https://wallarm.github.io/design-system/components/drawer.md), [`DrawerDescription`](https://wallarm.github.io/design-system/components/drawer.md), [`DrawerBody`](https://wallarm.github.io/design-system/components/drawer.md), [`DrawerFooter`](https://wallarm.github.io/design-system/components/drawer.md), [`DrawerClose`](https://wallarm.github.io/design-system/components/drawer.md), [`Timeline`](https://wallarm.github.io/design-system/components/timeline.md), [`TimelineItem`](https://wallarm.github.io/design-system/components/timeline.md), [`TimelineConnector`](https://wallarm.github.io/design-system/components/timeline.md), [`TimelineIndicator`](https://wallarm.github.io/design-system/components/timeline.md), [`TimelineSeparator`](https://wallarm.github.io/design-system/components/timeline.md), [`TimelineContent`](https://wallarm.github.io/design-system/components/timeline.md), [`TimelineTitle`](https://wallarm.github.io/design-system/components/timeline.md), [`Field`](https://wallarm.github.io/design-system/components/field.md), [`FieldLabel`](https://wallarm.github.io/design-system/components/field.md), [`FieldIndicator`](https://wallarm.github.io/design-system/components/field.md), [`Input`](https://wallarm.github.io/design-system/components/input.md), [`Select`](https://wallarm.github.io/design-system/components/select.md), [`SelectInput`](https://wallarm.github.io/design-system/components/select.md), [`SelectPositioner`](https://wallarm.github.io/design-system/components/select.md), [`SelectContent`](https://wallarm.github.io/design-system/components/select.md), [`SelectOption`](https://wallarm.github.io/design-system/components/select.md), [`SelectOptionText`](https://wallarm.github.io/design-system/components/select.md), [`SelectOptionIndicator`](https://wallarm.github.io/design-system/components/select.md), [`CheckboxGroup`](https://wallarm.github.io/design-system/components/checkbox.md), [`Checkbox`](https://wallarm.github.io/design-system/components/checkbox.md), [`CheckboxIndicator`](https://wallarm.github.io/design-system/components/checkbox.md), [`CheckboxLabel`](https://wallarm.github.io/design-system/components/checkbox.md), [`CheckboxDescription`](https://wallarm.github.io/design-system/components/checkbox.md), [`Alert`](https://wallarm.github.io/design-system/components/alert.md), [`AlertIcon`](https://wallarm.github.io/design-system/components/alert.md), [`AlertContent`](https://wallarm.github.io/design-system/components/alert.md), [`AlertTitle`](https://wallarm.github.io/design-system/components/alert.md), [`AlertDescription`](https://wallarm.github.io/design-system/components/alert.md), [`Dialog`](https://wallarm.github.io/design-system/components/dialog.md), [`DialogContent`](https://wallarm.github.io/design-system/components/dialog.md), [`DialogHeader`](https://wallarm.github.io/design-system/components/dialog.md), [`DialogTitle`](https://wallarm.github.io/design-system/components/dialog.md), [`DialogDescription`](https://wallarm.github.io/design-system/components/dialog.md), [`DialogFooter`](https://wallarm.github.io/design-system/components/dialog.md), [`DialogClose`](https://wallarm.github.io/design-system/components/dialog.md), [`Button`](https://wallarm.github.io/design-system/components/button.md), [`HStack`](https://wallarm.github.io/design-system/components/stack.md), [`VStack`](https://wallarm.github.io/design-system/components/stack.md), [`Text`](https://wallarm.github.io/design-system/components/text.md), [`Toast`](https://wallarm.github.io/design-system/components/toast.md)

Settings › Integrations in the console frame: every tool Wallarm sends events to, in one table. Each row shows its status, events and last delivery. A switch pauses one integration, and the row menu edits, connects, tests or disconnects it.

## What it shows

- The Settings section from [Application layout](https://wallarm.github.io/design-system/patterns/app-layout.md): `RemoteShell` with its own `NavConfig`, Settings active in the rail footer, the trail from `RemoteShellBreadcrumb`.
- The [Resource list page](https://wallarm.github.io/design-system/patterns/resource-list-page.md) frame with search and status tabs, and the no-results state from [Empty states](https://wallarm.github.io/design-system/patterns/empty-states.md).
- [Entity table](https://wallarm.github.io/design-system/patterns/entity-table.md) cells: an icon tile with a second line, status badges (Connected, Needs attention, Failed, Not connected), event `Tag`s in `OverflowList`, exact times, the em dash, an on/off `Switch` and the row menu in the master cell.
- The `Timeline` edit drawer from [Create and edit forms](https://wallarm.github.io/design-system/patterns/create-edit-forms.md): two short fields side by side, card checkboxes for events, a test result as an `Alert` in its section.
- A server-side save failure as a destructive `Alert` atop the drawer body.
- The disconnect dialog from [Confirmation dialogs](https://wallarm.github.io/design-system/patterns/confirmation-dialogs.md).
- Toasts from [Feedback toasts](https://wallarm.github.io/design-system/patterns/feedback-toasts.md): a loading "Send test" that turns into success or an error, plus result toasts for save, connect, disconnect and the switch.
- Skeleton rows on first load ([Empty states](https://wallarm.github.io/design-system/patterns/empty-states.md)).

## Examples

The working page: filter, toggle, connect Telegram, send a test (Splunk fails) or disconnect. Open a row's menu and pick Edit to see the edit drawer with the row marked active; saving Jira fails, so its reason sits atop the form and the drawer stays open. Disconnect in the same menu opens the confirmation dialog.

Settings › Integrations inside the console frame. Search and status tabs filter one table;
each row shows its status, events and last delivery. The Notifications switch saves at once,
the row menu edits, connects, sends a test (Splunk fails) or disconnects with a confirmation.
Saving Jira fails: the server's reason shows atop the drawer body and the drawer stays open.

```tsx
import { type ChangeEvent, type FormEvent, useState } from 'react';
import { Alert, AlertContent, AlertDescription, AlertIcon, AlertTitle } from '@wallarm-org/design-system/Alert';
import { AppShell, AppShellHeader, AppShellRail, AppShellRemote } from '@wallarm-org/design-system/AppShell';
import { Button } from '@wallarm-org/design-system/Button';
import { ChatTrigger } from '@wallarm-org/design-system/Chat';
import { Checkbox, CheckboxDescription, CheckboxGroup, CheckboxIndicator, CheckboxLabel } from '@wallarm-org/design-system/Checkbox';
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from '@wallarm-org/design-system/Dialog';
import { Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle } from '@wallarm-org/design-system/Drawer';
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuItemIcon, DropdownMenuItemText, DropdownMenuSeparator, DropdownMenuTrigger } from '@wallarm-org/design-system/DropdownMenu';
import { EmptyState, EmptyStateActions, EmptyStateDescription, EmptyStateIllustration, EmptyStateMessage, EmptyStateTitle } from '@wallarm-org/design-system/EmptyState';
import { Field, FieldIndicator, FieldLabel } from '@wallarm-org/design-system/Field';
import { ChevronUpDown, CircleHelp, Ellipsis, FilterX, History, Home as HomeIcon, Pencil, Plug, Search, SearchX, Settings, Unplug, Zap } from '@wallarm-org/design-system/icons';
import { Input } from '@wallarm-org/design-system/Input';
import { Logo } from '@wallarm-org/design-system/Logo';
import { NavRail, NavRailBody, NavRailFooter, NavRailItem, NavRailSeparator } from '@wallarm-org/design-system/NavRail';
import { NotificationCenter, NotificationCenterTrigger } from '@wallarm-org/design-system/NotificationCenter';
import { NumericBadge } from '@wallarm-org/design-system/NumericBadge';
import { Page, PageContent, PageDescription, PageHeader, PageHeaderGroup, PageTitle, PageToolbar } from '@wallarm-org/design-system/Page';
import { RemoteShell, RemoteShellBreadcrumb, RemoteShellContent, RemoteShellPanel } from '@wallarm-org/design-system/RemoteShell';
import { SearchInput } from '@wallarm-org/design-system/SearchInput';
import { SegmentedTabs, SegmentedTabsList, SegmentedTabsTrigger } from '@wallarm-org/design-system/SegmentedTabs';
import { Select, SelectContent, SelectInput, SelectOption, SelectOptionIndicator, SelectOptionText, SelectPositioner } from '@wallarm-org/design-system/Select';
import { VStack } from '@wallarm-org/design-system/Stack';
import { Switch, SwitchControl, SwitchLabel } from '@wallarm-org/design-system/Switch';
import { type TableCellContext, type TableColumnDef, type TableRow, Table, TableEmptyState } from '@wallarm-org/design-system/Table';
import { Text } from '@wallarm-org/design-system/Text';
import { Timeline, TimelineConnector, TimelineContent, TimelineIndicator, TimelineItem, TimelineSeparator, TimelineTitle } from '@wallarm-org/design-system/Timeline';
import { useToast } from '@wallarm-org/design-system/Toast';
import { TopHeader, TopHeaderActions, TopHeaderLogo, TopHeaderSeparator } from '@wallarm-org/design-system/TopHeader';

export const Default = () => {
  const toast = useToast();
  const [pathname, setPathname] = useState(PATHNAME);
  const [integrations, setIntegrations] = useState(INTEGRATIONS);
  const [query, setQuery] = useState('');
  const [status, setStatus] = useState<string>('all');
  const [editing, setEditing] = useState<Integration>(SLACK);
  const [drawerOpen, setDrawerOpen] = useState(false);
  const [draft, setDraft] = useState<Draft>(toDraft(SLACK));
  const [saving, setSaving] = useState(false);
  const [testing, setTesting] = useState(false);
  const [testDelivered, setTestDelivered] = useState(false);
  const [testError, setTestError] = useState('');
  const [saveError, setSaveError] = useState('');
  const [disconnecting, setDisconnecting] = useState<Integration>(SLACK);
  const [dialogOpen, setDialogOpen] = useState(false);
  const [pendingDisconnect, setPendingDisconnect] = useState(false);

  const isConnect = editing.status === 'disconnected';
  const dirty = isDirty(draft, editing);
  const canSubmit =
    draft.name.trim() !== '' &&
    draft.destination.trim() !== '' &&
    draft.events.length > 0 &&
    (isConnect || dirty);

  const update = (id: string, patch: Partial<Integration>) =>
    setIntegrations(prev => prev.map(item => (item.id === id ? { ...item, ...patch } : item)));

  const handleNavigate = (to: string) => {
    onNavigate(to);
    setPathname(to);
  };

  const openDrawer = (integration: Integration) => {
    setEditing(integration);
    setDraft(toDraft(integration));
    setTestDelivered(false);
    setTestError('');
    setSaveError('');
    setDrawerOpen(true);
  };

  const handleDrawerOpenChange = (next: boolean) => {
    if (!saving) setDrawerOpen(next);
  };
  const handleNameChange = (event: ChangeEvent<HTMLInputElement>) =>
    setDraft({ ...draft, name: event.target.value });
  const handleDestinationChange = (event: ChangeEvent<HTMLInputElement>) => {
    setDraft({ ...draft, destination: event.target.value });
    setTestDelivered(false);
    setTestError('');
  };
  const handleSeverityChange = ({ value }: { value: string[] }) =>
    setDraft({ ...draft, severity: value[0] ?? draft.severity });
  const handleEventsChange = (value: string[]) => setDraft({ ...draft, events: value });

  const handleTestInForm = async () => {
    setTesting(true);
    setTestDelivered(false);
    setTestError('');
    try {
      await sendTest(editing);
      setTestDelivered(true);
    } catch (error) {
      setTestError(error instanceof Error ? error.message : 'The destination did not respond.');
    } finally {
      setTesting(false);
    }
  };

  const handleSubmit = async (event: FormEvent) => {
    event.preventDefault();
    setSaving(true);
    setSaveError('');
    try {
      await saveIntegration(editing, draft);
    } catch (error) {
      setSaveError(error instanceof Error ? error.message : "The server didn't respond.");
      setSaving(false);
      return;
    }
    update(editing.id, {
      ...draft,
      events: draft.events.filter(isEventKind),
      status: isConnect ? 'connected' : editing.status,
      notify: isConnect ? true : editing.notify,
    });
    setSaving(false);
    setDrawerOpen(false);
    toast.create({
      id: `save-${editing.id}`,
      title: isConnect
        ? `${editing.provider} connected`
        : `${editing.provider} integration updated`,
      type: 'success',
    });
  };

  const handleDialogOpenChange = (next: boolean) => {
    if (!pendingDisconnect) setDialogOpen(next);
  };

  const handleDisconnect = async () => {
    setPendingDisconnect(true);
    try {
      await disconnectIntegration(disconnecting.id);
      update(disconnecting.id, { status: 'disconnected', notify: false });
      setDialogOpen(false);
      toast.create({
        id: `disconnect-${disconnecting.id}`,
        title: `${disconnecting.provider} disconnected`,
        type: 'default',
      });
    } catch {
      toast.create({ title: `Couldn't disconnect ${disconnecting.provider}`, type: 'error' });
    } finally {
      setPendingDisconnect(false);
    }
  };

  const renderNotifications = ({ row }: TableCellContext<Integration, unknown>) => {
    const integration = row.original;
    const handleCheckedChange = async ({ checked }: { checked: boolean }) => {
      update(integration.id, { notify: checked });
      await setNotifications(integration.id, checked);
      toast.create({
        id: `notify-${integration.id}`,
        title: `${integration.provider} notifications ${checked ? 'enabled' : 'disabled'}`,
        type: 'default',
      });
    };

    if (integration.status === 'disconnected') return '—';
    return (
      <Switch
        checked={integration.notify}
        onCheckedChange={handleCheckedChange}
        data-testid={`integrations-notify-${integration.id}`}
      >
        <SwitchControl />
        <SwitchLabel className='sr-only'>Notifications for {integration.provider}</SwitchLabel>
      </Switch>
    );
  };

  const renderMenuAction = (row: TableRow<Integration>) => {
    const integration = row.original;
    const handleEdit = () => openDrawer(integration);
    const handleSendTest = async () => {
      const id = toast.create({
        id: `test-${integration.id}`,
        title: 'Sending test notification…',
        type: 'loading',
      });
      try {
        await sendTest(integration);
        toast.update({ id, title: `Test delivered via ${integration.provider}`, type: 'success' });
      } catch (error) {
        toast.update({
          id,
          title: 'Test failed',
          description: error instanceof Error ? error.message : undefined,
          type: 'error',
          duration: 10000,
        });
      }
    };
    const handleDisconnectSelect = () => {
      setDisconnecting(integration);
      setDialogOpen(true);
    };

    return (
      <DropdownMenu>
        <DropdownMenuTrigger asChild>
          <Button
            variant='ghost'
            color='neutral'
            size='small'
            aria-label={`Actions for ${integration.provider}`}
            data-testid={`integrations-actions-${integration.id}`}
          >
            <Ellipsis />
          </Button>
        </DropdownMenuTrigger>
        <DropdownMenuContent>
          {integration.status === 'disconnected' ? (
            <DropdownMenuItem onSelect={handleEdit} data-testid='integrations-connect'>
              <DropdownMenuItemIcon>
                <Plug />
              </DropdownMenuItemIcon>
              <DropdownMenuItemText>Connect {integration.provider}</DropdownMenuItemText>
            </DropdownMenuItem>
          ) : (
            <>
              <DropdownMenuItem onSelect={handleEdit} data-testid='integrations-edit'>
                <DropdownMenuItemIcon>
                  <Pencil />
                </DropdownMenuItemIcon>
                <DropdownMenuItemText>Edit</DropdownMenuItemText>
              </DropdownMenuItem>
              <DropdownMenuItem onSelect={handleSendTest} data-testid='integrations-send-test'>
                <DropdownMenuItemIcon>
                  <Zap />
                </DropdownMenuItemIcon>
                <DropdownMenuItemText>Send test notification</DropdownMenuItemText>
              </DropdownMenuItem>
              <DropdownMenuSeparator />
              <DropdownMenuItem
                variant='destructive'
                onSelect={handleDisconnectSelect}
                data-testid='integrations-disconnect'
              >
                <DropdownMenuItemIcon>
                  <Unplug />
                </DropdownMenuItemIcon>
                <DropdownMenuItemText>Disconnect {integration.provider}</DropdownMenuItemText>
              </DropdownMenuItem>
            </>
          )}
        </DropdownMenuContent>
      </DropdownMenu>
    );
  };

  const columns: TableColumnDef<Integration>[] = [
    { ...INTEGRATION_COLUMN, meta: { renderMenuAction } },
    ...INFO_COLUMNS,
    {
      id: 'notify',
      header: 'Notifications',
      size: 110,
      enableSorting: false,
      cell: renderNotifications,
    },
  ];

  const search = query.trim().toLowerCase();
  const matching = integrations.filter(
    item =>
      item.provider.toLowerCase().includes(search) ||
      item.name.toLowerCase().includes(search) ||
      item.destination.toLowerCase().includes(search),
  );
  const tabOf = (item: Integration): StatusTab =>
    item.status === 'connected'
      ? 'connected'
      : item.status === 'disconnected'
        ? 'disconnected'
        : 'issues';
  const counts = {
    all: matching.length,
    connected: matching.filter(item => tabOf(item) === 'connected').length,
    issues: matching.filter(item => tabOf(item) === 'issues').length,
    disconnected: matching.filter(item => tabOf(item) === 'disconnected').length,
  };
  const rows = status === 'all' ? matching : matching.filter(item => tabOf(item) === status);

  const handleReset = () => {
    setQuery('');
    setStatus('all');
  };

  return (
    <AppShell data-testid='app-shell'>
      <AppShellHeader>
        <TopHeader>
          <TopHeaderLogo href='/' onClick={handleRailClick}>
            <Logo size='md' />
          </TopHeaderLogo>
          <TopHeaderActions>
            <Button variant='ghost' color='neutral' size='small' aria-label='Search'>
              <Search />
            </Button>
            <TopHeaderSeparator />
            <Button variant='ghost' color='neutral' size='small'>
              Shop Demo
              <ChevronUpDown />
            </Button>
            <ChatTrigger onClick={onOpenAssistant} />
            <NotificationCenter>
              <NotificationCenterTrigger />
            </NotificationCenter>
            <Button variant='ghost' color='neutral' size='small' aria-label='Help'>
              <CircleHelp />
            </Button>
          </TopHeaderActions>
        </TopHeader>
      </AppShellHeader>

      <AppShellRail>
        <NavRail mode='collapsed'>
          <NavRailBody>
            <NavRailItem href='/' icon={HomeIcon} label='Home' onClick={handleRailClick} />
            <NavRailItem href='/recent' icon={History} label='Recent' onClick={handleRailClick} />
            <NavRailSeparator />
            {PRODUCTS.map(product => (
              <NavRailItem
                key={product.id}
                href={`/${product.id}`}
                icon={product.icon}
                label={product.label}
                shortcut={product.shortcut}
                onClick={handleRailClick}
              />
            ))}
          </NavRailBody>
          <NavRailFooter>
            <NavRailItem
              href='/settings'
              icon={Settings}
              label='Settings'
              shortcut={['G', 'S']}
              active
              onClick={handleRailClick}
            />
          </NavRailFooter>
        </NavRail>
      </AppShellRail>

      <AppShellRemote role='main'>
        <RemoteShell
          config={SETTINGS_NAV}
          basePath='/settings'
          pathname={pathname}
          onNavigate={handleNavigate}
        >
          <RemoteShellPanel />
          <RemoteShellBreadcrumb />
          <RemoteShellContent>
            <Page name='settings-integrations' fullSize fixedHeight data-testid='integrations-page'>
              <PageHeader>
                <PageHeaderGroup className='flex-1'>
                  <PageTitle>Integrations</PageTitle>
                  <PageDescription>
                    Where Wallarm sends attacks, incidents and system events, and which ones each
                    tool receives.
                  </PageDescription>
                </PageHeaderGroup>
              </PageHeader>

              <PageToolbar>
                <SearchInput
                  value={query}
                  onChange={setQuery}
                  placeholder='Search integration or destination'
                  className='w-[320px]'
                  data-testid='integrations-search'
                />
                <SegmentedTabs
                  value={status}
                  onChange={setStatus}
                  data-testid='integrations-status-tabs'
                >
                  <SegmentedTabsList>
                    <SegmentedTabsTrigger value='all'>
                      All <NumericBadge>{counts.all}</NumericBadge>
                    </SegmentedTabsTrigger>
                    <SegmentedTabsTrigger value='connected'>
                      Connected <NumericBadge>{counts.connected}</NumericBadge>
                    </SegmentedTabsTrigger>
                    <SegmentedTabsTrigger value='issues'>
                      Issues <NumericBadge>{counts.issues}</NumericBadge>
                    </SegmentedTabsTrigger>
                    <SegmentedTabsTrigger value='disconnected'>
                      Not connected <NumericBadge>{counts.disconnected}</NumericBadge>
                    </SegmentedTabsTrigger>
                  </SegmentedTabsList>
                </SegmentedTabs>
              </PageToolbar>

              <PageContent>
                <Table
                  aria-label='Integrations'
                  data={rows}
                  columns={columns}
                  getRowId={getIntegrationId}
                  activeRowId={drawerOpen ? editing.id : undefined}
                  data-testid='integrations-table'
                >
                  <TableEmptyState>
                    <EmptyState type='collection-empty' data-testid='integrations-no-results'>
                      <EmptyStateIllustration>
                        <SearchX />
                      </EmptyStateIllustration>
                      <EmptyStateMessage>
                        <EmptyStateTitle>No results found</EmptyStateTitle>
                        <EmptyStateDescription>
                          No integrations match your search or status.
                        </EmptyStateDescription>
                      </EmptyStateMessage>
                      <EmptyStateActions>
                        <Button
                          size='medium'
                          variant='outline'
                          color='neutral'
                          onClick={handleReset}
                        >
                          <FilterX />
                          Reset filters
                        </Button>
                      </EmptyStateActions>
                    </EmptyState>
                  </TableEmptyState>
                </Table>
              </PageContent>

              <Drawer
                open={drawerOpen}
                onOpenChange={handleDrawerOpenChange}
                width={700}
                data-testid='integration-drawer'
              >
                <DrawerContent>
                  <DrawerHeader>
                    <DrawerTitle>
                      {isConnect
                        ? `Connect ${editing.provider}`
                        : `Edit ${editing.provider} integration`}
                    </DrawerTitle>
                    <DrawerDescription>
                      {editing.category} · Wallarm sends the selected events to this{' '}
                      {inSentence(editing.destinationLabel)}.
                    </DrawerDescription>
                  </DrawerHeader>
                  <form onSubmit={handleSubmit} className='flex min-h-0 flex-1 flex-col'>
                    <DrawerBody>
                      <VStack gap={16}>
                        {saveError && (
                          <Alert color='destructive' data-testid='integration-save-error'>
                            <AlertIcon />
                            <AlertContent>
                              <AlertTitle>Couldn't save changes</AlertTitle>
                              <AlertDescription>{saveError}</AlertDescription>
                            </AlertContent>
                          </Alert>
                        )}
                        <Timeline>
                          <TimelineItem>
                            <TimelineConnector>
                              <TimelineIndicator>1</TimelineIndicator>
                              <TimelineSeparator />
                            </TimelineConnector>
                            <TimelineContent>
                              <TimelineTitle>Destination</TimelineTitle>
                              <VStack gap={12}>
                                <div className='grid grid-cols-2 gap-12'>
                                  <Field required>
                                    <FieldLabel>
                                      Name
                                      <FieldIndicator />
                                    </FieldLabel>
                                    <Input
                                      value={draft.name}
                                      onChange={handleNameChange}
                                      placeholder='SOC alerts'
                                      data-testid='integration-name'
                                    />
                                  </Field>
                                  <Field required>
                                    <FieldLabel>
                                      Minimum severity
                                      <FieldIndicator />
                                    </FieldLabel>
                                    <Select
                                      collection={severities}
                                      value={[draft.severity]}
                                      onValueChange={handleSeverityChange}
                                    >
                                      <SelectInput className='w-full' />
                                      <SelectPositioner>
                                        <SelectContent>
                                          {severities.items.map(item => (
                                            <SelectOption key={item.value} item={item}>
                                              <SelectOptionText>{item.label}</SelectOptionText>
                                              <SelectOptionIndicator />
                                            </SelectOption>
                                          ))}
                                        </SelectContent>
                                      </SelectPositioner>
                                    </Select>
                                  </Field>
                                </div>
                                <Field required>
                                  <FieldLabel>
                                    {editing.destinationLabel}
                                    <FieldIndicator />
                                  </FieldLabel>
                                  <Input
                                    value={draft.destination}
                                    onChange={handleDestinationChange}
                                    data-testid='integration-destination'
                                  />
                                </Field>
                              </VStack>
                            </TimelineContent>
                          </TimelineItem>
                          <TimelineItem>
                            <TimelineConnector>
                              <TimelineIndicator>2</TimelineIndicator>
                              <TimelineSeparator />
                            </TimelineConnector>
                            <TimelineContent>
                              <TimelineTitle>Events</TimelineTitle>
                              <CheckboxGroup
                                variant='card'
                                name='events'
                                value={draft.events}
                                onValueChange={handleEventsChange}
                              >
                                {EVENTS.map(event => (
                                  <Checkbox
                                    key={event.value}
                                    value={event.value}
                                    data-testid={`integration-event-${event.value}`}
                                  >
                                    <CheckboxIndicator />
                                    <CheckboxLabel>{event.label}</CheckboxLabel>
                                    <CheckboxDescription>{event.description}</CheckboxDescription>
                                  </Checkbox>
                                ))}
                              </CheckboxGroup>
                            </TimelineContent>
                          </TimelineItem>
                          <TimelineItem>
                            <TimelineConnector>
                              <TimelineIndicator>3</TimelineIndicator>
                            </TimelineConnector>
                            <TimelineContent>
                              <TimelineTitle>Test delivery</TimelineTitle>
                              <VStack gap={12} align='start'>
                                <Text size='sm' color='secondary'>
                                  Allow 203.0.113.0/24 and 198.51.100.0/24 if the destination
                                  filters by source IP.
                                </Text>
                                <Button
                                  variant='outline'
                                  color='neutral'
                                  disabled={draft.destination.trim() === ''}
                                  loading={testing}
                                  onClick={handleTestInForm}
                                  data-testid='integration-test'
                                >
                                  <Zap />
                                  Send test notification
                                </Button>
                                {testDelivered && (
                                  <Alert color='success' data-testid='integration-test-result'>
                                    <AlertIcon />
                                    <AlertContent>
                                      <AlertTitle>Test delivered to {draft.destination}</AlertTitle>
                                      <AlertDescription>
                                        Check {editing.provider} for a message from Wallarm.
                                      </AlertDescription>
                                    </AlertContent>
                                  </Alert>
                                )}
                                {testError && (
                                  <Alert color='destructive' data-testid='integration-test-error'>
                                    <AlertIcon />
                                    <AlertContent>
                                      <AlertTitle>Test failed</AlertTitle>
                                      <AlertDescription>{testError}</AlertDescription>
                                    </AlertContent>
                                  </Alert>
                                )}
                              </VStack>
                            </TimelineContent>
                          </TimelineItem>
                        </Timeline>
                      </VStack>
                    </DrawerBody>
                    <DrawerFooter>
                      <DrawerClose asChild>
                        <Button variant='ghost' color='neutral'>
                          Cancel
                        </Button>
                      </DrawerClose>
                      <Button
                        type='submit'
                        disabled={!canSubmit}
                        loading={saving}
                        data-testid='integration-submit'
                      >
                        {isConnect ? `Connect ${editing.provider}` : 'Save changes'}
                      </Button>
                    </DrawerFooter>
                  </form>
                </DrawerContent>
              </Drawer>

              <Dialog
                width={400}
                open={dialogOpen}
                onOpenChange={handleDialogOpenChange}
                data-testid='disconnect-dialog'
              >
                <DialogContent>
                  <DialogHeader>
                    <DialogTitle>Disconnect {disconnecting.provider}?</DialogTitle>
                    <DialogDescription>
                      Wallarm stops sending events to {disconnecting.destination}. The event and
                      severity settings are kept, so you can reconnect later.
                    </DialogDescription>
                  </DialogHeader>
                  <DialogFooter>
                    <DialogClose asChild>
                      <Button variant='ghost' color='neutral'>
                        Cancel
                      </Button>
                    </DialogClose>
                    <Button
                      color='destructive'
                      loading={pendingDisconnect}
                      onClick={handleDisconnect}
                      data-testid='disconnect-confirm'
                    >
                      Disconnect {disconnecting.provider}
                    </Button>
                  </DialogFooter>
                </DialogContent>
              </Dialog>
            </Page>
          </RemoteShellContent>
        </RemoteShell>
      </AppShellRemote>
    </AppShell>
  );
};
```

First load: skeleton rows under the real header, tabs without counts.

First load: the real header and toolbar with skeleton rows under the column headers, and tabs
without counts until the data arrives. Never a `Loader` in place of the table.

```tsx
import { AppShell, AppShellHeader, AppShellRail, AppShellRemote } from '@wallarm-org/design-system/AppShell';
import { Button } from '@wallarm-org/design-system/Button';
import { ChatTrigger } from '@wallarm-org/design-system/Chat';
import { ChevronUpDown, CircleHelp, History, Home as HomeIcon, Search, Settings } from '@wallarm-org/design-system/icons';
import { Logo } from '@wallarm-org/design-system/Logo';
import { NavRail, NavRailBody, NavRailFooter, NavRailItem, NavRailSeparator } from '@wallarm-org/design-system/NavRail';
import { NotificationCenter, NotificationCenterTrigger } from '@wallarm-org/design-system/NotificationCenter';
import { Page, PageContent, PageDescription, PageHeader, PageHeaderGroup, PageTitle, PageToolbar } from '@wallarm-org/design-system/Page';
import { RemoteShell, RemoteShellBreadcrumb, RemoteShellContent, RemoteShellPanel } from '@wallarm-org/design-system/RemoteShell';
import { SearchInput } from '@wallarm-org/design-system/SearchInput';
import { SegmentedTabs, SegmentedTabsList, SegmentedTabsTrigger } from '@wallarm-org/design-system/SegmentedTabs';
import { Table } from '@wallarm-org/design-system/Table';
import { TopHeader, TopHeaderActions, TopHeaderLogo, TopHeaderSeparator } from '@wallarm-org/design-system/TopHeader';

export const Loading = () => (
  <AppShell data-testid='app-shell'>
    <AppShellHeader>
      <TopHeader>
        <TopHeaderLogo href='/' onClick={handleRailClick}>
          <Logo size='md' />
        </TopHeaderLogo>
        <TopHeaderActions>
          <Button variant='ghost' color='neutral' size='small' aria-label='Search'>
            <Search />
          </Button>
          <TopHeaderSeparator />
          <Button variant='ghost' color='neutral' size='small'>
            Shop Demo
            <ChevronUpDown />
          </Button>
          <ChatTrigger onClick={onOpenAssistant} />
          <NotificationCenter>
            <NotificationCenterTrigger />
          </NotificationCenter>
          <Button variant='ghost' color='neutral' size='small' aria-label='Help'>
            <CircleHelp />
          </Button>
        </TopHeaderActions>
      </TopHeader>
    </AppShellHeader>

    <AppShellRail>
      <NavRail mode='collapsed'>
        <NavRailBody>
          <NavRailItem href='/' icon={HomeIcon} label='Home' onClick={handleRailClick} />
          <NavRailItem href='/recent' icon={History} label='Recent' onClick={handleRailClick} />
          <NavRailSeparator />
          {PRODUCTS.map(product => (
            <NavRailItem
              key={product.id}
              href={`/${product.id}`}
              icon={product.icon}
              label={product.label}
              shortcut={product.shortcut}
              onClick={handleRailClick}
            />
          ))}
        </NavRailBody>
        <NavRailFooter>
          <NavRailItem
            href='/settings'
            icon={Settings}
            label='Settings'
            shortcut={['G', 'S']}
            active
            onClick={handleRailClick}
          />
        </NavRailFooter>
      </NavRail>
    </AppShellRail>

    <AppShellRemote role='main'>
      <RemoteShell
        config={SETTINGS_NAV}
        basePath='/settings'
        pathname={PATHNAME}
        onNavigate={onNavigate}
      >
        <RemoteShellPanel />
        <RemoteShellBreadcrumb />
        <RemoteShellContent>
          <Page name='settings-integrations' fullSize fixedHeight data-testid='integrations-page'>
            <PageHeader>
              <PageHeaderGroup className='flex-1'>
                <PageTitle>Integrations</PageTitle>
                <PageDescription>
                  Where Wallarm sends attacks, incidents and system events, and which ones each tool
                  receives.
                </PageDescription>
              </PageHeaderGroup>
            </PageHeader>

            <PageToolbar>
              <SearchInput
                placeholder='Search integration or destination'
                className='w-[320px]'
                data-testid='integrations-search'
              />
              <SegmentedTabs defaultValue='all' data-testid='integrations-status-tabs'>
                <SegmentedTabsList>
                  <SegmentedTabsTrigger value='all'>All</SegmentedTabsTrigger>
                  <SegmentedTabsTrigger value='connected'>Connected</SegmentedTabsTrigger>
                  <SegmentedTabsTrigger value='issues'>Issues</SegmentedTabsTrigger>
                  <SegmentedTabsTrigger value='disconnected'>Not connected</SegmentedTabsTrigger>
                </SegmentedTabsList>
              </SegmentedTabs>
            </PageToolbar>

            <PageContent>
              <Table
                aria-label='Integrations'
                data={[]}
                columns={STATIC_COLUMNS}
                isLoading
                data-testid='integrations-table'
              />
            </PageContent>
          </Page>
        </RemoteShellContent>
      </RemoteShell>
    </AppShellRemote>
  </AppShell>
);
```

## Related

- [Application layout](https://wallarm.github.io/design-system/patterns/app-layout.md)
- [Resource list page](https://wallarm.github.io/design-system/patterns/resource-list-page.md)
- [Entity table](https://wallarm.github.io/design-system/patterns/entity-table.md)
- [Create and edit forms](https://wallarm.github.io/design-system/patterns/create-edit-forms.md)
- [Confirmation dialogs](https://wallarm.github.io/design-system/patterns/confirmation-dialogs.md)
- [Feedback toasts](https://wallarm.github.io/design-system/patterns/feedback-toasts.md)
- [Empty states](https://wallarm.github.io/design-system/patterns/empty-states.md)
- [Settings page](https://wallarm.github.io/design-system/patterns/settings-page.md): independent values that save on their own.
