Files
Jordan Ritter bf75022c78 fix(showcase): repair ms-agent-dotnet D6 gen-ui-declarative (surface-missing)
The D6 e2e-full probe d6:ms-agent-dotnet/gen-ui-declarative failed at turn 1
with reason=surface-missing. Two root causes fixed at the layer the real
captured backend behaviour revealed.

Root cause 1 - stale aimock fixture. The fixture still carried the old D5
pill prompts (KPI/pie/bar/status) plus a lone outer generate_a2ui entry for
the sales-dashboard prompt with no matching inner _design_a2ui_surface, so
turn 1 never produced a surface. Re-authored to the current 4 VantageThreads
sales prompts mirroring the llamaindex/ms-agent-python green north-stars for
this _design_a2ui_surface backend family (outer generate_a2ui returns a
context steering phrase; the inner _design_a2ui_surface fixture matches that
phrase).

Unlike llamaindex/ms-agent-python, the ms-agent-dotnet ChatClientAgent session
ACCUMULATES prior-turn tool results into each subsequent turn's request, so
hasToolResult is true from turn 2 onward and cannot discriminate outer vs
narration (turn 2+ would short-circuit straight to narration, no surface).
The narration is therefore keyed on the CURRENT turn's outer toolCallId
(aimock only matches toolCallId when the LAST message is that tool result)
and ordered before the outer per pill so the tool-result turn resolves to
narration while the user-message turn resolves to the outer.

Root cause 2 - renderer/catalog drift. The declarative catalog lagged the
green cluster: InfoRow was missing its declarative-info-row testid (turn 4)
and DataTable was absent entirely (turn 2). Added the testid and the DataTable
renderer + definition, matching the green cluster.

Red -> Green (real control-plane, --isolate --rebuild):
  RED:   d6:ms-agent-dotnet/gen-ui-declarative = red (turn 1 surface-missing)
  GREEN: d6:ms-agent-dotnet/gen-ui-declarative = green (1 passed)

Visual: drove all 4 turns via Playwright (X-AIMock-Context: ms-agent-dotnet)
- turn 1 4 KPI metrics + region pie + monthly bar
- turn 2 rep-quota DataTable + attainment bar
- turn 3 3 severity StatusBadges + KPI metric strip
- turn 4 7 account InfoRows + product-line pie
2026-07-18 15:22:45 -07:00
..