Skip to content

Gemini Feedback#768

Merged
emeeks merged 6 commits intomainfrom
gemini-feedback
Mar 21, 2026
Merged

Gemini Feedback#768
emeeks merged 6 commits intomainfrom
gemini-feedback

Conversation

@emeeks
Copy link
Copy Markdown
Member

@emeeks emeeks commented Mar 21, 2026

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

Summary

Test plan

  • npm test passes
  • npm run dist builds successfully
  • Tested in browser (if UI change)
  • Added/updated tests (if new behavior)

Checklist

  • No unrelated changes included
  • CHANGELOG.md updated (if user-facing change)

  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
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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-examples integration 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.

Comment thread .github/workflows/node.js.yml Outdated
Comment thread .github/workflows/release.yml Outdated
Comment thread src/components/charts/shared/withChartWrapper.tsx
Comment thread integration-tests/accessibility.spec.ts Outdated
Comment thread package.json
emeeks added 2 commits March 20, 2026 21:48
  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.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 21 out of 22 changed files in this pull request and generated 3 comments.

Comment thread vitest.config.mts
Comment thread src/components/charts/shared/withChartWrapper.test.tsx Outdated
Comment thread integration-tests/accessibility.spec.ts Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 21 out of 22 changed files in this pull request and generated 3 comments.

Comment thread src/components/charts/shared/withChartWrapper.test.tsx Outdated
Comment thread ai/mcp-server.ts
Comment thread src/components/charts/shared/withChartWrapper.tsx
@emeeks emeeks merged commit 4f53ebb into main Mar 21, 2026
4 checks passed
@emeeks emeeks deleted the gemini-feedback branch March 21, 2026 05:35
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