Skip to content

fix(showcase/mastra): D6 follow-ups to #5798 — gen-ui-agent step cap + useComponent probe path (OSS-381) - #6103

Merged
contextablemark merged 3 commits into
mainfrom
mark/showcase-mastra-d6-followups
Jul 23, 2026
Merged

contextablemark merged 3 commits into
mainfrom
mark/showcase-mastra-d6-followups

Conversation

@contextablemark

@contextablemark contextablemark commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

What

Two mastra showcase D6 follow-ups to #5798 (v1 bridge alpha). Both cells went red the moment #5798 took them out of not_supported_features — they were claimed supported before actually passing. Neither is a v1-bridge streaming regression.

Commits

1. gen-ui-agent completes all 3 steps (raise step cap) — 57afed6dd
"Generative UI: Agent State" (gen-ui-agent) stalled at 2/3 steps: genUiAgent set no stop condition, so the AI SDK default halted the agentic loop before the 3rd step completed. Adds defaultOptions.stopWhen = stepCountIs(12). Verified 6/6 on the Node-22 + next start + aimock replay rig; tool-rendering / gen-ui-tool-based unaffected.

2. useComponent (gen-ui-tool-based) — probe took the wrong path — 4640d6304
The D5 gen-ui-custom probe omitted mastra from CHART_INTEGRATIONS, so it sent the haiku prompt and hunted for a haiku card. mastra's demo is the LGP-style useComponent chart demo (render_pie_chart / render_bar_chart) with no haiku tool, so the assistant bubble came back empty ("haiku card [data-testid=copilot-assistant-message] rendered but has no text content").

  • Add "mastra" to CHART_INTEGRATIONS.
  • Add aimock/d6/mastra/gen-ui-custom.json (mirrors langgraph-python; identical pie schema {title, description, data:[{label,value}]}) so the cell is deterministic under replay instead of falling through to the live upstream.
  • Repoint the probe unit test's haiku-empty-card case from "mastra" → "agno" (a genuine haiku integration).

Verification

  • gen-ui-agent: 6/6 on the faithful rig.
  • useComponent: logic-only harness + fixture changes; harness unit tests run in CI (sparse local checkout has no vitest).

Refs

🤖 Generated with Claude Code

contextablemark and others added 2 commits July 22, 2026 00:50
…cap)

The "Generative UI: Agent State" cell (gen-ui-agent) was stuck at D4 — the
d5-single-pill e2e ("marks every step as completed") failed with only 2/3 steps
reaching "completed", which blocks D6.

Root cause: the planner scripts 3 steps × 2 set_steps transitions (in_progress →
completed) + 1 initial "all pending" call + 1 closing message (~8 model turns),
but genUiAgent set no stop condition, so the AI SDK's default halted the agentic
loop before the 3rd step completed. (LangGraph gold loops until the graph ends
and needs no equivalent; this is the AI-SDK step-cap analogue — cf.
toolRenderingAgent's d20 sequence.)

Add defaultOptions.stopWhen = stepCountIs(12) to genUiAgent so the full
progression runs to completion.

Verified on the faithful rig (Node 22 + next build/start + aimock 1.37.4 replay):
gen-ui-agent.spec 6/6; tool-rendering 6/6 and gen-ui-tool-based 4/4 unchanged
(no regression). Isolated to genUiAgent — no other agent/demo affected.

--no-verify: sparse showcase checkout has no monorepo lefthook/commitlint binaries.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…he wrong path

The "Generative UI: useComponent" cell (gen-ui-tool-based) went red on mastra
the moment OSS-381 took it out of not_supported: the D5 gen-ui-custom probe
sent the *haiku* prompt and hunted for a haiku card, but mastra's demo is the
LGP-style `useComponent` chart demo (render_pie_chart / render_bar_chart) with
no haiku tool — so the assistant bubble came back empty ("haiku card
[data-testid=copilot-assistant-message] rendered but has no text content").

Root cause: the probe's CHART_INTEGRATIONS allowlist in
harness/src/probes/scripts/d5-gen-ui-custom.ts omitted mastra, so
isChartIntegration("mastra") was false and it took the haiku branch. mastra's
gen-ui-tool-based page registers render_pie_chart / render_bar_chart via
useComponent exactly like langgraph-python and google-adk.

- Add "mastra" to CHART_INTEGRATIONS so the probe sends the pie-chart prompt
  and asserts the donut SVG + "pie"/"chart" follow-up tokens.
- Add aimock/d6/mastra/gen-ui-custom.json (mirrors langgraph-python's, context:
  mastra; the pie schema is identical — {title, description, data:[{label,value}]})
  so the cell is deterministic under aimock replay instead of falling through to
  the live upstream.
- Repoint the probe unit test's haiku-empty-card case from "mastra" to "agno"
  (a genuine haiku integration) now that mastra is a chart integration.

Not a v1-bridge streaming regression — a harness/fixture gap exposed when the
cell was un-suppressed. Harness unit tests not run locally (sparse showcase
checkout has no vitest); logic-only changes.

--no-verify: sparse showcase checkout has no monorepo lefthook/commitlint binaries.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

📣 Social Copy Generator

Generate social media copies (Twitter/X, LinkedIn, Blog Post) for this PR using Claude.

  • Generate social media copies

@github-actions

github-actions Bot commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Production Digest-Pinning Audit

All 41 services digest-pinned.

Run 2026-07-22 06:39:00 PDT — 0 finding(s).

auto-merge was automatically disabled July 22, 2026 06:59

Pull request was closed

@contextablemark
contextablemark merged commit cd37325 into main Jul 23, 2026
22 checks passed
@contextablemark
contextablemark deleted the mark/showcase-mastra-d6-followups branch July 23, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants