Skip to content

Commit 787ed67

Browse files
IEvangelistCopilot
andauthored
Improve dashboard AI agents landing content (#1231)
Co-authored-by: David Pine <7679720+IEvangelist@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 4158cf7 commit 787ed67

6 files changed

Lines changed: 91 additions & 19 deletions

File tree

186 KB
Loading
228 KB
Loading

src/frontend/src/components/ImageShowcase.astro

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,36 @@
66
import { Icon } from '@astrojs/starlight/components';
77
import { Image } from 'astro:assets';
88
import { Zoom } from 'starlight-image-zoom/components';
9+
import ThemeImage from '@components/ThemeImage.astro';
910
10-
interface Props {
11+
type BaseProps = {
1112
title: string;
1213
description: string;
13-
image: ImageMetadata;
1414
imageAlt: string;
1515
imagePosition?: 'left' | 'right';
1616
cta?: { label: string; href: string };
17-
}
18-
19-
const { title, description, image, imageAlt, imagePosition = 'right', cta } = Astro.props;
17+
};
18+
19+
type Props = BaseProps &
20+
(
21+
| {
22+
image: ImageMetadata;
23+
lightImage?: never;
24+
darkImage?: never;
25+
}
26+
| {
27+
image?: never;
28+
lightImage: ImageMetadata;
29+
darkImage: ImageMetadata;
30+
}
31+
);
32+
33+
const { title, description, imageAlt, imagePosition = 'right', cta } = Astro.props;
34+
const themedImages =
35+
'lightImage' in Astro.props && 'darkImage' in Astro.props
36+
? { light: Astro.props.lightImage, dark: Astro.props.darkImage }
37+
: undefined;
38+
const singleImage = 'image' in Astro.props ? Astro.props.image : undefined;
2039
---
2140

2241
<section class:list={['image-showcase not-content', { reversed: imagePosition === 'left' }]}>
@@ -33,9 +52,22 @@ const { title, description, image, imageAlt, imagePosition = 'right', cta } = As
3352
}
3453
</div>
3554
<div class="showcase-image">
36-
<Zoom label={imageAlt}>
37-
<Image src={image} alt={imageAlt} loading="lazy" />
38-
</Zoom>
55+
{
56+
themedImages ? (
57+
<ThemeImage
58+
light={themedImages.light}
59+
dark={themedImages.dark}
60+
alt={imageAlt}
61+
label={imageAlt}
62+
/>
63+
) : (
64+
singleImage && (
65+
<Zoom label={imageAlt}>
66+
<Image src={singleImage} alt={imageAlt} loading="lazy" />
67+
</Zoom>
68+
)
69+
)
70+
}
3971
</div>
4072
</section>
4173

src/frontend/src/content/docs/dashboard/index.mdx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ import projectsImage from '@assets/dashboard/explore/resources-filtered-containe
2323
import tracesImage from '@assets/dashboard/explore/trace-span-details.png';
2424
import metricsImage from '@assets/dashboard/explore/metrics-view.png';
2525
import structuredLogsImage from '@assets/dashboard/explore/structured-logs-errors-view.png';
26-
import mcpDialogImage from '@assets/dashboard/mcp-server/mcp-dialog.png';
26+
import aiAgentsDialogDark from '@assets/dashboard/ai-coding-agents/ai-agents-dialog-dark.png';
27+
import aiAgentsDialogLight from '@assets/dashboard/ai-coding-agents/ai-agents-dialog-light.png';
2728

2829
<TopicHero
2930
icon="seti:happenings"
@@ -107,12 +108,13 @@ Open the dashboard URL, then point your apps' OTLP exporter to `http://localhost
107108
## AI-powered debugging
108109

109110
<ImageShowcase
110-
title="MCP server for AI agents"
111-
description="Expose your app's telemetry, resources, and logs to AI coding agents via the Model Context Protocol. Give your coding assistants full observability context for smarter debugging."
112-
image={mcpDialogImage}
113-
imageAlt="Aspire Dashboard MCP server configuration dialog showing connection details for AI assistants."
111+
title="AI agents with dashboard context"
112+
description="Give AI coding agents deep observability into resource state, health checks, logs, traces, and relationships so they can diagnose issues and verify fixes with confidence."
113+
lightImage={aiAgentsDialogLight}
114+
darkImage={aiAgentsDialogDark}
115+
imageAlt="Aspire Dashboard AI agents dialog explaining telemetry data available to coding agents."
114116
imagePosition="left"
115-
cta={{ label: 'Configure MCP server', href: '/get-started/aspire-mcp-server/' }}
117+
cta={{ label: 'Use AI coding agents', href: '/dashboard/ai-coding-agents/' }}
116118
/>
117119

