Skip to content

feat(agents): serve MUI X in the agent chat (JS-4c) - #12483

Merged
MarkusNeusinger merged 3 commits into
mainfrom
feat/agent-muix
Oct 31, 2026
Merged

MarkusNeusinger merged 3 commits into
mainfrom
feat/agent-muix

Conversation

@MarkusNeusinger

Copy link
Copy Markdown
Owner

Summary

  • MUI X (muix, React + @mui/x-charts 9.16, code file plot.tsx) joins Chart.js, D3, ECharts and Highcharts on the JavaScript runtime and in the admin deploy's _LIBRARIES: 13 of 15 libraries served for the admin's live tests. Catalogue files written for MUI X 7.29 are served coupled with the deprecated-api note (owner decision, question 13); the adapter rewrites ChartContainer to ChartsContainer.
  • MUI X idioms in adapter_javascript.md, each measured in the renderer image: a "utc" time axis (a "time" axis follows the browser's zone in the exported page), a null-guarded series valueFormatter (MUI X calls it with a gap's null on hover; unguarded, the hover removes the whole chart), axis bands sized for the labels, overlays through useXScale/useYScale/useDrawingArea instead of margin pixels, fmt on value axes, skipAnimation.
  • 60 MUI X fixtures + smoke case pie-basic-muix-renamed; the matrix preflight falls back to the library's smoke case when every selected file is a MUI X 7 file that cannot bundle as it stands; page_probe.mjs hovers the largest canvas/svg (MUI X's first svg is a legend mark); the renderer image's CI builds and probes a MUI X page.

Plan

agentic/specs/261024-agent-all-libraries.md, "What JS-4c built (2026-10-31): MUI X served for the admin".

Test plan

  • ruff, mypy (api core agents), pytest tests/unit tests/integration -n auto with the renderer image tests on (22,930 passed, 27 skipped), make_fixtures --check, changelog check
  • Prompt idiom form passes both validator profiles and renders 3200x1800 in both themes from a table with missing cells and a quote/backslash column name
  • A 7.29 file (scatter-basic, ChartContainer) rewritten as the prompt teaches passes R1-R3 in both themes through the local Docker backend
  • End to end without a model (60 pasted rows, decimal commas, gaps, +01:00 timestamps with microseconds, integers past 2^53): R1-R3 pass in both themes, notes count 60/58/58
  • MUI X plot.html (749 KB) and relay preview pass every page-probe check with hover in both themes; no harness, CSP or frame change
  • Axis formatters measured never to receive null (line with gaps, horizontal bars, stacked areas); only the series formatter does, which the prompt guards
  • Pre-PR Gemini Flash check: one real finding (preflight fallback), fixed in 63ff7aa
  • After the merge: deploys, site-smoke, then the MUI X eval matrix on Vertex (per spec)

https://claude.ai/code/session_01H7HSkGyea1k2v293XiAMo8

MarkusNeusinger and others added 2 commits October 31, 2026 11:47
MUI X joins the JavaScript runtime's served libraries and the admin deploy's
_LIBRARIES, so 13 of the 15 catalogue libraries are served. plot.tsx renders
through the renderer's JavaScript row (esbuild bundle through the closed import
plugin, mounted as a React component) from the typed table; files written for
MUI X 7 are served coupled with the deprecated-api note (question 13, A).

