Skip to content

Commit ea1caa4

Browse files
committed
fix(showcase): D5 dashboard chip lookup + CLI deep-input mapping
Dashboard: resolveCell() looked up D5 rows by catalog feature ID (e.g. d5:slug/hitl-in-chat) but the harness writes them keyed by D5 feature type (e.g. d5:slug/hitl-text-input). Added CATALOG_TO_D5_KEY mapping so the dashboard resolves the correct PB row for each cell. CLI: buildDeepInputs() passed manifest registry IDs as `features` but the D5 driver only maps them through demosToFeatureTypes() when they arrive as `demos`. Changed to pass `demos` so the driver's mapping from registry IDs to D5 feature types activates correctly.
1 parent 797295f commit ea1caa4

2 files changed

Lines changed: 46 additions & 5 deletions

File tree

showcase/harness/src/cli/targets.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,14 @@ export interface ChatToolsInput {
6767
* e2e-deep (D5) driver input — mirrors the `inputSchema` in
6868
* `src/probes/drivers/e2e-deep.ts`. `backendUrl` or `publicUrl` is
6969
* required. The CLI sets `backendUrl` from local-ports and populates
70-
* `features` from the manifest's top-level `features` array.
70+
* `demos` from the manifest's top-level `features` array (registry IDs
71+
* that the driver maps to D5 feature types via `demosToFeatureTypes()`).
7172
*/
7273
export interface DeepInput {
7374
key: string;
7475
backendUrl: string;
7576
name: string;
76-
features: string[];
77+
demos: string[];
7778
shape: "package";
7879
}
7980

@@ -267,11 +268,11 @@ export function buildDeepInputs(
267268
key: `e2e-deep:${slug}`,
268269
backendUrl: getPackageUrl(slug, config),
269270
name: manifest.name,
270-
features,
271+
demos: features,
271272
shape: "package" as const,
272273
};
273274
})
274-
.filter((input) => input.features.length > 0);
275+
.filter((input) => input.demos.length > 0);
275276
}
276277

277278
/**

showcase/shell-dashboard/src/lib/live-status.ts

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,46 @@ export function keyFor(
9797
: `${dimension}:${slug}`;
9898
}
9999

100+
/**
101+
* Catalog feature ID → D5 PB row key suffix. The harness writes D5 rows
102+
* keyed by `d5:<slug>/<d5FeatureType>`, but the dashboard resolves cells
103+
* by catalog `featureId`. This map bridges the two namespaces.
104+
*
105+
* Mirrors `REGISTRY_TO_D5` in `harness/src/probes/helpers/d5-feature-mapping.ts`.
106+
*/
107+
const CATALOG_TO_D5_KEY: Readonly<Record<string, readonly string[]>> = {
108+
"agentic-chat": ["agentic-chat"],
109+
"tool-rendering": ["tool-rendering"],
110+
"tool-rendering-default-catchall": ["tool-rendering"],
111+
"tool-rendering-custom-catchall": ["tool-rendering"],
112+
"headless-simple": ["gen-ui-headless"],
113+
"headless-complete": ["gen-ui-headless"],
114+
"gen-ui-tool-based": ["gen-ui-custom"],
115+
"hitl-in-chat": ["hitl-text-input"],
116+
"hitl-in-chat-booking": ["hitl-text-input"],
117+
hitl: ["hitl-steps"],
118+
"hitl-in-app": ["hitl-approve-deny"],
119+
"shared-state-read-write": ["shared-state-read", "shared-state-write"],
120+
"mcp-apps": ["mcp-apps"],
121+
subagents: ["subagents"],
122+
};
123+
124+
function resolveD5Row(
125+
live: LiveStatusMap,
126+
slug: string,
127+
featureId: string,
128+
): StatusRow | null {
129+
const d5Keys = CATALOG_TO_D5_KEY[featureId];
130+
if (!d5Keys) return null;
131+
let worst: StatusRow | null = null;
132+
for (const d5Key of d5Keys) {
133+
const row = live.get(keyFor("d5", slug, d5Key)) ?? null;
134+
if (!row) continue;
135+
if (!worst || row.state === "red") worst = row;
136+
}
137+
return worst;
138+
}
139+
100140
function rowTone(row: StatusRow | null): BadgeTone {
101141
if (!row) return "gray";
102142
switch (row.state) {
@@ -281,7 +321,7 @@ export function resolveCell(
281321
// (alert engine routes them independently, same model as smoke). A
282322
// missing row resolves to a gray "?" badge, which is the expected
283323
// resting state for D6 cells outside their weekly-rotation slot.
284-
const d5Row = live.get(keyFor("d5", slug, featureId)) ?? null;
324+
const d5Row = resolveD5Row(live, slug, featureId);
285325
const d6Row = live.get(keyFor("d6", slug, featureId)) ?? null;
286326

287327
// Rollup contributors: health + e2e (Decision #7: smokeRow dropped).

0 commit comments

Comments
 (0)