Merged
Conversation
Phase 1: Immediate Wins 1a. Removed obsolete test references - Deleted integration-tests/viz-examples/ directory - Removed "Legacy Examples" link from integration-tests/index.html - Removed viz-examples/index.html from serve-examples script in package.json - Cleaned up TESTING_BASELINE.md known issues (removed items 2 & 3) 1b. CI bundle size guardrails - Added size-limit + @size-limit/file as devDependencies - Added size-limit config in package.json with limits for all 6 entry bundles - Added "size" script - Added npx size-limit step to .github/workflows/node.js.yml 1c. CI coverage threshold - Added coverage config to vitest.config.mts (v8 provider, thresholds: 40/35/35/40) - Added npx vitest run --coverage step to both CI workflows Phase 2: Testing & CI 2a. axe-core automated accessibility scanning - Added @axe-core/playwright devDependency - Added 6 axe-core scan tests to integration-tests/accessibility.spec.ts (XY, ordinal, network, geo, coordinated, accessibility pages) 2b. Benchmarks in CI - Added npx vitest bench --reporter=verbose step to .github/workflows/node.js.yml Phase 3: AI Tooling 3a. MCP tool consolidation (19 → 2) - Rewrote ai/mcp-server.ts to register only renderChart + diagnoseConfig - Removed the per-chart tool registration loop (17 redundant tools) - renderChart now lists available components in its description and error messages 3b. Self-healing diagnostics in error boundary - Enhanced SafeRender to accept optional props and run diagnoseConfig on error - Updated ChartError to display diagnostic suggestions in a monospace panel - Infrastructure is in place — HOCs can incrementally pass props to get diagnostics
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens Semiotic’s testing/CI guardrails (coverage, bundle size, benchmarks), removes legacy integration-test examples, adds automated accessibility scanning, and consolidates MCP tooling while enhancing chart error boundaries with self-diagnostics.
Changes:
- Add Vitest coverage thresholds + enforce coverage runs in CI workflows.
- Add bundle size limits (size-limit) and run benchmarks in CI.
- Add axe-core Playwright accessibility scans; remove legacy
viz-examplesintegration pages; consolidate MCP server tools and enhance error rendering diagnostics.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
vitest.config.mts |
Adds coverage provider + threshold configuration used by CI coverage runs. |
src/components/charts/shared/withChartWrapper.tsx |
Enhances SafeRender to optionally run diagnoseConfig on render errors and pass hints to the error UI. |
src/components/charts/shared/ChartError.tsx |
Displays optional diagnostic suggestions in the chart error panel. |
package.json |
Adds size-limit config/scripts and devDependencies for axe + size-limit tooling; removes legacy serve-examples entry. |
integration-tests/index.html |
Removes “Legacy Examples” link for the deleted viz-examples page. |
integration-tests/accessibility.spec.ts |
Adds axe-core automated scans for multiple example pages. |
ai/mcp-server.ts |
Consolidates MCP tool registration to renderChart + diagnoseConfig with improved error messaging. |
TESTING_BASELINE.md |
Removes known-issue entries tied to deleted/obsolete tests. |
.github/workflows/node.js.yml |
Adds coverage run, size-limit checks, and benchmarks to CI. |
.github/workflows/release.yml |
Adds coverage run to the release workflow. |
integration-tests/viz-examples/index.js |
Deleted legacy visualization examples page script. |
integration-tests/viz-examples/index.html |
Deleted legacy visualization examples page HTML. |
2a. axe-core automated accessibility scanning (from Phase 1 round)
- @axe-core/playwright added as devDependency
- 6 axe-core scan tests added to integration-tests/accessibility.spec.ts
2b. Benchmarks gated in CI (from Phase 1 round)
- npx vitest bench --reporter=verbose step added to CI workflow
2c. Incremental coverage improvement
61 new tests written across 9 files, targeting the code paths AI agents hit most:
- Ordinal HOC push API (7 files): BarChart, BoxPlot, ViolinPlot, Histogram, DotPlot,
DonutChart, PieChart — all now test ref exposure, no-throw on disconnected ref, and getData
fallback
- Tooltip disabled path (7 files): All ordinal HOCs now test tooltip={false} returns null
- networkUtils (new test file): inferNodesFromEdges with empty/undefined nodes,
createEdgeStyleFn with source/target/gradient/function edgeColorBy, edge cases
- withChartWrapper (new test file): SafeRender with diagnoseConfig integration,
warnDataShape/warnMissingField dev warnings, renderEmptyState/renderLoadingState helpers
Coverage thresholds set to ~5% below actual (62/52/63/65), ratchetable over time.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 1: Immediate Wins
1a. Removed obsolete test references
1b. CI bundle size guardrails
1c. CI coverage threshold
Phase 2: Testing & CI
2a. axe-core automated accessibility scanning
2b. Benchmarks in CI
Phase 3: AI Tooling
3a. MCP tool consolidation (19 → 2)
3b. Self-healing diagnostics in error boundary
Summary
Test plan
npm testpassesnpm run distbuilds successfullyChecklist