Skip to content

Commit 59ef108

Browse files
committed
fix(webapp): point the filtered-runs demo intent at the runs collection
1 parent 8e6adee commit 59ef108

4 files changed

Lines changed: 16 additions & 10 deletions

File tree

apps/webapp/app/components/dashboard-agent/demo/demo.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,15 @@ describe("intent fixtures", () => {
211211
expect(demoIntent.executable).toBe(demoIntent.intent.kind !== "propose_fix");
212212
}
213213
});
214+
215+
it("points the filtered-runs example at the runs collection, not one run", () => {
216+
const target = fixtures.demoIntents.navigateToFailedRuns.intent;
217+
expect(target.kind).toBe("navigate");
218+
if (target.kind !== "navigate") return;
219+
const parsed = safeParseTriggerUri(target.target);
220+
expect(parsed.success).toBe(true);
221+
if (parsed.success) expect(parsed.data.kind).toBe("runs");
222+
});
214223
});
215224

216225
describe("page context and prompt fixtures", () => {

apps/webapp/app/components/dashboard-agent/demo/fixtures/intents.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { isExecutableIntent, type AgentIntent } from "@internal/dashboard-agent-contracts";
2-
import { DEMO_WORLD, demoRunUri } from "../ids";
2+
import { DEMO_WORLD, demoRunUri, demoRunsUri } from "../ids";
33
import { demoBacklogDrainWatch } from "./watches";
44

55
export type DemoIntent = {
@@ -19,7 +19,7 @@ const demoIntent = (intent: AgentIntent, outcome: string, deepLinkLabel?: string
1919
export const demoNavigateToFailedRuns = demoIntent(
2020
{
2121
kind: "navigate",
22-
target: demoRunUri(DEMO_WORLD.failedRunId),
22+
target: demoRunsUri(),
2323
filters: {
2424
statuses: ["COMPLETED_WITH_ERROR"],
2525
period: "24h",

apps/webapp/app/routes/storybook.agent-ui/gallery.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,12 @@ export function GalleryPage({
141141
{meta.blurb} {sections.length} states, rendered in isolation at panel width (380px) from
142142
the demo fixtures in{" "}
143143
<code className="font-mono text-xs">app/components/dashboard-agent/demo/fixtures</code>.
144-
The list lives in <code className="font-mono text-xs">manifest.ts</code>, which the
145-
screenshot script walks too.
144+
The list lives in <code className="font-mono text-xs">manifest.ts</code>.
146145
</Paragraph>
147146
<Paragraph variant="extra-small">
148147
Run ids, queues, errors and reports are fabricated. Deep links resolve inside a project,
149148
so here they render as plain text or navigate nowhere. The theme buttons flip{" "}
150-
<code className="font-mono text-xs">data-theme</code> on the root element, which is how
151-
the screenshot pack captures both themes.
149+
<code className="font-mono text-xs">data-theme</code> on the root element.
152150
</Paragraph>
153151
</div>
154152

apps/webapp/app/routes/storybook.agent-ui/manifest.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// Keep this file free of imports and JSX: the screenshot script is plain node and
2-
// cannot import a Remix route module.
1+
// Keep this file free of imports and JSX so plain node can read it.
32

43
export type GalleryPageId = "chat" | "view-blocks" | "report" | "investigation" | "watch";
54

@@ -63,11 +62,11 @@ export type GalleryGroup =
6362
| "banner";
6463

6564
export type GallerySection = {
66-
/** DOM id, deep-link anchor and screenshot filename. Renaming breaks both. */
65+
/** DOM id and deep-link anchor. Renaming breaks the link. */
6766
sectionId: string;
6867
title: string;
6968
group: GalleryGroup;
70-
/** A state that only exists after a click. The screenshot script clicks matching text first. */
69+
/** A state that only exists after a click. */
7170
expandText?: string;
7271
};
7372

0 commit comments

Comments
 (0)