118120
## Key capabilities
@@ -170,11 +172,11 @@ Open the dashboard URL, then point your apps' OTLP exporter to `http://localhost
170172
features={[
171173
{
172174
icon: 'puzzle',
173-
title: 'MCP server',
175+
title: 'AI coding agents',
174176
description:
175-
'Expose dashboard data to AI agents and coding assistants via the Model Context Protocol. Your AI tools get full observability context.',
176-
href: '/get-started/aspire-mcp-server/',
177-
label: 'Configure MCP',
177+
'Use the Aspire CLI and MCP server to give agents dashboard data for diagnosing and verifying app changes.',
178+
href: '/dashboard/ai-coding-agents/',
179+
label: 'Use agents',
178180
accent: 'purple',
179181
},
180182
{

src/frontend/tests/typecheck/component-props.contracts.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,13 @@ const validImageShowcaseProps = {
325325
imageAlt: 'Zoomed diagram',
326326
cta: { label: 'Read the guide', href: '/docs/' },
327327
} satisfies PropsOf<typeof ImageShowcase>;
328+
const validThemedImageShowcaseProps = {
329+
title: 'Debug with agents',
330+
description: 'Give agents dashboard context.',
331+
lightImage: heroImage,
332+
darkImage: heroImage,
333+
imageAlt: 'Themed dashboard dialog',
334+
} satisfies PropsOf<typeof ImageShowcase>;
328335
// @ts-expect-error ImageShowcase should reject unknown props.
329336
const invalidImageShowcaseProps: PropsOf<typeof ImageShowcase> = {
330337
title: 'Visualize your app',
@@ -333,6 +340,15 @@ const invalidImageShowcaseProps: PropsOf<typeof ImageShowcase> = {
333340
imageAlt: 'Zoomed diagram',
334341
unexpected: true,
335342
};
343+
// @ts-expect-error ImageShowcase should not mix single-image and theme-image props.
344+
const invalidMixedImageShowcaseProps: PropsOf<typeof ImageShowcase> = {
345+
title: 'Visualize your app',
346+
description: 'See resources, traces and endpoints together.',
347+
image: heroImage,
348+
lightImage: heroImage,
349+
darkImage: heroImage,
350+
imageAlt: 'Zoomed diagram',
351+
};
336352

337353
const validIncludeProps = {
338354
relativePath: 'content/docs/get-started/install-cli.mdx',
@@ -742,7 +758,9 @@ void [
742758
validIconLinkCardProps,
743759
invalidIconLinkCardProps,
744760
validImageShowcaseProps,
761+
validThemedImageShowcaseProps,
745762
invalidImageShowcaseProps,
763+
invalidMixedImageShowcaseProps,
746764
validIncludeProps,
747765
invalidIncludeProps,
748766
validInstallCliModalProps,

src/frontend/tests/unit/custom-components.vitest.test.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,24 @@ const basicRenderCases: BasicRenderCase[] = [
387387
},
388388
includes: ['Visualize your app', 'Zoomed diagram', 'Read the guide'],
389389
},
390+
{
391+
name: 'ImageShowcase renders theme-aware images',
392+
Component: ImageShowcase,
393+
props: {
394+
title: 'Debug with agents',
395+
description: 'Give agents dashboard context.',
396+
lightImage: heroImage,
397+
darkImage: heroImage,
398+
imageAlt: 'Themed dashboard dialog',
399+
},
400+
includes: [
401+
'Debug with agents',
402+
'theme-image',
403+
'data-light=',
404+
'data-dark=',
405+
'Themed dashboard dialog',
406+
],
407+
},
390408
{
391409
name: 'LoopingVideo renders sources and toggle button state',
392410
Component: LoopingVideo,
@@ -968,7 +986,9 @@ describe('custom Astro component render coverage', () => {
968986
// time in the README body and the count rises to 2.
969987
const escaped = distinctiveSummarySentence.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
970988
const summaryMatches = html.match(new RegExp(escaped, 'g')) ?? [];
971-
expect(summaryMatches.length, 'summary sentence should appear exactly once (hero only)').toBe(1);
989+
expect(summaryMatches.length, 'summary sentence should appear exactly once (hero only)').toBe(
990+
1
991+
);
972992

973993
// 2. The long emphasized label is gone from the body. Its image still
974994
// surfaces in the gallery so the screenshot itself is preserved.

0 commit comments

Comments
 (0)