- adapter_javascript.md: MUI X idioms measured with MUI X 9.16 in the renderer
  image: module imports and one default export, ChartContainer ->
  ChartsContainer, axis bands sized for the labels, overlays through
  @mui/x-charts/hooks instead of pixel positions from margin, a "utc" time
  axis with a formatter ("time" follows the browser's zone), fmt on value
  axes, a series valueFormatter that guards null (unguarded, a hover over a
  gap removes the whole chart). root.md names plot.tsx and MUI X's page.
- Fixtures: 60 MUI X cases (780 generated), smoke pie-basic-muix-renamed;
  5 clean (9.16), 5 coupled (7.29), scatter-basic with deprecated-api.
- Eval preflight: a library's first case whose file bundles as it stands
  (unavailable-import), so a MUI X 7 file first no longer stops the run.
- page_probe.mjs: a MUI X snippet; the hover takes the largest canvas or
  svg (MUI X legend marks are svgs). The renderer CI step builds and probes
  a MUI X page next to the Chart.js one.
- Image tests for MUI X: idioms render in both themes, the 7.29 import fails
  at its line until rewritten, the page and the relay probes pass.
- Docs: agents/README.md, agent-network.md, the plan's "What JS-4c built",
  changelog fragment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H7HSkGyea1k2v293XiAMo8
The matrix preflight is a renderer health check, not a case evaluation. When
no selected case of a library has a catalogue file that bundles as it stands
(every one imports what MUI X 9.16 lacks, e.g. `--cases scatter-basic-muix-*`
in a per-spec run), it fell back to the first file, which cannot bundle, so
the case that tests the ChartContainer rewrite could never run. It now
renders the library's smoke case from the committed fixtures
(pie-basic-muix-renamed for MUI X) and says so; only a library without such
a smoke case renders its first file and fails as before.

Measured for the plan (no prompt change): MUI X calls a value axis's
valueFormatter only for its ticks, with numbers, in line, horizontal and
vertical bar, and stacked area charts with gaps; only the category or date
axis is a tooltip axis, and the tooltip hands the gap's null to the series'
own formatter, which the prompt already guards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H7HSkGyea1k2v293XiAMo8
Copilot AI lite review requested due to automatic review settings October 31, 2026 11:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A critical changelog fragment issue remains: the hard-coded (#12483) suffix will fail validation and may reference the wrong pull request.

1 open issue
What changed in this PR

This pull request adds MUI X Charts support to the JavaScript agent runtime, including TSX rendering, admin deployment configuration, renderer probing, preflight handling, and an expanded evaluation fixture matrix.

Changes:

  • Registers muix and plot.tsx across runtime configuration, prompts, deployment settings, eligibility checks, and tests.
  • Adds MUI X-specific rendering idioms, MUI X 7 import rewriting, smoke coverage, and 60 evaluation cases.
  • Updates page probing to hover the largest chart surface and adds preflight fallback for incompatible catalogue files.
  • Review findings: remove the hard-coded (#12483) suffix from the changelog fragment; change “runs” to “run” in the user-facing prompt.
File Description
tests/​unit/​agents/​test_image.py Updates deployment-library expectations for MUI X.
tests/​unit/​agents/​runtime/​test_runtimes.py Verifies MUI X runtime registration and TSX artifacts.
tests/​unit/​agents/​runtime/​test_policy.py Covers MUI X in JavaScript policy validation.
tests/​unit/​agents/​evals/​test_matrix.py Tests MUI X preflight fallback behavior.
tests/​unit/​agents/​evals/​test_make_fixtures.py Verifies MUI X fixture counts, smoke coverage, and eligibility.
tests/​unit/​agents/​evals/​test_cases.py Updates evaluation case totals.
tests/​unit/​agents/​code/​test_profile_javascript_page_image.py Exercises MUI X page probes and interactive previews.
tests/​unit/​agents/​code/​test_profile_javascript_image.py Tests MUI X idiom rendering and legacy import rewriting.
tests/​unit/​agents/​code/​conftest.py Adds MUI X idiom snippets and validation expectations.
changelog.d/​agent-muix.md Documents MUI X support; contains the hard-coded PR-number suffix requiring removal.
agents/​renderer/​page_probe.mjs Adds MUI X probing and largest-chart hover selection.
agents/​evals/​matrix.py Adds MUI X preflight fallback and smoke-case selection.
agents/​evals/​make_fixtures.py Generates MUI X fixtures and defines the smoke case.
agents/​evals/​fixtures/​cases/​violin-basic-muix-x10/​case.json Adds scaled violin fixture metadata.
agents/​evals/​fixtures/​cases/​violin-basic-muix-renamed/​case.json Adds renamed-header violin fixture metadata.
agents/​evals/​fixtures/​cases/​violin-basic-muix-n5000/​case.json Adds large violin fixture metadata.
agents/​evals/​fixtures/​cases/​violin-basic-muix-n12/​data.csv Adds small violin input data.
agents/​evals/​fixtures/​cases/​violin-basic-muix-n12/​case.json Adds small violin fixture metadata.
agents/​evals/​fixtures/​cases/​violin-basic-muix-decimal-comma/​case.json Adds decimal-comma violin metadata.
agents/​evals/​fixtures/​cases/​violin-basic-muix-date/​case.json Adds date-augmented violin metadata.
agents/​evals/​fixtures/​cases/​scatter-basic-muix-x10/​data.csv Adds scaled scatter input data.
agents/​evals/​fixtures/​cases/​scatter-basic-muix-x10/​case.json Adds scaled scatter fixture metadata.
agents/​evals/​fixtures/​cases/​scatter-basic-muix-renamed/​data.csv Adds renamed-header scatter input data.
agents/​evals/​fixtures/​cases/​scatter-basic-muix-renamed/​case.json Adds renamed-header scatter metadata.
agents/​evals/​fixtures/​cases/​scatter-basic-muix-n5000/​case.json Adds large scatter fixture metadata.
agents/​evals/​fixtures/​cases/​scatter-basic-muix-n12/​data.csv Adds small scatter input data.
agents/​evals/​fixtures/​cases/​scatter-basic-muix-n12/​case.json Adds small scatter fixture metadata.
agents/​evals/​fixtures/​cases/​scatter-basic-muix-decimal-comma/​data.csv Adds decimal-comma scatter input data.
agents/​evals/​fixtures/​cases/​scatter-basic-muix-decimal-comma/​case.json Adds decimal-comma scatter metadata.
agents/​evals/​fixtures/​cases/​scatter-basic-muix-date/​case.json Adds date-augmented scatter metadata.
agents/​evals/​fixtures/​cases/​pie-basic-muix-x10/​data.csv Adds scaled pie input data.
agents/​evals/​fixtures/​cases/​pie-basic-muix-x10/​case.json Adds scaled pie fixture metadata.
agents/​evals/​fixtures/​cases/​pie-basic-muix-renamed/​data.csv Adds renamed-header pie input data.
agents/​evals/​fixtures/​cases/​pie-basic-muix-renamed/​case.json Adds the MUI X smoke-case metadata.
agents/​evals/​fixtures/​cases/​pie-basic-muix-n5000/​case.json Adds large pie fixture metadata.
agents/​evals/​fixtures/​cases/​pie-basic-muix-n12/​data.csv Adds small pie input data.
agents/​evals/​fixtures/​cases/​pie-basic-muix-n12/​case.json Adds small pie fixture metadata.
agents/​evals/​fixtures/​cases/​pie-basic-muix-decimal-comma/​data.csv Adds decimal-comma pie input data.
agents/​evals/​fixtures/​cases/​pie-basic-muix-decimal-comma/​case.json Adds decimal-comma pie metadata.
agents/​evals/​fixtures/​cases/​pie-basic-muix-date/​data.csv Adds date-augmented pie input data.
agents/​evals/​fixtures/​cases/​pie-basic-muix-date/​case.json Adds date-augmented pie metadata.
agents/​evals/​fixtures/​cases/​line-timeseries-muix-x10/​case.json Adds scaled time-series metadata.
agents/​evals/​fixtures/​cases/​line-timeseries-muix-renamed/​case.json Adds renamed-header time-series metadata.
agents/​evals/​fixtures/​cases/​line-timeseries-muix-n5000/​case.json Adds large time-series metadata.
agents/​evals/​fixtures/​cases/​line-timeseries-muix-n12/​data.csv Adds small time-series input data.
agents/​evals/​fixtures/​cases/​line-timeseries-muix-n12/​case.json Adds small time-series metadata.
agents/​evals/​fixtures/​cases/​line-timeseries-muix-decimal-comma/​case.json Adds decimal-comma time-series metadata.
agents/​evals/​fixtures/​cases/​line-timeseries-muix-date/​case.json Adds date-axis time-series metadata.
agents/​evals/​fixtures/​cases/​line-basic-muix-x10/​data.csv Adds scaled line input data.
agents/​evals/​fixtures/​cases/​line-basic-muix-x10/​case.json Adds scaled line metadata.
agents/​evals/​fixtures/​cases/​line-basic-muix-renamed/​data.csv Adds renamed-header line input data.
agents/​evals/​fixtures/​cases/​line-basic-muix-renamed/​case.json Adds renamed-header line metadata.
agents/​evals/​fixtures/​cases/​line-basic-muix-n5000/​case.json Adds large line metadata.
agents/​evals/​fixtures/​cases/​line-basic-muix-n12/​data.csv Adds small line input data.
agents/​evals/​fixtures/​cases/​line-basic-muix-n12/​case.json Adds small line metadata.
agents/​evals/​fixtures/​cases/​line-basic-muix-decimal-comma/​data.csv Adds decimal-comma line input data.
agents/​evals/​fixtures/​cases/​line-basic-muix-decimal-comma/​case.json Adds decimal-comma line metadata.
agents/​evals/​fixtures/​cases/​line-basic-muix-date/​data.csv Adds date-axis line input data.
agents/​evals/​fixtures/​cases/​line-basic-muix-date/​case.json Adds date-axis line metadata.
agents/​evals/​fixtures/​cases/​histogram-basic-muix-x10/​case.json Adds scaled histogram metadata.
agents/​evals/​fixtures/​cases/​histogram-basic-muix-renamed/​case.json Adds renamed-header histogram metadata.
agents/​evals/​fixtures/​cases/​histogram-basic-muix-n5000/​case.json Adds large histogram metadata.
agents/​evals/​fixtures/​cases/​histogram-basic-muix-n12/​data.csv Adds small histogram input data.
agents/​evals/​fixtures/​cases/​histogram-basic-muix-n12/​case.json Adds small histogram metadata.
agents/​evals/​fixtures/​cases/​histogram-basic-muix-decimal-comma/​case.json Adds decimal-comma histogram metadata.
agents/​evals/​fixtures/​cases/​histogram-basic-muix-date/​case.json Adds date-augmented histogram metadata.
agents/​evals/​fixtures/​cases/​heatmap-basic-muix-x10/​data.csv Adds scaled heatmap input data.
agents/​evals/​fixtures/​cases/​heatmap-basic-muix-x10/​case.json Adds scaled heatmap metadata.
agents/​evals/​fixtures/​cases/​heatmap-basic-muix-renamed/​data.csv Adds renamed-header heatmap input data.
agents/​evals/​fixtures/​cases/​heatmap-basic-muix-renamed/​case.json Adds renamed-header heatmap metadata.
agents/​evals/​fixtures/​cases/​heatmap-basic-muix-n5000/​case.json Adds large heatmap metadata.
agents/​evals/​fixtures/​cases/​heatmap-basic-muix-n12/​data.csv Adds small heatmap input data.
agents/​evals/​fixtures/​cases/​heatmap-basic-muix-n12/​case.json Adds small heatmap metadata.
agents/​evals/​fixtures/​cases/​heatmap-basic-muix-decimal-comma/​data.csv Adds decimal-comma heatmap input data.
agents/​evals/​fixtures/​cases/​heatmap-basic-muix-decimal-comma/​case.json Adds decimal-comma heatmap metadata.
agents/​evals/​fixtures/​cases/​heatmap-basic-muix-date/​case.json Adds date-augmented heatmap metadata.
agents/​evals/​fixtures/​cases/​box-basic-muix-x10/​case.json Adds scaled box-plot metadata.
agents/​evals/​fixtures/​cases/​box-basic-muix-renamed/​data.csv Adds renamed-header box-plot input data.
agents/​evals/​fixtures/​cases/​box-basic-muix-renamed/​case.json Adds renamed-header box-plot metadata.
agents/​evals/​fixtures/​cases/​box-basic-muix-n5000/​case.json Adds large box-plot metadata.
agents/​evals/​fixtures/​cases/​box-basic-muix-n12/​data.csv Adds small box-plot input data.
agents/​evals/​fixtures/​cases/​box-basic-muix-n12/​case.json Adds small box-plot metadata.
agents/​evals/​fixtures/​cases/​box-basic-muix-decimal-comma/​case.json Adds decimal-comma box-plot metadata.
agents/​evals/​fixtures/​cases/​box-basic-muix-date/​case.json Adds date-augmented box-plot metadata.
agents/​evals/​fixtures/​cases/​bar-grouped-muix-x10/​data.csv Adds scaled grouped-bar input data.
agents/​evals/​fixtures/​cases/​bar-grouped-muix-x10/​case.json Adds scaled grouped-bar metadata.
agents/​evals/​fixtures/​cases/​bar-grouped-muix-renamed/​data.csv Adds renamed-header grouped-bar input data.
agents/​evals/​fixtures/​cases/​bar-grouped-muix-renamed/​case.json Adds renamed-header grouped-bar metadata.
agents/​evals/​fixtures/​cases/​bar-grouped-muix-n5000/​case.json Adds large grouped-bar metadata.
agents/​evals/​fixtures/​cases/​bar-grouped-muix-n12/​data.csv Adds small grouped-bar input data.
agents/​evals/​fixtures/​cases/​bar-grouped-muix-n12/​case.json Adds small grouped-bar metadata.
agents/​evals/​fixtures/​cases/​bar-grouped-muix-decimal-comma/​data.csv Adds decimal-comma grouped-bar input data.
agents/​evals/​fixtures/​cases/​bar-grouped-muix-decimal-comma/​case.json Adds decimal-comma grouped-bar metadata.
agents/​evals/​fixtures/​cases/​bar-grouped-muix-date/​data.csv Adds date-augmented grouped-bar input data.
agents/​evals/​fixtures/​cases/​bar-grouped-muix-date/​case.json Adds date-augmented grouped-bar metadata.
agents/​evals/​fixtures/​cases/​area-basic-muix-x10/​data.csv Adds scaled area input data.
agents/​evals/​fixtures/​cases/​area-basic-muix-x10/​case.json Adds scaled area metadata.
agents/​evals/​fixtures/​cases/​area-basic-muix-renamed/​data.csv Adds renamed-header area input data.
agents/​evals/​fixtures/​cases/​area-basic-muix-renamed/​case.json Adds renamed-header area metadata.
agents/​evals/​fixtures/​cases/​area-basic-muix-n5000/​case.json Adds large area metadata.
agents/​evals/​fixtures/​cases/​area-basic-muix-n12/​data.csv Adds small area input data.
agents/​evals/​fixtures/​cases/​area-basic-muix-n12/​case.json Adds small area metadata.
agents/​evals/​fixtures/​cases/​area-basic-muix-decimal-comma/​data.csv Adds decimal-comma area input data.
agents/​evals/​fixtures/​cases/​area-basic-muix-decimal-comma/​case.json Adds decimal-comma area metadata.
agents/​evals/​fixtures/​cases/​area-basic-muix-date/​data.csv Adds date-axis area input data.
agents/​evals/​fixtures/​cases/​area-basic-muix-date/​case.json Adds date-axis area metadata.
agents/​evals/​eligibility.py Includes MUI X in eligibility scans.
agents/​evals/​cases.py Updates evaluation case documentation and totals.
agents/​cloudbuild.yaml Enables MUI X in the admin deployment library list.
agents/​anyplot/​settings.py Documents MUI X as a supported runtime library.
agents/​anyplot/​render/​runtimes/​javascript.py Documents MUI X TSX runtime behavior and API adaptation.
agents/​anyplot/​render/​runtimes/​__init__.py Registers MUI X in the JavaScript runtime registry.
agents/​anyplot/​render/​contract.py Documents MUI X runtime mapping.
agents/​anyplot/​prompts/​root.md Documents MUI X code and downloadable TSX artifacts; contains the noted grammar nit.
agents/​anyplot/​code/​profiles/​javascript/​__init__.py Updates JavaScript profile service coverage documentation.

Review effort: Lite

Comment thread changelog.d/agent-muix.md Resolved
@codecov

codecov Bot commented Oct 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@MarkusNeusinger
MarkusNeusinger merged commit 1111b8a into main Oct 31, 2026
18 checks passed
@MarkusNeusinger
MarkusNeusinger deleted the feat/agent-muix branch October 31, 2026 12:10
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