From 0471443716177bd6d587d4ad6b57d946ca693914 Mon Sep 17 00:00:00 2001 From: cliffhall Date: Tue, 17 Mar 2026 11:54:09 -0400 Subject: [PATCH] fix: Use ServerListScreen with real ServerCards in HomeLayout stories Replace placeholder Paper elements with actual ServerListScreen organism containing properly configured ServerCard components. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../layouts/HomeLayout/HomeLayout.stories.tsx | 105 ++++++++++++++---- 1 file changed, 82 insertions(+), 23 deletions(-) diff --git a/clients/web/src/components/layouts/HomeLayout/HomeLayout.stories.tsx b/clients/web/src/components/layouts/HomeLayout/HomeLayout.stories.tsx index 1467e949..f346ba1b 100644 --- a/clients/web/src/components/layouts/HomeLayout/HomeLayout.stories.tsx +++ b/clients/web/src/components/layouts/HomeLayout/HomeLayout.stories.tsx @@ -1,7 +1,9 @@ import type { Meta, StoryObj } from '@storybook/react-vite'; import { fn } from 'storybook/test'; -import { Container, Paper, Stack, Text } from '@mantine/core'; +import { Text } from '@mantine/core'; import { HomeLayout } from './HomeLayout'; +import { ServerListScreen } from '../../organisms/ServerListScreen/ServerListScreen'; +import type { ServerCardProps } from '../../molecules/ServerCard/ServerCard'; const meta: Meta = { title: 'Layouts/HomeLayout', @@ -15,31 +17,88 @@ const meta: Meta = { export default meta; type Story = StoryObj; -export const Light: Story = { - args: { - children: Page content goes here, - }, -}; +function makeServerCallbacks(): Pick< + ServerCardProps, + | 'onToggleConnection' + | 'onCopyCommand' + | 'onServerInfo' + | 'onSettings' + | 'onEdit' + | 'onClone' + | 'onRemove' +> { + return { + onToggleConnection: fn(), + onCopyCommand: fn(), + onServerInfo: fn(), + onSettings: fn(), + onEdit: fn(), + onClone: fn(), + onRemove: fn(), + }; +} -export const WithContent: Story = { +export const Empty: Story = { args: { children: ( - - - - Local Dev Server - npx @modelcontextprotocol/server-filesystem - - - Database Tools - python -m mcp_server_sqlite - - - Remote API Server - https://api.example.com/mcp - - - + ), }, }; + +export const WithServers: Story = { + args: { + children: ( + + ), + }, +}; + +export const MinimalContent: Story = { + args: { + children: Page content goes here, + }, +};